File Editor
Directories:
.. (Back)
Files:
et-ai-app.bundle.css
et-ai-app.bundle.js
et-ai-app.bundle.js.LICENSE.txt
Create New File
Create
Edit File: et-ai-app.bundle.js
/*! For license information please see et-ai-app.bundle.js.LICENSE.txt */ (()=>{var e={22105:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApiProvider:()=>tt,QueryStatus:()=>n,buildCreateApi:()=>pe,copyWithStructuralSharing:()=>j,coreModule:()=>je,createApi:()=>rt,defaultSerializeQueryArgs:()=>de,fakeBaseQuery:()=>he,fetchBaseQuery:()=>T,reactHooksModule:()=>et,retry:()=>B,setupListeners:()=>G,skipSelector:()=>ae,skipToken:()=>ie});var n,o,i=r(24268),a=r(12902),l=r(22222),u=r(14791),s=r(44815),c=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},f=function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},d=Object.defineProperty,p=Object.defineProperties,h=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=function(e,t,r){return t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},b=function(e,t){for(var r in t||(t={}))v.call(t,r)&&y(e,r,t[r]);if(m)for(var n=0,o=m(t);n<o.length;n++){r=o[n];g.call(t,r)&&y(e,r,t[r])}return e},w=function(e,t){return p(e,h(t))},_=function(e,t){var r={};for(var n in e)v.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&m)for(var o=0,i=m(e);o<i.length;o++){n=i[o];t.indexOf(n)<0&&g.call(e,n)&&(r[n]=e[n])}return r},x=function(e,t,r){return new Promise((function(n,o){var i=function(e){try{l(r.next(e))}catch(e){o(e)}},a=function(e){try{l(r.throw(e))}catch(e){o(e)}},l=function(e){return e.done?n(e.value):Promise.resolve(e.value).then(i,a)};l((r=r.apply(e,t)).next())}))};(o=n||(n={})).uninitialized="uninitialized",o.pending="pending",o.fulfilled="fulfilled",o.rejected="rejected";var S=function(e){return e.replace(/\/$/,"")},k=function(e){return e.replace(/^\//,"")};function O(e,t){if(!e)return t;if(!t)return e;if(function(e){return new RegExp("(^|:)//").test(e)}(t))return t;var r=e.endsWith("/")||!t.startsWith("?")?"/":"";return""+(e=S(e))+r+(t=k(t))}var E=function(e){return[].concat.apply([],e)};var C=i.isPlainObject;function j(e,t){if(e===t||!(C(e)&&C(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{},a=0,l=r;a<l.length;a++){var u=l[a];i[u]=j(e[u],t[u]),o&&(o=e[u]===i[u])}return o?e:i}var P=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},L=function(e){return e.status>=200&&e.status<=299},M=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function A(e){if(!(0,i.isPlainObject)(e))return e;for(var t=b({},e),r=0,n=Object.entries(t);r<n.length;r++){var o=n[r],a=o[0];void 0===o[1]&&delete t[a]}return t}function T(e){var t=this;void 0===e&&(e={});var r=e,n=r.baseUrl,o=r.prepareHeaders,a=void 0===o?function(e){return e}:o,l=r.fetchFn,u=void 0===l?P:l,s=r.paramsSerializer,f=r.isJsonContentType,d=void 0===f?M:f,p=r.jsonContentType,h=void 0===p?"application/json":p,m=r.jsonReplacer,v=r.timeout,g=r.responseHandler,y=r.validateStatus,S=_(r,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","jsonReplacer","timeout","responseHandler","validateStatus"]);return"undefined"==typeof fetch&&u===P&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(e,r){return x(t,null,(function(){var t,o,l,f,p,x,E,C,j,P,M,T,I,R,N,D,z,F,B,H,U,W,V,q,G,Y,K,$,Q,Z,X,J,ee,te,re,ne;return c(this,(function(c){switch(c.label){case 0:return t=r.signal,o=r.getState,l=r.extra,f=r.endpoint,p=r.forced,x=r.type,j=(C="string"==typeof e?{url:e}:e).url,P=C.headers,M=void 0===P?new Headers(S.headers):P,T=C.params,I=void 0===T?void 0:T,R=C.responseHandler,N=void 0===R?null!=g?g:"json":R,D=C.validateStatus,z=void 0===D?null!=y?y:L:D,F=C.timeout,B=void 0===F?v:F,H=_(C,["url","headers","params","responseHandler","validateStatus","timeout"]),U=b(w(b({},S),{signal:t}),H),M=new Headers(A(M)),W=U,[4,a(M,{getState:o,extra:l,endpoint:f,forced:p,type:x})];case 1:W.headers=c.sent()||M,V=function(e){return"object"==typeof e&&((0,i.isPlainObject)(e)||Array.isArray(e)||"function"==typeof e.toJSON)},!U.headers.has("content-type")&&V(U.body)&&U.headers.set("content-type",h),V(U.body)&&d(U.headers)&&(U.body=JSON.stringify(U.body,m)),I&&(q=~j.indexOf("?")?"&":"?",G=s?s(I):new URLSearchParams(A(I)),j+=q+G),j=O(n,j),Y=new Request(j,U),K=Y.clone(),E={request:K},Q=!1,Z=B&&setTimeout((function(){Q=!0,r.abort()}),B),c.label=2;case 2:return c.trys.push([2,4,5,6]),[4,u(Y)];case 3:return $=c.sent(),[3,6];case 4:return X=c.sent(),[2,{error:{status:Q?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(X)},meta:E}];case 5:return Z&&clearTimeout(Z),[7];case 6:J=$.clone(),E.response=J,te="",c.label=7;case 7:return c.trys.push([7,9,,10]),[4,Promise.all([k($,N).then((function(e){return ee=e}),(function(e){return re=e})),J.text().then((function(e){return te=e}),(function(){}))])];case 8:if(c.sent(),re)throw re;return[3,10];case 9:return ne=c.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:$.status,data:te,error:String(ne)},meta:E}];case 10:return[2,z($,ee)?{data:ee,meta:E}:{error:{status:$.status,data:ee},meta:E}]}}))}))};function k(e,t){return x(this,null,(function(){var r;return c(this,(function(n){switch(n.label){case 0:return"function"==typeof t?[2,t(e)]:("content-type"===t&&(t=d(e.headers)?"json":"text"),"json"!==t?[3,2]:[4,e.text()]);case 1:return[2,(r=n.sent()).length?JSON.parse(r):null];case 2:return[2,e.text()]}}))}))}}var I=function(e,t){void 0===t&&(t=void 0),this.value=e,this.meta=t};function R(e,t){return void 0===e&&(e=0),void 0===t&&(t=5),x(this,null,(function(){var r,n;return c(this,(function(o){switch(o.label){case 0:return r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r)),[4,new Promise((function(e){return setTimeout((function(t){return e(t)}),n)}))];case 1:return o.sent(),[2]}}))}))}var N,D,z={},F=function(e,t){return function(r,n,o){return x(void 0,null,(function(){var i,a,l,u,s,f,d;return c(this,(function(c){switch(c.label){case 0:i=[5,(t||z).maxRetries,(o||z).maxRetries].filter((function(e){return void 0!==e})),a=i.slice(-1)[0],l=function(e,t,r){return r.attempt<=a},u=b(b({maxRetries:a,backoff:R,retryCondition:l},t),o),s=0,c.label=1;case 1:0,c.label=2;case 2:return c.trys.push([2,4,,6]),[4,e(r,n,o)];case 3:if((f=c.sent()).error)throw new I(f);return[2,f];case 4:if(d=c.sent(),s++,d.throwImmediately){if(d instanceof I)return[2,d.value];throw d}return d instanceof I&&!u.retryCondition(d.value.error,r,{attempt:s,baseQueryApi:n,extraOptions:o})?[2,d.value]:[4,u.backoff(s,u.maxRetries)];case 5:return c.sent(),[3,6];case 6:return[3,1];case 7:return[2]}}))}))}},B=Object.assign(F,{fail:function(e){throw Object.assign(new I({error:e}),{throwImmediately:!0})}}),H=(0,i.createAction)("__rtkq/focused"),U=(0,i.createAction)("__rtkq/unfocused"),W=(0,i.createAction)("__rtkq/online"),V=(0,i.createAction)("__rtkq/offline"),q=!1;function G(e,t){return t?t(e,{onFocus:H,onFocusLost:U,onOffline:V,onOnline:W}):(r=function(){return e(H())},n=function(){return e(W())},o=function(){return e(V())},i=function(){"visible"===window.document.visibilityState?r():e(U())},q||"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("visibilitychange",i,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",n,!1),window.addEventListener("offline",o,!1),q=!0),function(){window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",i),window.removeEventListener("online",n),window.removeEventListener("offline",o),q=!1});var r,n,o,i}function Y(e){return e.type===N.query}function K(e,t,r,n,o,i){return"function"==typeof e?e(t,r,n,o).map($).map(i):Array.isArray(e)?e.map($).map(i):[]}function $(e){return"string"==typeof e?{type:e}:e}function Q(e){return null!=e}(D=N||(N={})).query="query",D.mutation="mutation";var Z=Symbol("forceQueryFn"),X=function(e){return"function"==typeof e[Z]};function J(e){return e}function ee(e,t,r,n){return K(r[e.meta.arg.endpointName][t],(0,i.isFulfilled)(e)?e.payload:void 0,(0,i.isRejectedWithValue)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function te(e,t,r){var n=e[t];n&&r(n)}function re(e){var t;return null!=(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)?t:e.requestId}function ne(e,t,r){var n=e[re(t)];n&&r(n)}var oe={};var ie=Symbol.for("RTKQ/skipToken"),ae=ie,le={status:n.uninitialized},ue=(0,a.ZP)(le,(function(){})),se=(0,a.ZP)(le,(function(){}));function ce(e){var t=e.serializeQueryArgs,r=e.reducerPath,o=function(e){return ue},i=function(e){return se};return{buildQuerySelector:function(e,r){return function(n){var i=t({queryArgs:n,endpointDefinition:r,endpointName:e}),s=n===ie?o:function(e){var t,r,n;return null!=(n=null==(r=null==(t=u(e))?void 0:t.queries)?void 0:r[i])?n:ue};return(0,l.P1)(s,a)}},buildMutationSelector:function(){return function(e){var t,r,n=(r="object"==typeof e?null!=(t=re(e))?t:ie:e)===ie?i:function(e){var t,n,o;return null!=(o=null==(n=null==(t=u(e))?void 0:t.mutations)?void 0:n[r])?o:se};return(0,l.P1)(n,a)}},selectInvalidatedBy:function(e,t){for(var n,o=e[r],i=new Set,a=0,l=t.map($);a<l.length;a++){var u=l[a],s=o.provided[u.type];if(s)for(var c=0,f=null!=(n=void 0!==u.id?s[u.id]:E(Object.values(s)))?n:[];c<f.length;c++){var d=f[c];i.add(d)}}return E(Array.from(i.values()).map((function(e){var t=o.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))}};function a(e){return b(b({},e),{status:t=e.status,isUninitialized:t===n.uninitialized,isLoading:t===n.pending,isSuccess:t===n.fulfilled,isError:t===n.rejected});var t}function u(e){return e[r]}}var fe=WeakMap?new WeakMap:void 0,de=function(e){var t=e.endpointName,r=e.queryArgs,n="",o=null==fe?void 0:fe.get(r);if("string"==typeof o)n=o;else{var a=JSON.stringify(r,(function(e,t){return(0,i.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{}):t}));(0,i.isPlainObject)(r)&&(null==fe||fe.set(r,a)),n=a}return t+"("+n+")"};function pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var r=(0,s.PW)((function(e){var r,n;return null==(n=t.extractRehydrationInfo)?void 0:n.call(t,e,{reducerPath:null!=(r=t.reducerPath)?r:"api"})})),n=w(b({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},t),{extractRehydrationInfo:r,serializeQueryArgs:function(e){var r=de;if("serializeQueryArgs"in e.endpointDefinition){var n=e.endpointDefinition.serializeQueryArgs;r=function(e){var t=n(e);return"string"==typeof t?t:de(w(b({},e),{queryArgs:t}))}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:f([],t.tagTypes||[])}),o={endpointDefinitions:{},batch:function(e){e()},apiUid:(0,i.nanoid)(),extractRehydrationInfo:r,hasRehydrationInfo:(0,s.PW)((function(e){return null!=r(e)}))},a={injectEndpoints:function(e){for(var t=e.endpoints({query:function(e){return w(b({},e),{type:N.query})},mutation:function(e){return w(b({},e),{type:N.mutation})}}),r=0,n=Object.entries(t);r<n.length;r++){var i=n[r],u=i[0],s=i[1];if(e.overrideExisting||!(u in o.endpointDefinitions)){o.endpointDefinitions[u]=s;for(var c=0,f=l;c<f.length;c++){f[c].injectEndpoint(u,s)}}}return a},enhanceEndpoints:function(e){var t=e.addTagTypes,r=e.endpoints;if(t)for(var i=0,l=t;i<l.length;i++){var u=l[i];n.tagTypes.includes(u)||n.tagTypes.push(u)}if(r)for(var s=0,c=Object.entries(r);s<c.length;s++){var f=c[s],d=f[0],p=f[1];"function"==typeof p?p(o.endpointDefinitions[d]):Object.assign(o.endpointDefinitions[d]||{},p)}return a}},l=e.map((function(e){return e.init(a,n,o)}));return a.injectEndpoints({endpoints:t.endpoints})}}function he(){return function(){throw new Error("When using `fakeBaseQuery`, all queries & mutations must use the `queryFn` definition syntax.")}}var me,ve=function(e){var t=e.reducerPath,r=e.api,n=e.context,o=e.internalState,i=r.internalActions,a=i.removeQueryResult,l=i.unsubscribeQueryResult;function u(e){var t=o.currentSubscriptions[e];return!!t&&!function(e){for(var t in e)return!1;return!0}(t)}var s={};function c(e,t,r,o){var i,l=n.endpointDefinitions[t],c=null!=(i=null==l?void 0:l.keepUnusedDataFor)?i:o.keepUnusedDataFor;if(c!==1/0){var f=Math.max(0,Math.min(c,2147482.647));if(!u(e)){var d=s[e];d&&clearTimeout(d),s[e]=setTimeout((function(){u(e)||r.dispatch(a({queryCacheKey:e})),delete s[e]}),1e3*f)}}}return function(e,o,i){var a;if(l.match(e)){var u=o.getState()[t];c(w=e.payload.queryCacheKey,null==(a=u.queries[w])?void 0:a.endpointName,o,u.config)}if(r.util.resetApiState.match(e))for(var f=0,d=Object.entries(s);f<d.length;f++){var p=d[f],h=p[0],m=p[1];m&&clearTimeout(m),delete s[h]}if(n.hasRehydrationInfo(e)){u=o.getState()[t];for(var v=n.extractRehydrationInfo(e).queries,g=0,y=Object.entries(v);g<y.length;g++){var b=y[g],w=b[0],_=b[1];c(w,null==_?void 0:_.endpointName,o,u.config)}}}},ge=function(e){var t=e.reducerPath,r=e.context,o=e.context.endpointDefinitions,a=e.mutationThunk,l=e.api,u=e.assertTagType,s=e.refetchQuery,c=l.internalActions.removeQueryResult,f=(0,i.isAnyOf)((0,i.isFulfilled)(a),(0,i.isRejectedWithValue)(a));function d(e,o){var i=o.getState(),a=i[t],u=l.util.selectInvalidatedBy(i,e);r.batch((function(){for(var e,t=0,r=Array.from(u.values());t<r.length;t++){var i=r[t].queryCacheKey,l=a.queries[i],f=null!=(e=a.subscriptions[i])?e:{};l&&(0===Object.keys(f).length?o.dispatch(c({queryCacheKey:i})):l.status!==n.uninitialized&&o.dispatch(s(l,i)))}}))}return function(e,t){f(e)&&d(ee(e,"invalidatesTags",o,u),t),l.util.invalidateTags.match(e)&&d(K(e.payload,void 0,void 0,void 0,void 0,u),t)}},ye=function(e){var t=e.reducerPath,r=e.queryThunk,o=e.api,i=e.refetchQuery,a=e.internalState,l={};function u(e,r){var o=e.queryCacheKey,u=r.getState()[t].queries[o],s=a.currentSubscriptions[o];if(u&&u.status!==n.uninitialized){var c=f(s);if(Number.isFinite(c)){var d=l[o];(null==d?void 0:d.timeout)&&(clearTimeout(d.timeout),d.timeout=void 0);var p=Date.now()+c,h=l[o]={nextPollTimestamp:p,pollingInterval:c,timeout:setTimeout((function(){h.timeout=void 0,r.dispatch(i(u,o))}),c)}}}}function s(e,r){var o=e.queryCacheKey,i=r.getState()[t].queries[o],s=a.currentSubscriptions[o];if(i&&i.status!==n.uninitialized){var d=f(s);if(Number.isFinite(d)){var p=l[o],h=Date.now()+d;(!p||h<p.nextPollTimestamp)&&u({queryCacheKey:o},r)}else c(o)}}function c(e){var t=l[e];(null==t?void 0:t.timeout)&&clearTimeout(t.timeout),delete l[e]}function f(e){void 0===e&&(e={});var t=Number.POSITIVE_INFINITY;for(var r in e)e[r].pollingInterval&&(t=Math.min(e[r].pollingInterval,t));return t}return function(e,t){(o.internalActions.updateSubscriptionOptions.match(e)||o.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,t),(r.pending.match(e)||r.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,t),(r.fulfilled.match(e)||r.rejected.match(e)&&!e.meta.condition)&&u(e.meta.arg,t),o.util.resetApiState.match(e)&&function(){for(var e=0,t=Object.keys(l);e<t.length;e++){c(t[e])}}()}},be=new Error("Promise never resolved before cacheEntryRemoved."),we=function(e){var t=e.api,r=e.reducerPath,n=e.context,o=e.queryThunk,a=e.mutationThunk,l=(e.internalState,(0,i.isAsyncThunkAction)(o)),u=(0,i.isAsyncThunkAction)(a),s=(0,i.isFulfilled)(o,a),c={};function f(e,r,o,i,a){var l=n.endpointDefinitions[e],u=null==l?void 0:l.onCacheEntryAdded;if(u){var s={},f=new Promise((function(e){s.cacheEntryRemoved=e})),d=Promise.race([new Promise((function(e){s.valueResolved=e})),f.then((function(){throw be}))]);d.catch((function(){})),c[o]=s;var p=t.endpoints[e].select(l.type===N.query?r:o),h=i.dispatch((function(e,t,r){return r})),m=w(b({},i),{getCacheEntry:function(){return p(i.getState())},requestId:a,extra:h,updateCachedData:l.type===N.query?function(n){return i.dispatch(t.util.updateQueryData(e,r,n))}:void 0,cacheDataLoaded:d,cacheEntryRemoved:f}),v=u(r,m);Promise.resolve(v).catch((function(e){if(e!==be)throw e}))}}return function(e,n,i){var d=function(e){return l(e)?e.meta.arg.queryCacheKey:u(e)?e.meta.requestId:t.internalActions.removeQueryResult.match(e)?e.payload.queryCacheKey:t.internalActions.removeMutationResult.match(e)?re(e.payload):""}(e);if(o.pending.match(e)){var p=i[r].queries[d],h=n.getState()[r].queries[d];!p&&h&&f(e.meta.arg.endpointName,e.meta.arg.originalArgs,d,n,e.meta.requestId)}else if(a.pending.match(e)){(h=n.getState()[r].mutations[d])&&f(e.meta.arg.endpointName,e.meta.arg.originalArgs,d,n,e.meta.requestId)}else if(s(e)){(null==(b=c[d])?void 0:b.valueResolved)&&(b.valueResolved({data:e.payload,meta:e.meta.baseQueryMeta}),delete b.valueResolved)}else if(t.internalActions.removeQueryResult.match(e)||t.internalActions.removeMutationResult.match(e)){(b=c[d])&&(delete c[d],b.cacheEntryRemoved())}else if(t.util.resetApiState.match(e))for(var m=0,v=Object.entries(c);m<v.length;m++){var g=v[m],y=g[0],b=g[1];delete c[y],b.cacheEntryRemoved()}}},_e=function(e){var t=e.api,r=e.context,n=e.queryThunk,o=e.mutationThunk,a=(0,i.isPending)(n,o),l=(0,i.isRejected)(n,o),u=(0,i.isFulfilled)(n,o),s={};return function(e,n){var o,i,c;if(a(e)){var f=e.meta,d=f.requestId,p=f.arg,h=p.endpointName,m=p.originalArgs,v=r.endpointDefinitions[h],g=null==v?void 0:v.onQueryStarted;if(g){var y={},_=new Promise((function(e,t){y.resolve=e,y.reject=t}));_.catch((function(){})),s[d]=y;var x=t.endpoints[h].select(v.type===N.query?m:d),S=n.dispatch((function(e,t,r){return r})),k=w(b({},n),{getCacheEntry:function(){return x(n.getState())},requestId:d,extra:S,updateCachedData:v.type===N.query?function(e){return n.dispatch(t.util.updateQueryData(h,m,e))}:void 0,queryFulfilled:_});g(m,k)}}else if(u(e)){var O=e.meta,E=(d=O.requestId,O.baseQueryMeta);null==(o=s[d])||o.resolve({data:e.payload,meta:E}),delete s[d]}else if(l(e)){var C=e.meta,j=(d=C.requestId,C.rejectedWithValue);E=C.baseQueryMeta;null==(c=s[d])||c.reject({error:null!=(i=e.payload)?i:e.error,isUnhandledError:!j,meta:E}),delete s[d]}}},xe=function(e){var t=e.api,r=e.context.apiUid;e.reducerPath;return function(e,n){t.util.resetApiState.match(e)&&n.dispatch(t.internalActions.middlewareRegistered(r))}},Se="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:void 0!==r.g?r.g:globalThis):function(e){return(me||(me=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},ke=function(e){var t=e.api,r=e.queryThunk,n=e.internalState,o=t.reducerPath+"/subscriptions",i=null,l=!1,u=t.internalActions,s=u.updateSubscriptionOptions,c=u.unsubscribeQueryResult;return function(e,u){var f,d;if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),t.util.resetApiState.match(e))return i=n.currentSubscriptions={},[!0,!1];if(t.internalActions.internal_probeSubscription.match(e)){var p=e.payload,h=p.queryCacheKey,m=p.requestId;return[!1,!!(null==(f=n.currentSubscriptions[h])?void 0:f[m])]}var v=function(e,n){var o,i,a,l,u,f,d,p,h;if(s.match(n)){var m=n.payload,v=m.queryCacheKey,g=m.requestId,y=m.options;return(null==(o=null==e?void 0:e[v])?void 0:o[g])&&(e[v][g]=y),!0}if(c.match(n)){var b=n.payload;return v=b.queryCacheKey,g=b.requestId,e[v]&&delete e[v][g],!0}if(t.internalActions.removeQueryResult.match(n))return delete e[n.payload.queryCacheKey],!0;if(r.pending.match(n)){var w=n.meta,_=w.arg;if(g=w.requestId,_.subscribe)return(x=null!=(a=e[i=_.queryCacheKey])?a:e[i]={})[g]=null!=(u=null!=(l=_.subscriptionOptions)?l:x[g])?u:{},!0}if(r.rejected.match(n)){var x,S=n.meta,k=S.condition;if(_=S.arg,g=S.requestId,k&&_.subscribe)return(x=null!=(d=e[f=_.queryCacheKey])?d:e[f]={})[g]=null!=(h=null!=(p=_.subscriptionOptions)?p:x[g])?h:{},!0}return!1}(n.currentSubscriptions,e);if(v){l||(Se((function(){var e=JSON.parse(JSON.stringify(n.currentSubscriptions)),r=(0,a.aS)(i,(function(){return e}))[1];u.next(t.internalActions.subscriptionsUpdated(r)),i=e,l=!1})),l=!0);var g=!!(null==(d=e.type)?void 0:d.startsWith(o)),y=r.rejected.match(e)&&e.meta.condition&&!!e.meta.arg.subscribe;return[!g&&!y,!1]}return[!0,!1]}};function Oe(e){var t=e.reducerPath,r=e.queryThunk,o=e.api,a=e.context,l=a.apiUid,u={invalidateTags:(0,i.createAction)(t+"/invalidateTags")},s=[xe,ve,ge,ye,we,_e];return{middleware:function(r){var i=!1,u=w(b({},e),{internalState:{currentSubscriptions:{}},refetchQuery:c}),f=s.map((function(e){return e(u)})),d=ke(u),p=function(e){var t=e.reducerPath,r=e.context,o=e.api,i=e.refetchQuery,a=e.internalState,l=o.internalActions.removeQueryResult;function u(e,o){var u=e.getState()[t],s=u.queries,c=a.currentSubscriptions;r.batch((function(){for(var t=0,r=Object.keys(c);t<r.length;t++){var a=r[t],f=s[a],d=c[a];d&&f&&(Object.values(d).some((function(e){return!0===e[o]}))||Object.values(d).every((function(e){return void 0===e[o]}))&&u.config[o])&&(0===Object.keys(d).length?e.dispatch(l({queryCacheKey:a})):f.status!==n.uninitialized&&e.dispatch(i(f,a)))}}))}return function(e,t){H.match(e)&&u(t,"refetchOnFocus"),W.match(e)&&u(t,"refetchOnReconnect")}}(u);return function(e){return function(n){i||(i=!0,r.dispatch(o.internalActions.middlewareRegistered(l)));var u,s=w(b({},r),{next:e}),c=r.getState(),h=d(n,s,c),m=h[0],v=h[1];if(u=m?e(n):v,r.getState()[t]&&(p(n,s,c),function(e){return!!e&&"string"==typeof e.type&&e.type.startsWith(t+"/")}(n)||a.hasRehydrationInfo(n)))for(var g=0,y=f;g<y.length;g++){(0,y[g])(n,s,c)}return u}}},actions:u};function c(e,t,n){return void 0===n&&(n={}),r(b({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t},n))}}function Ee(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Object.assign.apply(Object,f([e],t))}var Ce=Symbol(),je=function(){return{name:Ce,init:function(e,t,r){var o=t.baseQuery,l=(t.tagTypes,t.reducerPath),s=t.serializeQueryArgs,d=t.keepUnusedDataFor,p=t.refetchOnMountOrArgChange,h=t.refetchOnFocus,m=t.refetchOnReconnect;(0,a.vI)();var v=function(e){return e};Object.assign(e,{reducerPath:l,endpoints:{},internalActions:{onOnline:W,onOffline:V,onFocus:H,onFocusLost:U},util:{}});var g=function(e){var t=this,r=e.reducerPath,o=e.baseQuery,l=e.context.endpointDefinitions,u=e.serializeQueryArgs,s=e.api,f=function(e,r){return x(t,[e,r],(function(e,t){var r,n,a,u,s,f,p,h,m,v,g,y,b,w=t.signal,_=t.abort,x=t.rejectWithValue,S=t.fulfillWithValue,k=t.dispatch,O=t.getState,E=t.extra;return c(this,(function(t){switch(t.label){case 0:r=l[e.endpointName],t.label=1;case 1:return t.trys.push([1,8,,13]),n=J,a=void 0,u={signal:w,abort:_,dispatch:k,getState:O,extra:E,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?d(e,O()):void 0},(s="query"===e.type?e[Z]:void 0)?(a=s(),[3,6]):[3,2];case 2:return r.query?[4,o(r.query(e.originalArgs),u,r.extraOptions)]:[3,4];case 3:return a=t.sent(),r.transformResponse&&(n=r.transformResponse),[3,6];case 4:return[4,r.queryFn(e.originalArgs,u,r.extraOptions,(function(e){return o(e,u,r.extraOptions)}))];case 5:a=t.sent(),t.label=6;case 6:if(a.error)throw new I(a.error,a.meta);return f=S,[4,n(a.data,a.meta,e.originalArgs)];case 7:return[2,f.apply(void 0,[t.sent(),(y={fulfilledTimeStamp:Date.now(),baseQueryMeta:a.meta},y[i.SHOULD_AUTOBATCH]=!0,y)])];case 8:if(p=t.sent(),!((h=p)instanceof I))return[3,12];m=J,r.query&&r.transformErrorResponse&&(m=r.transformErrorResponse),t.label=9;case 9:return t.trys.push([9,11,,12]),v=x,[4,m(h.value,h.meta,e.originalArgs)];case 10:return[2,v.apply(void 0,[t.sent(),(b={baseQueryMeta:h.meta},b[i.SHOULD_AUTOBATCH]=!0,b)])];case 11:return g=t.sent(),h=g,[3,12];case 12:throw console.error(h),h;case 13:return[2]}}))}))};function d(e,t){var n,o,i,a,l=null==(o=null==(n=t[r])?void 0:n.queries)?void 0:o[e.queryCacheKey],u=null==(i=t[r])?void 0:i.config.refetchOnMountOrArgChange,s=null==l?void 0:l.fulfilledTimeStamp,c=null!=(a=e.forceRefetch)?a:e.subscribe&&u;return!!c&&(!0===c||(Number(new Date)-Number(s))/1e3>=c)}var p=(0,i.createAsyncThunk)(r+"/executeQuery",f,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[i.SHOULD_AUTOBATCH]=!0,e},condition:function(e,t){var n,o,i,a=(0,t.getState)(),u=null==(o=null==(n=a[r])?void 0:n.queries)?void 0:o[e.queryCacheKey],s=null==u?void 0:u.fulfilledTimeStamp,c=e.originalArgs,f=null==u?void 0:u.originalArgs,p=l[e.endpointName];return!(!X(e)&&("pending"===(null==u?void 0:u.status)||!d(e,a)&&(!Y(p)||!(null==(i=null==p?void 0:p.forceRefetch)?void 0:i.call(p,{currentArg:c,previousArg:f,endpointState:u,state:a})))&&s))},dispatchConditionRejection:!0}),h=(0,i.createAsyncThunk)(r+"/executeMutation",f,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[i.SHOULD_AUTOBATCH]=!0,e}});function m(e){return function(t){var r,n;return(null==(n=null==(r=null==t?void 0:t.meta)?void 0:r.arg)?void 0:n.endpointName)===e}}return{queryThunk:p,mutationThunk:h,prefetch:function(e,t,r){return function(n,o){var i=function(e){return"force"in e}(r)&&r.force,a=function(e){return"ifOlderThan"in e}(r)&&r.ifOlderThan,l=function(r){return void 0===r&&(r=!0),s.endpoints[e].initiate(t,{forceRefetch:r})},u=s.endpoints[e].select(t)(o());if(i)n(l());else if(a){var c=null==u?void 0:u.fulfilledTimeStamp;if(!c)return void n(l());(Number(new Date)-Number(new Date(c)))/1e3>=a&&n(l())}else n(l(!1))}},updateQueryData:function(e,t,r){return function(o,i){var l,u,c=s.endpoints[e].select(t)(i()),f={patches:[],inversePatches:[],undo:function(){return o(s.util.patchQueryData(e,t,f.inversePatches))}};if(c.status===n.uninitialized)return f;if("data"in c)if((0,a.o$)(c.data)){var d=(0,a.aS)(c.data,r),p=d[1],h=d[2];(l=f.patches).push.apply(l,p),(u=f.inversePatches).push.apply(u,h)}else{var m=r(c.data);f.patches.push({op:"replace",path:[],value:m}),f.inversePatches.push({op:"replace",path:[],value:c.data})}return o(s.util.patchQueryData(e,t,f.patches)),f}},upsertQueryData:function(e,t,r){return function(n){var o;return n(s.endpoints[e].initiate(t,((o={subscribe:!1,forceRefetch:!0})[Z]=function(){return{data:r}},o)))}},patchQueryData:function(e,t,r){return function(n){var o=l[e];n(s.internalActions.queryResultPatched({queryCacheKey:u({queryArgs:t,endpointDefinition:o,endpointName:e}),patches:r}))}},buildMatchThunkActions:function(e,t){return{matchPending:(0,i.isAllOf)((0,i.isPending)(e),m(t)),matchFulfilled:(0,i.isAllOf)((0,i.isFulfilled)(e),m(t)),matchRejected:(0,i.isAllOf)((0,i.isRejected)(e),m(t))}}}}({baseQuery:o,reducerPath:l,context:r,api:e,serializeQueryArgs:s}),y=g.queryThunk,_=g.mutationThunk,S=g.patchQueryData,k=g.updateQueryData,O=g.upsertQueryData,E=g.prefetch,C=g.buildMatchThunkActions,P=function(e){var t=e.reducerPath,r=e.queryThunk,o=e.mutationThunk,l=e.context,s=l.endpointDefinitions,c=l.apiUid,f=l.extractRehydrationInfo,d=l.hasRehydrationInfo,p=e.assertTagType,h=e.config,m=(0,i.createAction)(t+"/resetApiState"),v=(0,i.createSlice)({name:t+"/queries",initialState:oe,reducers:{removeQueryResult:{reducer:function(e,t){delete e[t.payload.queryCacheKey]},prepare:(0,i.prepareAutoBatched)()},queryResultPatched:function(e,t){var r=t.payload,n=r.queryCacheKey,o=r.patches;te(e,n,(function(e){e.data=(0,a.QE)(e.data,o.concat())}))}},extraReducers:function(e){e.addCase(r.pending,(function(e,t){var r,o=t.meta,i=t.meta.arg,a=X(i);(i.subscribe||a)&&(null!=e[r=i.queryCacheKey]||(e[r]={status:n.uninitialized,endpointName:i.endpointName})),te(e,i.queryCacheKey,(function(e){e.status=n.pending,e.requestId=a&&e.requestId?e.requestId:o.requestId,void 0!==i.originalArgs&&(e.originalArgs=i.originalArgs),e.startedTimeStamp=o.startedTimeStamp}))})).addCase(r.fulfilled,(function(e,t){var r=t.meta,o=t.payload;te(e,r.arg.queryCacheKey,(function(e){var t;if(e.requestId===r.requestId||X(r.arg)){var i=s[r.arg.endpointName].merge;if(e.status=n.fulfilled,i)if(void 0!==e.data){var l=r.fulfilledTimeStamp,u=r.arg,c=r.baseQueryMeta,f=r.requestId,d=(0,a.ZP)(e.data,(function(e){return i(e,o,{arg:u.originalArgs,baseQueryMeta:c,fulfilledTimeStamp:l,requestId:f})}));e.data=d}else e.data=o;else e.data=null==(t=s[r.arg.endpointName].structuralSharing)||t?j((0,a.mv)(e.data)?(0,a.Js)(e.data):e.data,o):o;delete e.error,e.fulfilledTimeStamp=r.fulfilledTimeStamp}}))})).addCase(r.rejected,(function(e,t){var r=t.meta,o=r.condition,i=r.arg,a=r.requestId,l=t.error,u=t.payload;te(e,i.queryCacheKey,(function(e){if(o);else{if(e.requestId!==a)return;e.status=n.rejected,e.error=null!=u?u:l}}))})).addMatcher(d,(function(e,t){for(var r=f(t).queries,o=0,i=Object.entries(r);o<i.length;o++){var a=i[o],l=a[0],u=a[1];(null==u?void 0:u.status)!==n.fulfilled&&(null==u?void 0:u.status)!==n.rejected||(e[l]=u)}}))}}),g=(0,i.createSlice)({name:t+"/mutations",initialState:oe,reducers:{removeMutationResult:{reducer:function(e,t){var r=re(t.payload);r in e&&delete e[r]},prepare:(0,i.prepareAutoBatched)()}},extraReducers:function(e){e.addCase(o.pending,(function(e,t){var r=t.meta,o=t.meta,i=o.requestId,a=o.arg,l=o.startedTimeStamp;a.track&&(e[re(r)]={requestId:i,status:n.pending,endpointName:a.endpointName,startedTimeStamp:l})})).addCase(o.fulfilled,(function(e,t){var r=t.payload,o=t.meta;o.arg.track&&ne(e,o,(function(e){e.requestId===o.requestId&&(e.status=n.fulfilled,e.data=r,e.fulfilledTimeStamp=o.fulfilledTimeStamp)}))})).addCase(o.rejected,(function(e,t){var r=t.payload,o=t.error,i=t.meta;i.arg.track&&ne(e,i,(function(e){e.requestId===i.requestId&&(e.status=n.rejected,e.error=null!=r?r:o)}))})).addMatcher(d,(function(e,t){for(var r=f(t).mutations,o=0,i=Object.entries(r);o<i.length;o++){var a=i[o],l=a[0],u=a[1];(null==u?void 0:u.status)!==n.fulfilled&&(null==u?void 0:u.status)!==n.rejected||l===(null==u?void 0:u.requestId)||(e[l]=u)}}))}}),y=(0,i.createSlice)({name:t+"/invalidation",initialState:oe,reducers:{},extraReducers:function(e){e.addCase(v.actions.removeQueryResult,(function(e,t){for(var r=t.payload.queryCacheKey,n=0,o=Object.values(e);n<o.length;n++)for(var i=o[n],a=0,l=Object.values(i);a<l.length;a++){var u=l[a],s=u.indexOf(r);-1!==s&&u.splice(s,1)}})).addMatcher(d,(function(e,t){for(var r,n,o,i,a=f(t).provided,l=0,u=Object.entries(a);l<u.length;l++)for(var s=u[l],c=s[0],d=s[1],p=0,h=Object.entries(d);p<h.length;p++)for(var m=h[p],v=m[0],g=m[1],y=null!=(i=(n=null!=(r=e[c])?r:e[c]={})[o=v||"__internal_without_id"])?i:n[o]=[],b=0,w=g;b<w.length;b++){var _=w[b];y.includes(_)||y.push(_)}})).addMatcher((0,i.isAnyOf)((0,i.isFulfilled)(r),(0,i.isRejectedWithValue)(r)),(function(e,t){for(var r,n,o,i,a=ee(t,"providesTags",s,p),l=t.meta.arg.queryCacheKey,u=0,c=Object.values(e);u<c.length;u++)for(var f=c[u],d=0,h=Object.values(f);d<h.length;d++){var m=h[d],v=m.indexOf(l);-1!==v&&m.splice(v,1)}for(var g=0,y=a;g<y.length;g++){var b=y[g],w=b.type,_=b.id,x=null!=(i=(n=null!=(r=e[w])?r:e[w]={})[o=_||"__internal_without_id"])?i:n[o]=[];x.includes(l)||x.push(l)}}))}}),_=(0,i.createSlice)({name:t+"/subscriptions",initialState:oe,reducers:{updateSubscriptionOptions:function(e,t){},unsubscribeQueryResult:function(e,t){},internal_probeSubscription:function(e,t){}}}),x=(0,i.createSlice)({name:t+"/internalSubscriptions",initialState:oe,reducers:{subscriptionsUpdated:{reducer:function(e,t){return(0,a.QE)(e,t.payload)},prepare:(0,i.prepareAutoBatched)()}}}),S=(0,i.createSlice)({name:t+"/config",initialState:b({online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1},h),reducers:{middlewareRegistered:function(e,t){var r=t.payload;e.middlewareRegistered="conflict"!==e.middlewareRegistered&&c===r||"conflict"}},extraReducers:function(e){e.addCase(W,(function(e){e.online=!0})).addCase(V,(function(e){e.online=!1})).addCase(H,(function(e){e.focused=!0})).addCase(U,(function(e){e.focused=!1})).addMatcher(d,(function(e){return b({},e)}))}}),k=(0,u.UY)({queries:v.reducer,mutations:g.reducer,provided:y.reducer,subscriptions:x.reducer,config:S.reducer});return{reducer:function(e,t){return k(m.match(t)?void 0:e,t)},actions:w(b(b(b(b(b({},S.actions),v.actions),_.actions),x.actions),g.actions),{unsubscribeMutationResult:g.actions.removeMutationResult,resetApiState:m})}}({context:r,queryThunk:y,mutationThunk:_,reducerPath:l,assertTagType:v,config:{refetchOnFocus:h,refetchOnReconnect:m,refetchOnMountOrArgChange:p,keepUnusedDataFor:d,reducerPath:l}}),L=P.reducer,M=P.actions;Ee(e.util,{patchQueryData:S,updateQueryData:k,upsertQueryData:O,prefetch:E,resetApiState:M.resetApiState}),Ee(e.internalActions,M);var A=Oe({reducerPath:l,context:r,queryThunk:y,mutationThunk:_,api:e,assertTagType:v}),T=A.middleware,R=A.actions;Ee(e.util,R),Ee(e,{reducer:L,middleware:T});var D=ce({serializeQueryArgs:s,reducerPath:l}),z=D.buildQuerySelector,F=D.buildMutationSelector,B=D.selectInvalidatedBy;Ee(e.util,{selectInvalidatedBy:B});var q=function(e){var t=e.serializeQueryArgs,r=e.queryThunk,n=e.mutationThunk,o=e.api,i=e.context,a=new Map,l=new Map,u=o.internalActions,s=u.unsubscribeQueryResult,d=u.removeMutationResult,p=u.updateSubscriptionOptions;return{buildInitiateQuery:function(e,n){var i=function(l,u){var f=void 0===u?{}:u,d=f.subscribe,m=void 0===d||d,v=f.forceRefetch,g=f.subscriptionOptions,y=f[Z];return function(u,f){var d,b,w=t({queryArgs:l,endpointDefinition:n,endpointName:e}),_=r(((d={type:"query",subscribe:m,forceRefetch:v,subscriptionOptions:g,endpointName:e,originalArgs:l,queryCacheKey:w})[Z]=y,d)),S=o.endpoints[e].select(l),k=u(_),O=S(f());h(u);var E=k.requestId,C=k.abort,j=O.requestId!==E,P=null==(b=a.get(u))?void 0:b[w],L=function(){return S(f())},M=Object.assign(y?k.then(L):j&&!P?Promise.resolve(O):Promise.all([P,k]).then(L),{arg:l,requestId:E,subscriptionOptions:g,queryCacheKey:w,abort:C,unwrap:function(){return x(this,null,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return[4,M];case 1:if((e=t.sent()).isError)throw e.error;return[2,e.data]}}))}))},refetch:function(){return u(i(l,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){m&&u(s({queryCacheKey:w,requestId:E}))},updateSubscriptionOptions:function(t){M.subscriptionOptions=t,u(p({endpointName:e,requestId:E,queryCacheKey:w,options:t}))}});if(!P&&!j&&!y){var A=a.get(u)||{};A[w]=M,a.set(u,A),M.then((function(){delete A[w],Object.keys(A).length||a.delete(u)}))}return M}};return i},buildInitiateMutation:function(e){return function(t,r){var o=void 0===r?{}:r,i=o.track,a=void 0===i||i,u=o.fixedCacheKey;return function(r,o){var i=n({type:"mutation",endpointName:e,originalArgs:t,track:a,fixedCacheKey:u}),s=r(i);h(r);var c=s.requestId,f=s.abort,p=s.unwrap,m=s.unwrap().then((function(e){return{data:e}})).catch((function(e){return{error:e}})),v=function(){r(d({requestId:c,fixedCacheKey:u}))},g=Object.assign(m,{arg:s.arg,requestId:c,abort:f,unwrap:p,unsubscribe:v,reset:v}),y=l.get(r)||{};return l.set(r,y),y[c]=g,g.then((function(){delete y[c],Object.keys(y).length||l.delete(r)})),u&&(y[u]=g,g.then((function(){y[u]===g&&(delete y[u],Object.keys(y).length||l.delete(r))}))),g}}},getRunningQueryThunk:function(e,r){return function(n){var o,l=i.endpointDefinitions[e],u=t({queryArgs:r,endpointDefinition:l,endpointName:e});return null==(o=a.get(n))?void 0:o[u]}},getRunningMutationThunk:function(e,t){return function(e){var r;return null==(r=l.get(e))?void 0:r[t]}},getRunningQueriesThunk:function(){return function(e){return Object.values(a.get(e)||{}).filter(Q)}},getRunningMutationsThunk:function(){return function(e){return Object.values(l.get(e)||{}).filter(Q)}},getRunningOperationPromises:function(){var e=function(e){return Array.from(e.values()).flatMap((function(e){return e?Object.values(e):[]}))};return f(f([],e(a)),e(l)).filter(Q)},removalWarning:function(){throw new Error("This method had to be removed due to a conceptual bug in RTK.\n Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.\n See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.")}};function h(e){}}({queryThunk:y,mutationThunk:_,api:e,serializeQueryArgs:s,context:r}),G=q.buildInitiateQuery,K=q.buildInitiateMutation,$=q.getRunningMutationThunk,ie=q.getRunningMutationsThunk,ae=q.getRunningQueriesThunk,le=q.getRunningQueryThunk,ue=q.getRunningOperationPromises,se=q.removalWarning;return Ee(e.util,{getRunningOperationPromises:ue,getRunningOperationPromise:se,getRunningMutationThunk:$,getRunningMutationsThunk:ie,getRunningQueryThunk:le,getRunningQueriesThunk:ae}),{name:Ce,injectEndpoint:function(t,r){var n,o=e;null!=(n=o.endpoints)[t]||(n[t]={}),Y(r)?Ee(o.endpoints[t],{name:t,select:z(t,r),initiate:G(t,r)},C(y,t)):r.type===N.mutation&&Ee(o.endpoints[t],{name:t,select:F(),initiate:K(t)},C(_,t))}}}}},Pe=(je(),r(87363)),Le=r.n(Pe),Me=r(36113),Ae=function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Te=Object.defineProperty,Ie=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Fe=function(e,t,r){return t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Be=function(e,t){for(var r in t||(t={}))De.call(t,r)&&Fe(e,r,t[r]);if(Ne)for(var n=0,o=Ne(t);n<o.length;n++){r=o[n];ze.call(t,r)&&Fe(e,r,t[r])}return e},He=function(e,t){return Ie(e,Re(t))};function Ue(e,t,r,n){var o=(0,Pe.useMemo)((function(){return{queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:r,endpointName:n}):e}}),[e,t,r,n]),i=(0,Pe.useRef)(o);return(0,Pe.useEffect)((function(){i.current.serialized!==o.serialized&&(i.current=o)}),[o]),i.current.serialized===o.serialized?i.current.queryArgs:e}var We=Symbol();function Ve(e){var t=(0,Pe.useRef)(e);return(0,Pe.useEffect)((function(){(0,Me.shallowEqual)(t.current,e)||(t.current=e)}),[e]),(0,Me.shallowEqual)(t.current,e)?t.current:e}var qe,Ge=WeakMap?new WeakMap:void 0,Ye=function(e){var t=e.endpointName,r=e.queryArgs,n="",o=null==Ge?void 0:Ge.get(r);if("string"==typeof o)n=o;else{var a=JSON.stringify(r,(function(e,t){return(0,i.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{}):t}));(0,i.isPlainObject)(r)&&(null==Ge||Ge.set(r,a)),n=a}return t+"("+n+")"},Ke="undefined"!=typeof window&&window.document&&window.document.createElement?Pe.useLayoutEffect:Pe.useEffect,$e=function(e){return e},Qe=function(e){return e.isUninitialized?He(Be({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:n.pending}):e};function Ze(e){return e.replace(e[0],e[0].toUpperCase())}function Xe(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Object.assign.apply(Object,Ae([e],t))}!function(e){e.query="query",e.mutation="mutation"}(qe||(qe={}));var Je=Symbol(),et=function(e){var t=void 0===e?{}:e,r=t.batch,n=void 0===r?Me.batch:r,o=t.useDispatch,i=void 0===o?Me.useDispatch:o,a=t.useSelector,u=void 0===a?Me.useSelector:a,s=t.useStore,c=void 0===s?Me.useStore:s,f=t.unstable__sideEffectsInRender,d=void 0!==f&&f;return{name:Je,init:function(e,t,r){var o=t.serializeQueryArgs,a=e,s=function(e){var t=e.api,r=e.moduleOptions,n=r.batch,o=r.useDispatch,i=r.useSelector,a=r.useStore,u=r.unstable__sideEffectsInRender,s=e.serializeQueryArgs,c=e.context,f=u?function(e){return e()}:Pe.useEffect;return{buildQueryHooks:function(e){var r=function(r,n){var i=void 0===n?{}:n,a=i.refetchOnReconnect,l=i.refetchOnFocus,u=i.refetchOnMountOrArgChange,s=i.skip,d=void 0!==s&&s,p=i.pollingInterval,h=void 0===p?0:p,m=t.endpoints[e].initiate,v=o(),g=Ue(d?ie:r,Ye,c.endpointDefinitions[e],e),y=Ve({refetchOnReconnect:a,refetchOnFocus:l,pollingInterval:h}),b=(0,Pe.useRef)(!1),w=(0,Pe.useRef)(),_=w.current||{},x=_.queryCacheKey,S=_.requestId,k=!1;if(x&&S){var O=v(t.internalActions.internal_probeSubscription({queryCacheKey:x,requestId:S}));k=!!O}var E=!k&&b.current;return f((function(){b.current=k})),f((function(){E&&(w.current=void 0)}),[E]),f((function(){var e,t=w.current;if(g===ie)return null==t||t.unsubscribe(),void(w.current=void 0);var r=null==(e=w.current)?void 0:e.subscriptionOptions;if(t&&t.arg===g)y!==r&&t.updateSubscriptionOptions(y);else{null==t||t.unsubscribe();var n=v(m(g,{subscriptionOptions:y,forceRefetch:u}));w.current=n}}),[v,m,u,g,y,E]),(0,Pe.useEffect)((function(){return function(){var e;null==(e=w.current)||e.unsubscribe(),w.current=void 0}}),[]),(0,Pe.useMemo)((function(){return{refetch:function(){var e;if(!w.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=w.current)?void 0:e.refetch()}}}),[])},u=function(r){var i=void 0===r?{}:r,a=i.refetchOnReconnect,l=i.refetchOnFocus,u=i.pollingInterval,s=void 0===u?0:u,c=t.endpoints[e].initiate,d=o(),p=(0,Pe.useState)(We),h=p[0],m=p[1],v=(0,Pe.useRef)(),g=Ve({refetchOnReconnect:a,refetchOnFocus:l,pollingInterval:s});f((function(){var e,t,r=null==(e=v.current)?void 0:e.subscriptionOptions;g!==r&&(null==(t=v.current)||t.updateSubscriptionOptions(g))}),[g]);var y=(0,Pe.useRef)(g);f((function(){y.current=g}),[g]);var b=(0,Pe.useCallback)((function(e,t){var r;return void 0===t&&(t=!1),n((function(){var n;null==(n=v.current)||n.unsubscribe(),v.current=r=d(c(e,{subscriptionOptions:y.current,forceRefetch:!t})),m(e)})),r}),[d,c]);return(0,Pe.useEffect)((function(){return function(){var e;null==(e=null==v?void 0:v.current)||e.unsubscribe()}}),[]),(0,Pe.useEffect)((function(){h===We||v.current||b(h,!0)}),[h,b]),(0,Pe.useMemo)((function(){return[b,h]}),[b,h])},p=function(r,n){var o=void 0===n?{}:n,u=o.skip,f=void 0!==u&&u,p=o.selectFromResult,h=t.endpoints[e].select,m=Ue(f?ie:r,s,c.endpointDefinitions[e],e),v=(0,Pe.useRef)(),g=(0,Pe.useMemo)((function(){return(0,l.P1)([h(m),function(e,t){return t},function(e){return m}],d)}),[h,m]),y=(0,Pe.useMemo)((function(){return p?(0,l.P1)([g],p):g}),[g,p]),b=i((function(e){return y(e,v.current)}),Me.shallowEqual),w=a(),_=g(w.getState(),v.current);return Ke((function(){v.current=_}),[_]),b};return{useQueryState:p,useQuerySubscription:r,useLazyQuerySubscription:u,useLazyQuery:function(e){var t=u(e),r=t[0],n=t[1],o=p(n,He(Be({},e),{skip:n===We})),i=(0,Pe.useMemo)((function(){return{lastArg:n}}),[n]);return(0,Pe.useMemo)((function(){return[r,o,i]}),[r,o,i])},useQuery:function(e,t){var n=r(e,t),o=p(e,Be({selectFromResult:e===ie||(null==t?void 0:t.skip)?void 0:Qe},t)),i=o.data,a=o.status,l=o.isLoading,u=o.isSuccess,s=o.isError,c=o.error;return(0,Pe.useDebugValue)({data:i,status:a,isLoading:l,isSuccess:u,isError:s,error:c}),(0,Pe.useMemo)((function(){return Be(Be({},o),n)}),[o,n])}}},buildMutationHook:function(e){return function(r){var a=void 0===r?{}:r,u=a.selectFromResult,s=void 0===u?$e:u,c=a.fixedCacheKey,f=t.endpoints[e],d=f.select,p=f.initiate,h=o(),m=(0,Pe.useState)(),v=m[0],g=m[1];(0,Pe.useEffect)((function(){return function(){(null==v?void 0:v.arg.fixedCacheKey)||null==v||v.reset()}}),[v]);var y=(0,Pe.useCallback)((function(e){var t=h(p(e,{fixedCacheKey:c}));return g(t),t}),[h,p,c]),b=(v||{}).requestId,w=(0,Pe.useMemo)((function(){return(0,l.P1)([d({fixedCacheKey:c,requestId:null==v?void 0:v.requestId})],s)}),[d,v,s,c]),_=i(w,Me.shallowEqual),x=null==c?null==v?void 0:v.arg.originalArgs:void 0,S=(0,Pe.useCallback)((function(){n((function(){v&&g(void 0),c&&h(t.internalActions.removeMutationResult({requestId:b,fixedCacheKey:c}))}))}),[h,c,v,b]),k=_.endpointName,O=_.data,E=_.status,C=_.isLoading,j=_.isSuccess,P=_.isError,L=_.error;(0,Pe.useDebugValue)({endpointName:k,data:O,status:E,isLoading:C,isSuccess:j,isError:P,error:L});var M=(0,Pe.useMemo)((function(){return He(Be({},_),{originalArgs:x,reset:S})}),[_,x,S]);return(0,Pe.useMemo)((function(){return[y,M]}),[y,M])}},usePrefetch:function(e,r){var n=o(),i=Ve(r);return(0,Pe.useCallback)((function(r,o){return n(t.util.prefetch(e,r,Be(Be({},i),o)))}),[e,n,i])}};function d(e,t,r){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var n=t.endpointName,o=c.endpointDefinitions[n];s({queryArgs:t.originalArgs,endpointDefinition:o,endpointName:n})===s({queryArgs:r,endpointDefinition:o,endpointName:n})&&(t=void 0)}var i=e.isSuccess?e.data:null==t?void 0:t.data;void 0===i&&(i=e.data);var a=void 0!==i,l=e.isLoading,u=!a&&l,f=e.isSuccess||l&&a;return He(Be({},e),{data:i,currentData:e.data,isFetching:l,isLoading:u,isSuccess:f})}}({api:e,moduleOptions:{batch:n,useDispatch:i,useSelector:u,useStore:c,unstable__sideEffectsInRender:d},serializeQueryArgs:o,context:r}),f=s.buildQueryHooks,p=s.buildMutationHook,h=s.usePrefetch;return Xe(a,{usePrefetch:h}),Xe(r,{batch:n}),{injectEndpoint:function(t,r){if(r.type===qe.query){var n=f(t),o=n.useQuery,i=n.useLazyQuery,l=n.useLazyQuerySubscription,u=n.useQueryState,s=n.useQuerySubscription;Xe(a.endpoints[t],{useQuery:o,useLazyQuery:i,useLazyQuerySubscription:l,useQueryState:u,useQuerySubscription:s}),e["use"+Ze(t)+"Query"]=o,e["useLazy"+Ze(t)+"Query"]=i}else if(function(e){return e.type===qe.mutation}(r)){var c=p(t);Xe(a.endpoints[t],{useMutation:c}),e["use"+Ze(t)+"Mutation"]=c}}}}}};function tt(e){var t=Le().useState((function(){var t;return(0,i.configureStore)({reducer:(t={},t[e.api.reducerPath]=e.api.reducer,t),middleware:function(t){return t().concat(e.api.middleware)}})}))[0];return(0,Pe.useEffect)((function(){return!1===e.setupListeners?void 0:G(t.dispatch,e.setupListeners)}),[e.setupListeners,t.dispatch]),Le().createElement(Me.Provider,{store:t,context:e.context},e.children)}var rt=pe(je(),et())},24268:(e,t,r)=>{"use strict";r.r(t),r.d(t,{EnhancerArray:()=>C,MiddlewareArray:()=>E,SHOULD_AUTOBATCH:()=>Ke,TaskAbortError:()=>Ce,__DO_NOT_USE__ActionTypes:()=>o.Kf,addListener:()=>Ue,applyMiddleware:()=>o.md,autoBatchEnhancer:()=>Je,bindActionCreators:()=>o.DE,clearAllListeners:()=>We,combineReducers:()=>o.UY,compose:()=>o.qC,configureStore:()=>D,createAction:()=>z,createAsyncThunk:()=>ne,createDraftSafeSelector:()=>S,createEntityAdapter:()=>Z,createImmutableStateInvariantMiddleware:()=>L,createListenerMiddleware:()=>Ge,createNextState:()=>n.ZP,createReducer:()=>V,createSelector:()=>i.P1,createSerializableStateInvariantMiddleware:()=>I,createSlice:()=>q,createStore:()=>o.MT,current:()=>n.Vk,findNonSerializableValue:()=>A,freeze:()=>n.vV,getDefaultMiddleware:()=>R,getType:()=>U,isAction:()=>F,isAllOf:()=>le,isAnyOf:()=>ae,isAsyncThunkAction:()=>he,isDraft:()=>n.mv,isFluxStandardAction:()=>B,isFulfilled:()=>pe,isImmutableDefault:()=>P,isPending:()=>ce,isPlain:()=>M,isPlainObject:()=>O,isRejected:()=>fe,isRejectedWithValue:()=>de,legacy_createStore:()=>o.jB,miniSerializeError:()=>re,nanoid:()=>X,original:()=>n.Js,prepareAutoBatched:()=>$e,removeListener:()=>Ve,unwrapResult:()=>oe});var n=r(12902),o=r(14791),i=r(22222);function a(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var l=a();l.withExtraArgument=a;const u=l;var s,c=(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}},d=function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},p=Object.defineProperty,h=Object.defineProperties,m=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,b=function(e,t,r){return t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},w=function(e,t){for(var r in t||(t={}))g.call(t,r)&&b(e,r,t[r]);if(v)for(var n=0,o=v(t);n<o.length;n++){r=o[n];y.call(t,r)&&b(e,r,t[r])}return e},_=function(e,t){return h(e,m(t))},x=function(e,t,r){return new Promise((function(n,o){var i=function(e){try{l(r.next(e))}catch(e){o(e)}},a=function(e){try{l(r.throw(e))}catch(e){o(e)}},l=function(e){return e.done?n(e.value):Promise.resolve(e.value).then(i,a)};l((r=r.apply(e,t)).next())}))},S=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.P1.apply(void 0,e);return function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return r.apply(void 0,d([(0,n.mv)(e)?(0,n.Vk)(e):e],t))}},k="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?o.qC:o.qC.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function O(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return t===r}var E=function(e){function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array),C=function(e){function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array);function j(e){return(0,n.o$)(e)?(0,n.ZP)(e,(function(){})):e}function P(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function L(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function M(e){var t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||O(e)}function A(e,t,r,n,o,i){var a;if(void 0===t&&(t=""),void 0===r&&(r=M),void 0===o&&(o=[]),!r(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(null==i?void 0:i.has(e))return!1;for(var l=null!=n?n(e):Object.entries(e),u=o.length>0,s=function(e,l){var s=t?t+"."+e:e;if(u&&o.some((function(e){return e instanceof RegExp?e.test(s):s===e})))return"continue";return r(l)?"object"==typeof l&&(a=A(l,s,r,n,o,i))?{value:a}:void 0:{value:{keyPath:s,value:l}}},c=0,f=l;c<f.length;c++){var d=f[c],p=s(d[0],d[1]);if("object"==typeof p)return p.value}return i&&T(e)&&i.add(e),!1}function T(e){if(!Object.isFrozen(e))return!1;for(var t=0,r=Object.values(e);t<r.length;t++){var n=r[t];if("object"==typeof n&&null!==n&&!T(n))return!1}return!0}function I(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function R(e){void 0===e&&(e={});var t=e.thunk,r=void 0===t||t,n=(e.immutableCheck,e.serializableCheck,new E);return r&&("boolean"==typeof r?n.push(u):n.push(u.withExtraArgument(r.extraArgument))),n}var N=!0;function D(e){var t,r=function(e){return R(e)},n=e||{},i=n.reducer,a=void 0===i?void 0:i,l=n.middleware,u=void 0===l?r():l,s=n.devTools,c=void 0===s||s,f=n.preloadedState,p=void 0===f?void 0:f,h=n.enhancers,m=void 0===h?void 0:h;if("function"==typeof a)t=a;else{if(!O(a))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=(0,o.UY)(a)}var v=u;if("function"==typeof v&&(v=v(r),!N&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!N&&v.some((function(e){return"function"!=typeof e})))throw new Error("each middleware provided to configureStore must be a function");var g=o.md.apply(void 0,v),y=o.qC;c&&(y=k(w({trace:!N},"object"==typeof c&&c)));var b=new C(g),_=b;Array.isArray(m)?_=d([g],m):"function"==typeof m&&(_=m(b));var x=y.apply(void 0,_);return(0,o.MT)(t,p,x)}function z(e,t){function r(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return w(w({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(t){return t.type===e},r}function F(e){return O(e)&&"type"in e}function B(e){return F(e)&&"string"==typeof e.type&&Object.keys(e).every(H)}function H(e){return["type","payload","error","meta"].indexOf(e)>-1}function U(e){return""+e}function W(e){var t,r={},n=[],o={addCase:function(e,t){var n="string"==typeof e?e:e.type;if(n in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[n]=t,o},addMatcher:function(e,t){return n.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[r,n,t]}function V(e,t,r,o){void 0===r&&(r=[]);var i,a="function"==typeof t?W(t):[t,r,o],l=a[0],u=a[1],s=a[2];if("function"==typeof e)i=function(){return j(e())};else{var c=j(e);i=function(){return c}}function f(e,t){void 0===e&&(e=i());var r=d([l[t.type]],u.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===r.filter((function(e){return!!e})).length&&(r=[s]),r.reduce((function(e,r){if(r){var o;if((0,n.mv)(e))return void 0===(o=r(e,t))?e:o;if((0,n.o$)(e))return(0,n.ZP)(e,(function(e){return r(e,t)}));if(void 0===(o=r(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return e}),e)}return f.getInitialState=i,f}function q(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r,n="function"==typeof e.initialState?e.initialState:j(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},l={},u={};function s(){var t="function"==typeof e.extraReducers?W(e.extraReducers):[e.extraReducers],r=t[0],o=void 0===r?{}:r,i=t[1],a=void 0===i?[]:i,u=t[2],s=void 0===u?void 0:u,c=w(w({},o),l);return V(n,(function(e){for(var t in c)e.addCase(t,c[t]);for(var r=0,n=a;r<n.length;r++){var o=n[r];e.addMatcher(o.matcher,o.reducer)}s&&e.addDefaultCase(s)}))}return i.forEach((function(e){var r,n,i=o[e],s=t+"/"+e;"reducer"in i?(r=i.reducer,n=i.prepare):r=i,a[e]=r,l[s]=r,u[e]=n?z(s,n):z(s)})),{name:t,reducer:function(e,t){return r||(r=s()),r(e,t)},actions:u,caseReducers:a,getInitialState:function(){return r||(r=s()),r.getInitialState()}}}function G(e){return function(t,r){var o=function(t){B(r)?e(r.payload,t):e(r,t)};return(0,n.mv)(t)?(o(t),t):(0,n.ZP)(t,o)}}function Y(e,t){return t(e)}function K(e){return Array.isArray(e)||(e=Object.values(e)),e}function $(e,t,r){for(var n=[],o=[],i=0,a=e=K(e);i<a.length;i++){var l=a[i],u=Y(l,t);u in r.entities?o.push({id:u,changes:l}):n.push(l)}return[n,o]}function Q(e){function t(t,r){var n=Y(t,e);n in r.entities||(r.ids.push(n),r.entities[n]=t)}function r(e,r){for(var n=0,o=e=K(e);n<o.length;n++){t(o[n],r)}}function n(t,r){var n=Y(t,e);n in r.entities||r.ids.push(n),r.entities[n]=t}function o(e,t){var r=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],r=!0)})),r&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,r){var n={},o={};if(t.forEach((function(e){e.id in r.entities&&(o[e.id]={id:e.id,changes:w(w({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){var i=t.filter((function(t){return function(t,r,n){var o=n.entities[r.id],i=Object.assign({},o,r.changes),a=Y(i,e),l=a!==r.id;return l&&(t[r.id]=a,delete n.entities[r.id]),n.entities[a]=i,l}(n,t,r)})).length>0;i&&(r.ids=Object.keys(r.entities))}}function a(t,n){var o=$(t,e,n),a=o[0];i(o[1],n),r(a,n)}return{removeAll:(l=function(e){Object.assign(e,{ids:[],entities:{}})},u=G((function(e,t){return l(t)})),function(e){return u(e,void 0)}),addOne:G(t),addMany:G(r),setOne:G(n),setMany:G((function(e,t){for(var r=0,o=e=K(e);r<o.length;r++){n(o[r],t)}})),setAll:G((function(e,t){e=K(e),t.ids=[],t.entities={},r(e,t)})),updateOne:G((function(e,t){return i([e],t)})),updateMany:G(i),upsertOne:G((function(e,t){return a([e],t)})),upsertMany:G(a),removeOne:G((function(e,t){return o([e],t)})),removeMany:G(o)};var l,u}function Z(e){void 0===e&&(e={});var t=w({sortComparer:!1,selectId:function(e){return e.id}},e),r=t.selectId,n=t.sortComparer,o={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){var t=function(e){return e.ids},r=function(e){return e.entities},n=S(t,r,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},a=S(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:r,selectAll:n,selectTotal:a,selectById:S(r,o,i)};var l=S(e,r);return{selectIds:S(e,t),selectEntities:l,selectAll:S(e,n),selectTotal:S(e,a),selectById:S(l,o,i)}}},a=n?function(e,t){var r=Q(e);function n(t,r){var n=(t=K(t)).filter((function(t){return!(Y(t,e)in r.entities)}));0!==n.length&&l(n,r)}function o(e,t){0!==(e=K(e)).length&&l(e,t)}function i(t,r){for(var n=!1,o=0,i=t;o<i.length;o++){var a=i[o],l=r.entities[a.id];if(l){n=!0,Object.assign(l,a.changes);var s=e(l);a.id!==s&&(delete r.entities[a.id],r.entities[s]=l)}}n&&u(r)}function a(t,r){var o=$(t,e,r),a=o[0];i(o[1],r),n(a,r)}function l(t,r){t.forEach((function(t){r.entities[e(t)]=t})),u(r)}function u(r){var n=Object.values(r.entities);n.sort(t);var o=n.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!1;return!0})(r.ids,o)||(r.ids=o)}return{removeOne:r.removeOne,removeMany:r.removeMany,removeAll:r.removeAll,addOne:G((function(e,t){return n([e],t)})),updateOne:G((function(e,t){return i([e],t)})),upsertOne:G((function(e,t){return a([e],t)})),setOne:G((function(e,t){return o([e],t)})),setMany:G(o),setAll:G((function(e,t){e=K(e),t.entities={},t.ids=[],n(e,t)})),addMany:G(n),updateMany:G(i),upsertMany:G(a)}}(r,n):Q(r);return w(w(w({selectId:r,sortComparer:n},o),i),a)}var X=function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},J=["name","message","stack","code"],ee=function(e,t){this.payload=e,this.meta=t},te=function(e,t){this.payload=e,this.meta=t},re=function(e){if("object"==typeof e&&null!==e){for(var t={},r=0,n=J;r<n.length;r++){var o=n[r];"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}},ne=function(){function e(e,t,r){var n=z(e+"/fulfilled",(function(e,t,r,n){return{payload:e,meta:_(w({},n||{}),{arg:r,requestId:t,requestStatus:"fulfilled"})}})),o=z(e+"/pending",(function(e,t,r){return{payload:void 0,meta:_(w({},r||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=z(e+"/rejected",(function(e,t,n,o,i){return{payload:o,error:(r&&r.serializeError||re)(e||"Rejected"),meta:_(w({},i||{}),{arg:n,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(l,u,s){var c,d=(null==r?void 0:r.idGenerator)?r.idGenerator(e):X(),p=new a;function h(e){c=e,p.abort()}var m=function(){return x(this,null,(function(){var a,m,v,g,y,b;return f(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),g=null==(a=null==r?void 0:r.condition)?void 0:a.call(r,e,{getState:u,extra:s}),null===(w=g)||"object"!=typeof w||"function"!=typeof w.then?[3,2]:[4,g];case 1:g=f.sent(),f.label=2;case 2:if(!1===g||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return!0,y=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:c||"Aborted"})}))})),l(o(d,e,null==(m=null==r?void 0:r.getPendingMeta)?void 0:m.call(r,{requestId:d,arg:e},{getState:u,extra:s}))),[4,Promise.race([y,Promise.resolve(t(e,{dispatch:l,getState:u,extra:s,requestId:d,signal:p.signal,abort:h,rejectWithValue:function(e,t){return new ee(e,t)},fulfillWithValue:function(e,t){return new te(e,t)}})).then((function(t){if(t instanceof ee)throw t;return t instanceof te?n(t.payload,d,e,t.meta):n(t,d,e)}))])];case 3:return v=f.sent(),[3,5];case 4:return b=f.sent(),v=b instanceof ee?i(null,d,e,b.payload,b.meta):i(b,d,e),[3,5];case 5:return r&&!r.dispatchConditionRejection&&i.match(v)&&v.meta.condition||l(v),[2,v]}var w}))}))}();return Object.assign(m,{abort:h,requestId:d,arg:e,unwrap:function(){return m.then(oe)}})}}),{pending:o,rejected:i,fulfilled:n,typePrefix:e})}return e.withTypes=function(){return e},e}();function oe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var ie=function(e,t){return(r=e)&&"function"==typeof r.match?e.match(t):e(t);var r};function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return ie(e,t)}))}}function le(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return ie(e,t)}))}}function ue(e,t){if(!e||!e.meta)return!1;var r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function se(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ue(e,["pending"])}:se(e)?function(t){var r=e.map((function(e){return e.pending}));return ae.apply(void 0,r)(t)}:ce()(e[0])}function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ue(e,["rejected"])}:se(e)?function(t){var r=e.map((function(e){return e.rejected}));return ae.apply(void 0,r)(t)}:fe()(e[0])}function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||se(e)?function(t){return le(fe.apply(void 0,e),r)(t)}:de()(e[0])}function pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ue(e,["fulfilled"])}:se(e)?function(t){var r=e.map((function(e){return e.fulfilled}));return ae.apply(void 0,r)(t)}:pe()(e[0])}function he(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return ue(e,["pending","fulfilled","rejected"])}:se(e)?function(t){for(var r=[],n=0,o=e;n<o.length;n++){var i=o[n];r.push(i.pending,i.rejected,i.fulfilled)}return ae.apply(void 0,r)(t)}:he()(e[0])}var me=function(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function")},ve=function(){},ge=function(e,t){return void 0===t&&(t=ve),e.catch(t),e},ye=function(e,t){return e.addEventListener("abort",t,{once:!0}),function(){return e.removeEventListener("abort",t)}},be=function(e,t){var r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},we="listener",_e="completed",xe="cancelled",Se="task-"+xe,ke="task-"+_e,Oe=we+"-"+xe,Ee=we+"-"+_e,Ce=function(e){this.code=e,this.name="TaskAbortError",this.message="task "+xe+" (reason: "+e+")"},je=function(e){if(e.aborted)throw new Ce(e.reason)};function Pe(e,t){var r=ve;return new Promise((function(n,o){var i=function(){return o(new Ce(e.reason))};e.aborted?i():(r=ye(e,i),t.finally((function(){return r()})).then(n,o))})).finally((function(){r=ve}))}var Le=function(e){return function(t){return ge(Pe(e,t).then((function(t){return je(e),t})))}},Me=function(e){var t=Le(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},Ae=Object.assign,Te={},Ie="listenerMiddleware",Re=function(e){return function(t){me(t,"taskExecutor");var r,n=new AbortController;r=n,ye(e,(function(){return be(r,e.reason)}));var o,i,a=(o=function(){return x(void 0,null,(function(){var r;return f(this,(function(o){switch(o.label){case 0:return je(e),je(n.signal),[4,t({pause:Le(n.signal),delay:Me(n.signal),signal:n.signal})];case 1:return r=o.sent(),je(n.signal),[2,r]}}))}))},i=function(){return be(n,ke)},x(void 0,null,(function(){var e;return f(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,o()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Ce?"cancelled":"rejected",error:e}];case 4:return null==i||i(),[7];case 5:return[2]}}))})));return{result:Le(e)(a),cancel:function(){be(n,Se)}}}},Ne=function(e,t){return function(r,n){return ge(function(r,n){return x(void 0,null,(function(){var o,i,a,l;return f(this,(function(u){switch(u.label){case 0:je(t),o=function(){},i=new Promise((function(t,n){var i=e({predicate:r,effect:function(e,r){r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});o=function(){i(),n()}})),a=[i],null!=n&&a.push(new Promise((function(e){return setTimeout(e,n,null)}))),u.label=1;case 1:return u.trys.push([1,,3,4]),[4,Pe(t,Promise.race(a))];case 2:return l=u.sent(),je(t),[2,l];case 3:return o(),[7];case 4:return[2]}}))}))}(r,n))}},De=function(e){var t=e.type,r=e.actionCreator,n=e.matcher,o=e.predicate,i=e.effect;if(t)o=z(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return me(i,"options.listener"),{predicate:o,type:t,effect:i}},ze=function(e){var t=De(e),r=t.type,n=t.predicate,o=t.effect;return{id:X(),effect:o,type:r,predicate:n,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}},Fe=function(e){e.pending.forEach((function(e){be(e,Oe)}))},Be=function(e){return function(){e.forEach(Fe),e.clear()}},He=function(e,t,r){try{e(t,r)}catch(e){setTimeout((function(){throw e}),0)}},Ue=z(Ie+"/add"),We=z(Ie+"/removeAll"),Ve=z(Ie+"/remove"),qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,d([Ie+"/error"],e))};function Ge(e){var t=this;void 0===e&&(e={});var r=new Map,n=e.extra,o=e.onError,i=void 0===o?qe:o;me(i,"onError");var a=function(e){for(var t=0,n=Array.from(r.values());t<n.length;t++){var o=n[t];if(e(o))return o}},l=function(e){var t=a((function(t){return t.effect===e.effect}));return t||(t=ze(e)),function(e){return e.unsubscribe=function(){return r.delete(e.id)},r.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Fe(e)}}(t)},u=function(e){var t=De(e),r=t.type,n=t.effect,o=t.predicate,i=a((function(e){return("string"==typeof r?e.type===r:e.predicate===o)&&e.effect===n}));return i&&(i.unsubscribe(),e.cancelActive&&Fe(i)),!!i},s=function(e,o,a,u){return x(t,null,(function(){var t,s,c;return f(this,(function(f){switch(f.label){case 0:t=new AbortController,s=Ne(l,t.signal),f.label=1;case 1:return f.trys.push([1,3,4,5]),e.pending.add(t),[4,Promise.resolve(e.effect(o,Ae({},a,{getOriginalState:u,condition:function(e,t){return s(e,t).then(Boolean)},take:s,delay:Me(t.signal),pause:Le(t.signal),extra:n,signal:t.signal,fork:Re(t.signal),unsubscribe:e.unsubscribe,subscribe:function(){r.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,r,n){e!==t&&(be(e,Oe),n.delete(e))}))}})))];case 2:return f.sent(),[3,5];case 3:return(c=f.sent())instanceof Ce||He(i,c,{raisedBy:"effect"}),[3,5];case 4:return be(t,Ee),e.pending.delete(t),[7];case 5:return[2]}}))}))},c=Be(r);return{middleware:function(e){return function(t){return function(n){if(!F(n))return t(n);if(Ue.match(n))return l(n.payload);if(!We.match(n)){if(Ve.match(n))return u(n.payload);var o,a=e.getState(),f=function(){if(a===Te)throw new Error(Ie+": getOriginalState can only be called synchronously");return a};try{if(o=t(n),r.size>0)for(var d=e.getState(),p=Array.from(r.values()),h=0,m=p;h<m.length;h++){var v=m[h],g=!1;try{g=v.predicate(n,d,a)}catch(e){g=!1,He(i,e,{raisedBy:"predicate"})}g&&s(v,n,e,f)}}finally{a=Te}return o}c()}}},startListening:l,stopListening:u,clearListeners:c}}var Ye,Ke="RTK_autoBatch",$e=function(){return function(e){var t;return{payload:e,meta:(t={},t[Ke]=!0,t)}}},Qe="function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:void 0!==r.g?r.g:globalThis):function(e){return(Ye||(Ye=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},Ze=function(e){return function(t){setTimeout(t,e)}},Xe="undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:Ze(10),Je=function(e){return void 0===e&&(e={type:"raf"}),function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=t.apply(void 0,r),i=!0,a=!1,l=!1,u=new Set,s="tick"===e.type?Qe:"raf"===e.type?Xe:"callback"===e.type?e.queueNotification:Ze(e.timeout),c=function(){l=!1,a&&(a=!1,u.forEach((function(e){return e()})))};return Object.assign({},o,{subscribe:function(e){var t=o.subscribe((function(){return i&&e()}));return u.add(e),function(){t(),u.delete(e)}},dispatch:function(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[Ke]),(a=!i)&&(l||(l=!0,s(c))),o.dispatch(e)}finally{i=!0}}})}}};(0,n.pV)()},787:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(27361),o=r.n(n);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=function(e,t){for(var r=a(t,2),n=r[0],l=r[1],u=[].concat(i(n.split(".").filter(Boolean)),i(l.split(".").filter(Boolean))),s=o()(e,u,""),c=arguments.length,f=new Array(c>2?c-2:0),d=2;d<c;d++)f[d-2]=arguments[d];if(f.length>0){var p=o()(window,"wp.i18n.sprintf");return p?p.apply(void 0,[s].concat(f)):s.replace("%s",f[0])}return s};const c=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return s.apply(void 0,[window.et_ai_data.i18n,[e,t]].concat(n))}},80483:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(36113),a=n(r(88505)),l=n(r(47617)),u=r(14587),s=r(77466),c=r(63309);t.default=function(){var e=(0,i.useSelector)((function(e){return e.promptModal.display})),t=(0,s.useAppSelector)(u.selectAiMode),r=(0,i.useSelector)((function(e){return e.promptModal.isImageEditorActive})),n=(0,s.useAppSelector)(u.selectIsLayoutGenerationInProgress);return e?(0,o.jsxs)(o.Fragment,{children:["layout"===t&&n&&(0,o.jsx)(l.default,{}),(0,o.jsx)(a.default,{hiddenModal:n}),r&&(0,o.jsx)(c.ImageEditorRoot,{})]}):null}},50013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEnhanceMutation=t.useOutpaintImageMutation=t.useSketchImageMutation=t.useInpaintImageMutation=t.useGenerateLayoutImagesMutation=t.useGenerateLayoutContentMutation=t.useGenerateLayoutShortcodeMutation=t.useUpscaleImageMutation=t.useRefineImageMutation=t.useAutoGenerateImageMutation=t.useLazyRefineCodeQuery=t.useGenerateCodeMutation=t.useGenerateImageMutation=t.useLazyUserQuery=t.useUserQuery=t.useRefineModuleMutation=t.useRefineQuery=t.useLazyRefineQuery=t.useGeneratePromptMutation=t.useGenerateModuleMutation=t.useGenerateFieldMutation=void 0;var n=r(22105),o=window.et_ai_data,i=o.ai_server_url,a=o.product_version,l=(0,n.fetchBaseQuery)({baseUrl:i,credentials:"same-origin",prepareHeaders:function(e,t){var r,n,o,i,l=t.getState();return e.set("Authorization","Bearer ".concat(null==l||null===(r=l.diviAIOptions)||void 0===r||null===(n=r.etAccount)||void 0===n?void 0:n.username,":").concat(null==l||null===(o=l.diviAIOptions)||void 0===o||null===(i=o.etAccount)||void 0===i?void 0:i.apiKey)),e.set("X-Product-Version",a),e}}),u=(0,n.createApi)({reducerPath:"api",baseQuery:(0,n.retry)(l,{retryCondition:function(e,t,r){var n,o=(null==r||null===(n=r.extraOptions)||void 0===n?void 0:n.maxRetries)||1,i=(null==r?void 0:r.attempt)||1;return 401!==e.status&&404!==e.status&&403!==e.status&&o>i}}),endpoints:function(e){return{generateField:e.mutation({query:function(e){return{url:"generate-text",method:"POST",body:e}}}),generateModule:e.mutation({query:function(e){return{url:"generate-module",method:"POST",body:e}}}),generatePrompt:e.mutation({query:function(e){return{url:"generate-prompt",method:"POST",body:e}}}),refineModule:e.mutation({query:function(e){return{url:"refine-module",method:"POST",body:e}}}),refine:e.query({query:function(e){return{url:"refine-text",method:"POST",body:e}}}),user:e.query({query:function(){return{url:"user"}}}),generateImage:e.mutation({query:function(e){return{url:"generate-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),autoGenerateImage:e.mutation({query:function(e){return{url:"autogenerate-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),refineImage:e.mutation({query:function(e){return{url:"refine-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),upscaleImage:e.mutation({query:function(e){return{url:"upscale-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),inpaintImage:e.mutation({query:function(e){return{url:"inpainting/selection",method:"POST",body:e}},extraOptions:{maxRetries:3}}),sketchImage:e.mutation({query:function(e){return{url:"inpainting/sketch",method:"POST",body:e}},extraOptions:{maxRetries:3}}),outpaintImage:e.mutation({query:function(e){return{url:"outpainting",method:"POST",body:e}},extraOptions:{maxRetries:3}}),enhance:e.mutation({query:function(e){return{url:"enhance",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateCode:e.mutation({query:function(e){return{url:"generate-code",method:"POST",body:e}}}),refineCode:e.query({query:function(e){return{url:"refine-code",method:"POST",body:e}}}),generateLayoutShortcode:e.mutation({query:function(e){return{url:"generate-layout/shortcode",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateLayoutContent:e.mutation({query:function(e){return{url:"generate-layout/content",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateLayoutImages:e.mutation({query:function(e){return{url:"generate-layout/images",method:"POST",body:e}},extraOptions:{maxRetries:3}})}}});t.useGenerateFieldMutation=u.useGenerateFieldMutation,t.useGenerateModuleMutation=u.useGenerateModuleMutation,t.useGeneratePromptMutation=u.useGeneratePromptMutation,t.useLazyRefineQuery=u.useLazyRefineQuery,t.useRefineQuery=u.useRefineQuery,t.useRefineModuleMutation=u.useRefineModuleMutation,t.useUserQuery=u.useUserQuery,t.useLazyUserQuery=u.useLazyUserQuery,t.useGenerateImageMutation=u.useGenerateImageMutation,t.useGenerateCodeMutation=u.useGenerateCodeMutation,t.useLazyRefineCodeQuery=u.useLazyRefineCodeQuery,t.useAutoGenerateImageMutation=u.useAutoGenerateImageMutation,t.useRefineImageMutation=u.useRefineImageMutation,t.useUpscaleImageMutation=u.useUpscaleImageMutation,t.useGenerateLayoutShortcodeMutation=u.useGenerateLayoutShortcodeMutation,t.useGenerateLayoutContentMutation=u.useGenerateLayoutContentMutation,t.useGenerateLayoutImagesMutation=u.useGenerateLayoutImagesMutation,t.useInpaintImageMutation=u.useInpaintImageMutation,t.useSketchImageMutation=u.useSketchImageMutation,t.useOutpaintImageMutation=u.useOutpaintImageMutation,t.useEnhanceMutation=u.useEnhanceMutation,t.default=u},4255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateETAccountLocalMutation=void 0;var n=r(22105),o=window.et_ai_data.ajaxurl,i=(0,n.createApi)({baseQuery:(0,n.fetchBaseQuery)({baseUrl:o}),endpoints:function(e){return{updateETAccountLocal:e.mutation({query:function(e){return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=".concat(e.action,"&wp_nonce=").concat(e.nonce,"&et_api_key=").concat(e.et_api_key,"&et_username=").concat(e.et_username)}}})}}});t.useUpdateETAccountLocalMutation=i.useUpdateETAccountLocalMutation,t.default=i},74968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDeleteImagesMutation=t.useUploadImageMutation=void 0;var n=r(22105),o=window.et_ai_data.ajaxurl,i=window.et_ai_data.nonces.et_ai_delete_images,a=(0,n.createApi)({reducerPath:"apiImage",baseQuery:(0,n.retry)((0,n.fetchBaseQuery)({baseUrl:o}),{retryCondition:function(e,t,r){var n,o=(null==r||null===(n=r.extraOptions)||void 0===n?void 0:n.maxRetries)||1,i=(null==r?void 0:r.attempt)||1;return 401!==e.status&&404!==e.status&&403!==e.status&&o>i}}),endpoints:function(e){return{uploadImage:e.mutation({query:function(e){return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=".concat(e.action,"&wp_nonce=").concat(e.nonce,"&imageURL=").concat(e.url)}},extraOptions:{maxRetries:2}}),deleteImages:e.mutation({query:function(e){var t;return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=et_ai_delete_images&wp_nonce=".concat(i,"&").concat(null==e||null===(t=e.imageIds)||void 0===t?void 0:t.map((function(e){return"image_ids[]=".concat(e)})).join("&"))}},extraOptions:{maxRetries:2}})}}});t.useUploadImageMutation=a.useUploadImageMutation,t.useDeleteImagesMutation=a.useDeleteImagesMutation,t.default=a},28809:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.useSaveLayoutDefaultsMutation=void 0;var i=r(22105),a=window.et_ai_data,l=a.ajaxurl,u=a.nonces,s=(0,i.createApi)({baseQuery:(0,i.fetchBaseQuery)({baseUrl:l}),endpoints:function(e){return{saveLayoutDefaults:e.mutation({query:function(e){var t={action:"et_ai_layout_save_defaults",wp_nonce:u.et_ai_layout_save_defaults,heading_font:e.headingFont,body_font:e.bodyFont,heading_font_color:e.headingFontColor,body_font_color:e.bodyFontColor,primary_color:e.primaryColor,secondary_color:e.secondaryColor,site_description:e.siteDescription},r=Object.entries(t).reduce((function(e,t){var r=n(t,2),o=r[0],i=r[1];return void 0!==i&&(e[o]=i),e}),{}),o=new URLSearchParams(r).toString();return{url:l,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:o}}})}}});t.useSaveLayoutDefaultsMutation=s.useSaveLayoutDefaultsMutation,t.default=s},21062:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(87363),a=n(r(25425)),l=(0,i.memo)((function(e){var t;return(0,o.jsx)(a.default,{button:(t=e.buttonText,(0,o.jsx)("div",{className:"et-fb-settings-custom-select-wrapper-outer et-fb-settings-context-select-wrapper-outer",children:(0,o.jsx)("div",{id:"et-fb-context",className:"et-fb-settings-custom-select-wrapper et-fb-settings-option-select-closed",children:(0,o.jsx)("ul",{className:"et-fb-settings-option-select et-fb-settings-option-select-advanced et-fb-main-setting",style:{maxHeight:"none"},children:(0,o.jsxs)("li",{className:"select-option-item et-fb-selected-item select-option-item-creative","data-value":"creative",children:[(0,o.jsx)("span",{className:"select-option-item__name",children:t}),(0,o.jsx)("span",{className:"et-fb-select-marker",children:(0,o.jsx)("div",{className:"et-common-icon et-common-icon--menu-expand",style:{fill:"rgb(190, 201, 213)",width:"28px",minWidth:"28px",height:"28px",margin:"-6px"},children:(0,o.jsx)("svg",{viewBox:"0 0 28 28",preserveAspectRatio:"xMidYMid meet",shapeRendering:"geometricPrecision",children:(0,o.jsx)("g",{fillRule:"evenodd",children:(0,o.jsx)("path",{d:"M14 20l-3-5h6zM14 8l3 5h-6z",fillRule:"evenodd"})})})})})]})})})})),value:e.value,options:e.options,onSelect:function(t){var r=t.value;return e.setControlValue(r)},showSearchField:e.showSearchField,useOriginalButton:!0,scrollableParentMenu:!0})}));l.defaultProps={showSearchField:!0},t.default=l},34197:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(77466),a=r(14587),l=n(r(76516)),u=n(r(30911)),s=n(r(787)),c=n(r(36267)),f=n(r(45128)),d=n(r(95394)),p=n(r(40692));r(95091);t.default=function(){var e,t,r=(0,i.useAppDispatch)(),n=(0,i.useAppSelector)(a.selectError),h=(0,c.default)(r,n),m=n.show,v=n.status,g=null==n||null===(e=n.data)||void 0===e?void 0:e.error,y=null==n||null===(t=n.data)||void 0===t?void 0:t.ai_error_message,b=(0,f.default)(y,g),w=(0,d.default)(v,b),_=(0,p.default)(v);return m?(0,o.jsx)("div",{className:"et-ai-error-modal",children:(0,o.jsxs)(l.default,{children:[(0,o.jsx)(l.default.Header,{onClose:h,children:(0,o.jsx)("div",{className:"left",children:_})}),(0,o.jsx)(l.default.Content,{children:(0,o.jsx)("p",{"data-testid":"finalErrorMessage",dangerouslySetInnerHTML:{__html:w}})}),(0,o.jsx)(l.default.Actions,{children:(0,o.jsx)(u.default,{className:"et-common-button et-common-button--primary","data-testid":"close-icon",onClick:h,children:(0,s.default)("userPrompt","Close")})})]})}):null}},36267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(29548),i=r(98136);t.default=function(e,t){return(0,n.useCallback)((function(){var r,n,a=null==t||null===(r=t.data)||void 0===r?void 0:r.error,l=null==t||null===(n=t.data)||void 0===n?void 0:n.ai_error_message;"limit_reached"===a&&e((0,i.showUpgradeModal)(!0)),"401_user"!==a&&"Invalid credentials."!==l||e((0,o.setETAccount)({errorMessage:l})),a&&["404_user","unable_to_render_reference"].includes(a)&&e((0,i.hideModal)()),e((0,i.showError)({show:!1,status:"",data:{error:"",ai_error_message:""}}))}),[e,t])}},40692:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e){return(0,o.useMemo)((function(){return"403"==e?(0,i.default)("userPrompt","Purchase A Divi AI Membership"):(0,i.default)("userPrompt","Error")}),[e])}},95394:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e,t){return(0,o.useMemo)((function(){return"busy"===e?(0,i.default)("userPrompt","$serverBusy"):t}),[e,t])}},45128:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e,t){return(0,o.useMemo)((function(){var r=e&&""!==e?e:(0,i.default)("userPrompt","Something went wrong");return"unable_to_render_reference"===t&&(r=(0,i.default)("userPrompt","$unable_to_render_reference")),r}),[e,t])}},5528:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["label","hint","resetAction"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldLabel=void 0;var d=r(85893),p=r(87363),h=f(r(94184)),m=r(37727);r(92872);t.FieldLabel=function(e){var t=e.label,r=e.hint,n=e.resetAction,i=c(e,o),l=u((0,p.useState)(!1),2),s=l[0],f=l[1],v=u((0,p.useState)(!1),2),g=v[0],y=v[1],b=function(){f((function(e){return!e}))};return(0,d.jsxs)("span",{className:"et-fb-form__label",onMouseEnter:function(){return y(!0)},onMouseLeave:function(){return y(!1)},children:[(0,d.jsxs)("label",a(a({className:"et-fb-form__label-text"},i),{},{children:[t,function(){if(!r&&!n)return null;var e=g||s?{marginLeft:20,opacity:0}:{marginLeft:7,opacity:0},t=g||s?{marginLeft:(0,m.spring)(7,{stiffness:300,damping:15}),opacity:(0,m.spring)(1,{stiffness:60,damping:10})}:{marginLeft:(0,m.spring)(20,{stiffness:300,damping:30}),opacity:(0,m.spring)(0,{stiffness:60,damping:10})};return(0,d.jsx)(m.Motion,{defaultStyle:e,style:t,children:function(e){return(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)("span",{"data-testid":"help-icon",className:(0,h.default)({"et-fb-help-icon":!0,"et-fb-help-icon--active":s}),onClick:b,style:e,children:(0,d.jsxs)("svg",{width:"14",height:"19",viewBox:"0 0 14 13",children:[(0,d.jsx)("circle",{cx:"7",cy:"12",r:"1"}),(0,d.jsx)("path",{d:"M6 9a3.17 3.17 0 0 1 1.59-2.68C8.33 5.86 9 5.52 9 4.5 9 4 8.55 3 7 3c-1.73 0-2 .95-2 1-.12.6-.33 1-1 1s-1.12-.4-1-1a3.89 3.89 0 0 1 4-3 3.68 3.68 0 0 1 4 3.5A3.72 3.72 0 0 1 8.77 8 1.53 1.53 0 0 0 8 9a.93.93 0 0 1-1 1 .93.93 0 0 1-1-1z"})]})}),n&&(0,d.jsx)("span",{"data-testid":"reset-icon",className:(0,h.default)({"et-fb-help-icon":!0}),onClick:n,style:e,children:(0,d.jsx)("svg",{width:"20",height:"20",viewBox:"-3 -3 20 20",children:(0,d.jsx)("path",{d:"M7 1a5.29 5.29 0 0 0-3.8 1.44L1.92 1.15a.54.54 0 0 0-.92.39v3.93a.53.53 0 0 0 .53.53h3.84a.62.62 0 0 0 .44-1.07l-1.13-1.1A3.31 3.31 0 0 1 7 3a4 4 0 0 1 0 8 3.91 3.91 0 0 1-2.85-1.27 1 1 0 0 0-1.27-.21A1 1 0 0 0 2.62 11 6 6 0 1 0 7 1"})})})]})}})}()]})),r&&s&&(0,d.jsx)("p",{className:"et-fb-form-hint",children:r})]})}},54842:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=n(r(787)),a=r(77466),l=r(98136);r(68039);t.default=function(){var e=(0,a.useAppDispatch)();return(0,o.jsxs)("div",{className:"free-upgrade-bar","data-tip":!0,"data-for":"ai-subscription-message",onMouseEnter:function(){return e((0,l.showUpgradeTip)(!0))},onMouseLeave:function(){return e((0,l.showUpgradeTip)(!1))},"data-testid":"free-upgrade-bar",children:[(0,o.jsx)("p",{children:(0,i.default)("userPrompt","Free Trial")}),(0,o.jsx)("button",{type:"button",onClick:function(){e((0,l.showUpgradeTip)(!1)),e((0,l.showUpgradeModal)(!0))},children:(0,i.default)("userPrompt","Upgrade")})]})}},63309:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorRoot=void 0;var o=r(85893),i=r(98136),a=r(91021),l=r(77466),u=n(r(76516)),s=n(r(787)),c=r(90922),f=r(14587),d=r(13603);r(31733);t.ImageEditorRoot=function(){var e=(0,l.useAppDispatch)(),t=(0,l.useAppSelector)(f.selectIsLocalImageEditorActive),r=(0,l.useAppSelector)(f.selectImagesHistoryUrls),n=(0,l.useAppSelector)(d.imageEditorURL),p=function(){e((0,i.setImageEditor)(!1)),e((0,a.setEditorImageURL)("")),t&&r.length<2&&(e((0,a.clearImageEditorHistory)(n)),e((0,i.hideModal)()))};return(0,o.jsx)("div",{className:"et-ai-user-prompt et-ai-modal-no-footer et-ai-image-editor-modal",children:(0,o.jsxs)(u.default,{modalKey:"et_ai_image_editor",children:[(0,o.jsx)(u.default.Header,{onBack:p,onClose:p,children:(0,o.jsx)("div",{className:"left",children:(0,s.default)("aiImageEditor","Edit Image")})}),(0,o.jsx)(u.default.Content,{children:(0,o.jsx)("div",{className:"ai-content-wrapper",children:(0,o.jsx)(c.ImageEditorContainer,{})})})]})})}},62743:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=r(85893),l=r(87363),u=r(96486),s=i(r(38163)),c=r(77466),f=r(13603),d=i(r(53226)),p=r(91021),h=r(88712),m=r(89861),v=r(52814);r(8003);var g,y,b,w={prevX:0,prevY:0,dragging:!1,el:null,imageLeft:0,imageTop:0};t.default=function(){var e=(0,c.useAppDispatch)(),t=(0,c.useAppSelector)(f.currentExtendCanvas),r=(0,c.useAppSelector)(f.extendCanvasRatio),o=(0,c.useAppSelector)(f.selectImage),i=o.width,_=o.height,x=o.url,S=o.scale,k=n((0,l.useState)({width:0,height:0,top:0,left:0}),2),O=k[0],E=k[1],C=(0,l.useRef)(1),j=(0,l.useRef)(),P=(0,l.useRef)({minWidth:0,minHeight:0}),L=(0,l.useRef)(null),M=(0,l.useRef)(null),A=(0,l.useRef)(null),T=(0,l.useRef)(w),I=Array.isArray(S)?S.reduce((function(e,t){return e*t}),1):S,R=i*I,N=_*I,D=(0,u.debounce)((function(t){e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{canvasStyle:t}}}))}),100),z=(0,u.debounce)((function(){e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{dataURLs:ne()}}}))}),100),F=(0,u.debounce)((function(t,r){t<R||r<N||e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{originalWidth:(0,h.getDivisibleByEight)(t),originalHeight:(0,h.getDivisibleByEight)(r)}}}))}),100);(0,l.useEffect)((function(){A.current&&(b=A.current),M.current&&(y=M.current),L.current&&((g=L.current).onload=function(){return z()});var r=new Image;if(r.onload=function(){return j.current=r},r.src=s.default,!t.originalWidth&&!t.originalWidth){H();var n=V();return E(n),void e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{canvasStyle:n,imageStyle:n}}}))}var o=t.canvasStyle,i=o.top,a=o.left,l=o.width,u=o.height;K({top:i,left:a,width:l,height:u}),X()}),[]),(0,l.useEffect)((function(){if(r&&"string"==typeof r){if("reset"===r)return e((0,p.addEditorState)({imageURL:x,editorState:{activeExtendRatio:""}})),void te(0,0);var t=r.split(":");te(parseInt(t[0]),parseInt(t[1]))}}),[r]),(0,l.useEffect)((function(){var e=t.actionOrigin,r=t.originalWidth,o=t.originalHeight;if(r&&o&&!(r<R||o<N||T.current.dragging)){if("sidebar"===e){H();var i=n(W(),2),a=i[0],l=i[1];U(),H(g.width,g.height),ee(a,l,!1)}z()}}),[t.originalWidth,t.originalHeight]);var B=function(){return{minWidth:P.current.minWidth,minHeight:P.current.minHeight}},H=function(e,t){return e&&t?(P.current.minWidth=e,void(P.current.minHeight=t)):R>=N?(P.current.minWidth=240,void(P.current.minHeight=240*N/R)):(P.current.minWidth=240*R/N,void(P.current.minHeight=240))},U=function(){var e=B(),t=g.clientWidth,r=g.clientHeight,n=e.minWidth/C.current,o=e.minHeight/C.current,i=t-n,a=r-o;if(i||a){var l=g.offsetTop+a/2,u=g.offsetLeft+i/2;g.style.width="".concat(n,"px"),g.style.height="".concat(o,"px"),g.style.top="".concat(l,"px"),g.style.left="".concat(u,"px"),(0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{imageStyle:{left:u,top:l,width:n,height:o}}}})}},W=function(){var e=t.originalWidth,r=t.originalHeight,n=B(),o=b.clientWidth-14,i=b.clientHeight-14,a=Math.min(o,i),l=e/(R/n.minWidth),u=r/(N/n.minHeight);if(C.current=1,l>o||u>i){var s=Math.max(l,u),c=Math.max(1,s/a);l/=c,u/=c,C.current=c}return[l,u]},V=function(){var e=B(),t=e.minWidth,r=e.minHeight;return{top:b.clientHeight/2-r/2,left:b.clientWidth/2-t/2,width:t,height:r}},q=function(e){e.preventDefault(),T.current.dragging=!0,T.current.prevX=e.clientX,T.current.prevY=e.clientY,T.current.el=e.target,b.addEventListener("mousemove",$),b.addEventListener("mouseup",G)},G=function e(){T.current.dragging=!1,z(),b.removeEventListener("mousemove",$),b.removeEventListener("mouseup",e)},Y=function e(t){t.preventDefault(),z(),b.removeEventListener("mousemove",Q),b.removeEventListener("mouseup",e)},K=function(e){var t=e.width,r=e.height,n=e.top,o=e.left,i=B(),a=i.minWidth,l=i.minHeight;Math.round(t)<a||Math.round(r)<l||(setTimeout((function(){y.style.width="".concat(t,"px"),y.style.height="".concat(r,"px"),y.style.left=o&&o>0?"".concat(o,"px"):"0",y.style.top=n&&n>0?"".concat(n,"px"):"0",Z()})),D({width:t,height:r,top:n,left:o}))},$=function(e){var t,o,i,a,l,u,s,c,f=T.current;if(f.dragging&&e.buttons){var d=b.getBoundingClientRect(),p=y.getBoundingClientRect(),h=g.getBoundingClientRect(),m=p.top-d.top,w=p.left-d.left,_=p.width,x=p.height,S=m,k=w,O="";if(null!==(t=f.el)&&void 0!==t&&t.classList.contains("bottom-right")?(_=p.width+e.clientX-f.prevX,x=p.height+e.clientY-f.prevY,O="bottom-right"):null!==(o=f.el)&&void 0!==o&&o.classList.contains("bottom-left")?(_=p.width-e.clientX+f.prevX,x=p.height+e.clientY-f.prevY,k=w+e.clientX-f.prevX,O="bottom-left"):null!==(i=f.el)&&void 0!==i&&i.classList.contains("top-right")?(_=p.width+e.clientX-f.prevX,x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,O="top-right"):null!==(a=f.el)&&void 0!==a&&a.classList.contains("top-left")?(_=p.width-e.clientX+f.prevX,x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,k=w+e.clientX-f.prevX,O="top-left"):null!==(l=f.el)&&void 0!==l&&l.classList.contains("right")?(_=p.width+e.clientX-f.prevX,O="right"):null!==(u=f.el)&&void 0!==u&&u.classList.contains("left")?(_=p.width-e.clientX+f.prevX,k=w+e.clientX-f.prevX,O="left"):null!==(s=f.el)&&void 0!==s&&s.classList.contains("bottom")?(x=p.height+e.clientY-f.prevY,O="bottom"):null!==(c=f.el)&&void 0!==c&&c.classList.contains("top")&&(x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,O="top"),r&&"string"==typeof r){var E=function(e,t,n){var o=r.split(":"),i=parseInt(o[0]),a=parseInt(o[1]);switch(n){case"bottom-right":case"bottom-left":case"top-right":case"top-left":e<t?t=e*(a/i):e=t*(i/a);break;case"right":case"left":t=e*(a/i);break;case"bottom":case"top":e=t*(i/a)}return[e,t]}(_,x,O),C=n(E,2);_=C[0],x=C[1],S=(d.height-p.height)/2,k=(d.width-p.width)/2}if(function(e,t,r,n,o){var i=t+n+7;return!(e<7||t<7||e+r+7>o.right||i>o.bottom||r>v.MAX_CANVAS_SIZE||n>v.MAX_CANVAS_SIZE)}(k,S,_,x,d)){var j=_*(R/h.width),P=x*(N/h.height);j>v.MAX_CANVAS_SIZE||P>v.MAX_CANVAS_SIZE||(T.current.prevX=e.clientX,T.current.prevY=e.clientY,K({width:_,height:x,top:S,left:k}),F(j,P))}}},Q=function(e){e.preventDefault(),e.stopPropagation();var t={x:0,y:0};if(t.x=(e.clientX||e.pageX)+window.scrollX,t.y=(e.clientY||e.pageY)+window.scrollY,g){var r=g.getBoundingClientRect(),n=y.getBoundingClientRect(),o={left:t.x-(T.current.prevX-T.current.imageLeft),top:t.y-(T.current.prevY-T.current.imageTop)},i=o.left,a=o.top,l=o.left+r.width,u=o.top+r.height,s={left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height};i<s.left&&(o.left=s.left),a<s.top&&(o.top=s.top),l>s.right&&(o.left=s.right-r.width),u>s.bottom&&(o.top=s.bottom-r.height),setTimeout((function(){J(g,o)}))}},Z=function(){var e=g.getBoundingClientRect(),t=y.getBoundingClientRect(),r=t.left>e.left,n=t.top>e.top,o=t.right<e.right,i=t.bottom<e.bottom,a=e.top,l=e.left;r&&(l+=t.left-e.left),n&&(a+=t.top-e.top),o&&(l-=e.right-t.right),i&&(a-=e.bottom-t.bottom),(r||n||o||i)&&J(g,{top:a,left:l})},X=function(){var e=t.imageStyle,r=e.width,n=e.height,o=e.top,i=e.left;g.style.width="".concat(r,"px"),g.style.height="".concat(n,"px"),g.style.top="".concat(o,"px"),g.style.left="".concat(i,"px")},J=function(t,r){var n=b.getBoundingClientRect(),o=t.getBoundingClientRect(),i=r.top-n.top,a=r.left-n.left;t.style.top=i+"px",t.style.left=a+"px",e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{imageStyle:{left:a,top:i,width:o.width,height:o.height}}}}))},ee=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=b.clientHeight/2-t/2,o=b.clientWidth/2-e/2;K({width:e,height:t,top:n,left:o}),r&&H(e,t)},te=function(t,n){C.current=1,H(),U();var o,i,a=B();if(!t&&!n)return o=a.minWidth,i=a.minHeight,ee(o,i),void e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{originalWidth:R,originalHeight:N}}}));var l=R,u=N;["1:1","2:3","3:4","9:16"].includes(r)&&(l=R,u=n/t*R),["3:2","4:3","16:9"].includes(r)&&(l=t/n*N,u=N);l<R&&(l+=R-l),u<N&&(u+=N-u);var s=(0,h.getDivisibleByEight)(l),c=(0,h.getDivisibleByEight)(u);if(!(s>v.MAX_CANVAS_SIZE||c>v.MAX_CANVAS_SIZE)){e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{originalWidth:s,originalHeight:c}}}));var f=l/(R/a.minWidth),d=u/(N/a.minHeight);ee(f,d)}},re=function(e,t,r){try{var n=document.createElement("canvas"),o=n.getContext("2d");n.width=t,n.height=r,o.drawImage(e,0,0,t,r);var i=n.toDataURL("image/png");return n=null,o=null,i}catch(e){}return""},ne=function(){var t=document.createElement("canvas"),r=t.getContext("2d"),n=function(){var e=g.getBoundingClientRect(),t=y.getBoundingClientRect(),r=R/e.width,n=N/e.height;return{imageRect:e,canvasRect:t,widthRatio:r,heightRatio:n,initialCanvasWidth:r*t.width,initialCanvasHeight:n*t.height}}(),o=n.imageRect,i=n.canvasRect,a=n.widthRatio,l=n.heightRatio,u=n.initialCanvasWidth,s=n.initialCanvasHeight;t.width=u,t.height=s;var c,f,d,v=function(e){var t=Math.max(e.width,e.height);return Math.max(1,Math.round(t/1024))}(t);if(1<v){var b=1,w=Math.max(R,N);w>1024&&(w/=b=Math.round(w/1024));var _=(c=(0,m.getMultipleUpscaleRates)(w,Math.max(t.width,t.height),b)).reduce((function(e,t){return e*t}),1);f=(0,h.getDivisibleByEight)(t.width/_),d=(0,h.getDivisibleByEight)(t.height/_)}else c=[v],f=(0,h.getDivisibleByEight)(t.width/v),d=(0,h.getDivisibleByEight)(t.height/v);e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{finalScales:c,finalWidth:f,finalHeight:d}}}));var S=a*(o.left-i.left),k=l*(o.top-i.top);if(!r||!g)return{imageBase64:"",mask:""};!function(e,t,r){if(j.current){var n=e.createPattern(j.current,"repeat");e.fillStyle=n,e.fillRect(0,0,e.canvas.width,e.canvas.height),g.crossOrigin="anonymous",e.drawImage(g,t,r,R,N)}}(r,S,k);var O=re(t,f,d);!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;e.fillStyle="#fff",e.fillRect(0,0,t.width,t.height);var o=R,i=N,a=.9,l=r+R,u=n+N,s={left:r,top:n};r&&(o*=a,s.left=l-o),n&&(i*=a,s.top=u-i),l<t.width&&(o*=a),u<t.height&&(i*=a),e.fillStyle="#000",e.fillRect(s.left,s.top,o,i)}(r,t,S,k);var E=re(t,f,d);return t=null,r=null,{imageBase64:O,mask:E}},oe={top:"".concat(O.top,"px"),left:"".concat(O.left,"px"),width:"".concat(O.width,"px"),height:"".concat(O.height,"px")};return(0,a.jsxs)("div",{className:"ai-image-extend-editor",children:[(0,a.jsx)("div",{className:"ai-image-extend-editor--controls",children:(0,a.jsx)(d.default,{})}),(0,a.jsxs)("div",{ref:A,className:"ai-image-extend-editor--canvas-container","data-testid":"canvas-container",children:[(0,a.jsxs)("div",{style:oe,ref:M,className:"ai-image-extend-editor--canvas","data-testid":"canvas",children:[(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize top-left"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize top-right"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize bottom-left"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize bottom-right"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize top"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize bottom"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize left"}),(0,a.jsx)("div",{onMouseDown:q,className:"ai-image-extend-editor--canvas-resize right"})]}),(0,a.jsx)("img",{style:oe,ref:L,src:x,onMouseDown:function(e){e.preventDefault(),e.stopPropagation(),T.current.prevX=(e.clientX||e.pageX)+window.scrollX,T.current.prevY=(e.clientY||e.pageY)+window.scrollY,T.current.imageLeft=g.getBoundingClientRect().left,T.current.imageTop=g.getBoundingClientRect().top,b.addEventListener("mousemove",Q),b.addEventListener("mouseup",Y)},className:"ai-image-extend-editor--image",alt:"Image"})]})]})}},53226:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=n(r(787)),a=r(77466),l=r(13603),u=r(91021);t.default=function(){var e=(0,a.useAppDispatch)(),t=(0,a.useAppSelector)(l.extendCanvasRatio),r=((0,a.useAppSelector)(l.currentExtendCanvas),(0,a.useAppSelector)(l.imageEditorURL)),n=function(t){e((0,u.addEditorState)({imageURL:r,editorState:{activeExtendRatio:t}}))},s=function(e,r){return t==="".concat(e,":").concat(r)?"active":""};return(0,o.jsxs)("ul",{children:[[{leftRatio:1,rightRatio:1},{leftRatio:2,rightRatio:3},{leftRatio:3,rightRatio:2},{leftRatio:3,rightRatio:4},{leftRatio:4,rightRatio:3},{leftRatio:16,rightRatio:9},{leftRatio:9,rightRatio:16}].map((function(e){var r=e.leftRatio,i=e.rightRatio;return(0,o.jsxs)("li",{className:s(r,i),onClick:function(){return function(e,r){t==="".concat(e,":").concat(r)?n(""):n("".concat(e,":").concat(r))}(r,i)},children:[r,":",i]},"".concat(r,":").concat(i))})),(0,o.jsx)("li",{onClick:function(){n("reset")},children:(0,i.default)("aiImageEditor","Reset")})]})}},38163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAdCElEQVRoQ3V6aXBc53Xleb3v+wY00I2dWAhQBMFVJEWRsiIpkR0pjj1l2Z5SRc4kLnsmk6VmMlWTH/mRmR8zFcepspNMqrwl41TFdiQ7kiVZokSFC7iIG4gdDaAbve/76/3lPFBKaFfyVG2V6Ga/d7977znnnvuE3/njP5UOPvUsmi4f7qUyuL2xi2Q8B0VLAZvZAY/bi8EhDyYOODHtUWJYCSglIJSq4dLb9/DBj99AfOU2/IYOTh4ax4XzJ3Hs8WPwBofREtSISW0s10uIZAuoFgsQqxmUqinkShkU83E0c3G4yjkc7Eo4pTHhsM4BE//JJBt44+4m/vrBMq5W8uAtAaMBOHYKpv/wm3DPP4FKrIbs+5dhvf4uhN/72nck0/AUoi0JK5EowrtRNLMVaLsCzCYL7B433GMBDM4OYzRoRZ9JDYG/mkpVELqzib3799FJ72FQBxweD+DIoVmMT43D7LSjyXtHu12s12vYyxVRymVRzMZ4UFuIR3dQzsSgEfMYUbZxzKjHKasTk0Yn1D0DkrEK3ri/ie89WMW1bBItORB/HxTPPQ/3i1+Ab3gOmXsRxH/4OlSXfwrhc3/yDamms2E3V0UqmoSYzEBdrEDXbUGlVUJls0A3OADL5AG4hgJwuO0wqjVAvQGplIOmXoCTtxkyaTDR50OgfwB2uw1KjQrlLrDX6mK7Wkcyn0cpnUQ2voO9nQeIbK2hko3D2K1ixqzEWZcDp9w+jNk9EBRGpBIlvL28hR+sbuByMo6CiqUwMwXdi5+G/8nnYdX6kHhvCYm/+QFw6y0IM7/z+1K+o0YxJ6KbKUFbKMJQKkHdKKPZa6KhFCBZ7UDfINSeQRg8A3B6vfC7zQi6tRhxGzDuMGLcaka/yQaj3gCFoESTQWSYkmi9i1iNJVDMoJDYQyqyhsjOfSTCGxD5ZzahgVmLFmfdTpzw+DDk8gIaK3KFOj7YCuE1fj4oZBE1G9E7PA/T+WfgmzgOpAUkX19E6Qf/wDq/CkH32V+RGk010BAg1DvQ1uswV4oQeNrVcgF1UQQUKkBvAqMAnCPQj41hfGYEx+aDODoXxOFAH0b1ZtiggYIVwBhQ6bH8WA9x/ma6VkY+l0RmbwuxELMRXkIhvwdVrwa3posZvQrHzRbMO1zwO3kPvRPlZg8fxqN4MxrBYreBXY8L4oE5aCYXoFf5Ub2XQ/a1S+hcegvIr0HAqQMSBD6kxgKo9dCyAczNOoRiFtVUCiIzhFYH6Al8PH7HMgzN2BSG56dw5vQkHj8xhcPDQQQ0Zrbow0vujQKbN93sIFuro8BmzqejSEY2EA7dRzi6ArGZh9OihJ9ldUCtxJxKgwNaI3xmO1RGD+pKDTbqZSzWiljSqRH2+lBwj6Ci7Uc12kX+0iaqb10C1haBTpaBDFkl6Fk6Ti8Ubg8MViMshCWhWmEgGVSSSfSKVX5ZCUHthNYeZK+MYfLgOA4fHsbBuRGMBAfgMlhgYElJzES13UVBDqBURolBlAtpFDN7yKS2EYuvIpoJoS2I6POaMeIyYVytxmgbGGxLcAo6aJmRJjOU1CsQ0qmwbbMh7OhHQuFGJCEhej2MzNs30P2QQZR3oVB0GIhZJYG1jf5+qIODsPZ5iVY6SO024bKEUjaLdqUGlcoAu2OAwDGCiYEgJof6EQw64elzQGcxo6vUodMW0BS7qJeqqObSqOQTDCKJEgOpVVJoiCnUGkmU2zn01D34vHaMeB0Y1egQbAlw11ow8e8LCgNaZjOqThPSLhviTh+i+j5Eykas3U9h440byF18n7W7xtyLsJh4yCwnCUYWhc8JDWvd2udiO+jRImxWylU2ZBk9nrKNPDM7Po1DB6YwPTSEEX7PYzNCxRMrEZni+TohuYxCtoR6IYdGKY0qHz5fiKFEzuhJdej0fFALC8Cmhtaqh52I2M9PQKWFT+zBWmpAUxLRYlA1rRZ1BlJgb6TMXkThwm5MwvK1TWy+fhG1u1fYjHnoCEajI1YGoh2QVHqm02GAzmWA1qRCW+qgxNJo8WTRYMfqDHCNjePx4ydw5vhRzE9OYMTngUWjJbK1EWPm1reTCG1FkYrFmMkM2q0i6qgwyAJqHRF6o5oZMGFwwA5/wAu7k5lk7RtVCliabRjzNajTZSBbRq3GaiB815xmFBx2JFQ27BU12FktYuX9u4he+QBSdgtKwsqAXYez50chaN1HJI9Rh36LhvzQQatZ5ummEc3n0JKDkC+m3k6mPv74KZw/dxrHHpvFyGA/DGpmg6i2G89iZS2MnfVtpGN7qLORlWZil0uNrl0LldUEN4l12OfDsKwUyBcmnRFt8k+9U0aLZdiJJNGNptFOF1EVW2hYjGiybMvkl2RXj52dGraubCL07hVU1+8DzLBTo8TpWT+e+48nIPRNPyMdcVhx0KyFo9uEmE1gfW8bd/jviMR6/wiJ7CZ+5+BBHD9xFIcOzaB/0Acl0SZPINiNZLG5sYfEdhhl9gX0bVhGnbAd9MM8GYCLhxDwshxNffCrzDCDpUvpkmqnsZclCOyGUFrfQXMvgQ65rKlUQBnwQTERRJtsnuuosLkUw9ob10mC/wQpH4OWOH8oYMdLv34KT3/xDITZ0y9KT7mcOENCG2EzSJk0NsNbuLa3gzv1IsI9ZkmWOWpmzdOHwNgQ+gN+GF0WNCQJGaqAWCyPGE+zlMtAalZhcunQNz+GwdNz8CzMoX98CoOOYQwo7DATRFq1CuLFBDZiG9hcpVxZ20IxFEErlYWi1oDKYYFtbgK2ozPQjg+j1FZh9eYm1n/8HmqLN0H0gcelxacuHMTLX/o1zJ88DOHEL70oPU1NdYGMPEuuMJUqSKfTWE1FsZTPYKtVR44PLCpYJjodFEYtBL0GdXJkvttGjjculeqokkg7LBYKCYpNAwYOjWH4zFH45g/DFRiBhQJU35HQ5EGlyNY7q+vY295mTyVQTGfRKJTQExtQU8cZnRZ4H5vEwKnDlEZjRDlg5dYawu9cAzY2WLY9TC0M4Euffw6f+eQL8Nn8EE4//1np8V4XJxttzFRFuIgaXbGJNAPYJTFG+LBpYkJG4IfZSbfryPKToRbLM0CZ/H7xUms08JBbAuwlx8goVAYzatUmquSkciSMLAGhkEyhXSWY7OuAn780BB/veBAD89PQU7/lCP87yxsoPyDcNitwzzjxiU8t4OUXPoUzE6ehkBQQzn3uP0njRJmxWBwD8QTsLBUlWblGIi+QGAuUJ1UyfpFCke1IEVhFjICQ7rBR97X1z18KopDRbIKdeszO5gaRTYbxNMVoLcPSo1z5dy8elkqrgdVl50H0kwo8aLQ7LNsEMuEoKaMC47AFR58/hJc+fQHPzJ7BgNqPTC0B4fn/9r8lM2W1cWMV2s11CHkSIO9U46exf14qKJVmCEY7RJMBBW0XGSJNqlpEmQq4RxZnwqDRKGAikdqcVnjdbpKqDR3ySzKZw95enMH82wFQ4TFWLQwWE4w26/7Dewb7yDdGdJoN7G1uY/vBBrmpAoVdhdELo/jMy8/ixbNP4KBpjNquh+XQbQhf+u7rUpuKtLVyF/UHd1EKhZBnved42pSL8jPCoJTJawBW3kBwalGVqsiS8PI84QYluk5FVqYaHh3qw8jQIHwUf8quggo3hfv3NrC8FUPxYyj/KB1KhQJWkwkejwd9VBT+iVF4RwZhHyAasg/LJOJ4aBcPrtzCyo17EMsljhNmHP3ccfzGyy/g6QNHQUGFnBjBW5d+BuF/rYalUiyE8uYSiqv3keaglOAPJHkCJd68w/ZVWxxwBkfQPzLAU9Psc02RQ1GZEN2pV2En2Y0OeDDNup4YDsBL4deqtLC5vIvF68u4ubKHJLP38aWlthpk6R2em8Wx0ycxwV7yBgIw2ClKyWnFThOhvT0s3VzCDTb4/au39qWOZcqFM198El/4tWdxpn8Cas4yd0LX8P1v/QTCd1otqVLJoZYLoxLdRG5jHakH64iT3OLJPH+U/EkxaWTNykOVVtFGp5CBmIiiQ7hVtUS4OTWO9rswzUBHB/2wU8VWOKitLUdw48Mt3iyJGElObimdSoVgvx9nT57EhacvYIGB9AeCZPmH2lku6yznoNVUDNcXl3D14i3cuXEfmUoajlk7Tr5wDM+eX8Cc28Ws7eDtt9/Ea3/BUfe7ksSe51/vldFtUNxRbpd3yNAbO5TbKcTqhFjWcMOgRa/bYRA5tIk6SKSgZxObSWwuzhMBltZQvxt95CQNobrAQDa3kljeiCOUqCDb6e3PKl4OafOHH8P5T1zA+aefwuTsLLRazuKPXOw87FL23Ly9jmuLy7i9EuJcU4R5zIyDZ8cxPzcAj7GHML2Ct/72dXz4KnvkTyVRsrMTTAxGQ20ktbJocgYv7sQQS7FRCcVhtnyEpZFOJFHd3kU3EoOOUsLR6MCh6MFlVMFDEeiwU6/RIOhwfMlQREZiJNR4ifLpIamqydj9BILDC0dw6twTOHXmCUxMTcNiNELNnpEDlS+CJrLsvWVqtzsru7hPxo+IhB+HBj4qhgG3BipmaGvxKq6/9i72bu9A+INORPJADSuFnVosoMdalOJJtFN5lMU2iho1IhoJ62y23VAYhdUQJEKhPluFU+zIcgouqxp2iw4allhbyVmdA1WmyDmdJkY224D8DHJdKQnNcnmOT07h4JGjmJ4/homZGQyQK2wGPfTsHa1SyYAU+3prN53HajyFdTowER5og5HqqU1M3Rp6iR0kbi5i4/Iisjx04berK5JVRpQkVWtokw2/hfZuHDoSmJllYBkdQsPvQFRgVsjCCfZOYysCdSwLa0WEk3OFkwBgsevJ+hqU+cS5egvpCkmTOqxcaKJZ5RzAoUngg+hM1HR88L7RMQwcOIjBA5MIDA/BR87xEn49RDKzWsvZRkKiUkWokEeoXEGCh9psdOklNGEqF6FL7aG9vkSSvE+SjUP4SnpNknZpq1y7ju3LV5C4t4J2prAvJ4IDfiycOkHNtACJqJStV7C3HkLq3hrq67tQZXOws/mdDh0s7BHBrEFJ6CHDm6UYZK4solRpktVbaLPXJJIbm5EzjAZ6t4NwPgQv5//g2CgCgWEE+/owwPnDyekQgoq/w1m9wkpgQNkq/z6HLisz1S/W4StnYU9FoI3sosWsCf89uiVlrt3ArR/+CGvvvkctlPuXtnOzdi8cP4ZfeukzCJw6iir7aHNlDZvXbiN5+wHae1GYWJJOlx42nw0KuiEVZQ/ZJjNCDZarNWnGdVBhINVKA026KT0+3D58ESAUJE8rUW5gZASBoREEB8knnFSdnFUEjg5FDncxPnSsWqPKbkLL4WuQ/TzDe0y2awhwYLPH42gQlIQ/2dmV1l9/He9/+9sI37r1sJg/ugyshcdn5/DK734FJz75y+hoBKxsruDue1cQvnITta1t6CkbHDYDrD47lAykTlmTa7WQqTdZYuyxGoc0nmaFGarWqiwPBtMhSrLMBIMKOrcVDr8fHv8AvAzC6+uD3eWCmlmpE6qznS7SzEKZgZhZWpOUMAs6gc6kiAE6M4bdMEqb7JGvbexKN//u+3jne99GihLl0UtDM+H43Bz+8//4PTz94gtQsJFXk9u4cfE97Fy6huraOrSlItWuHhYPM8L6F1la+f1AWgykQxOCwTCQKlGvTiHaoOBsdxo81y4UHIw0/Lt69oaeBoPJwXJzumClx2VwOtHhCF7jPStdJdq0q1yszGlOjrN0JkcqBZgiO2gtrSG1vgfhz+5uSu/8v7/Ge3//N6imyQ+PXBqlGgvz8/gqA3nuU78KJet2he7gzcvvYJdZEdfXoacHZmEAZpeVza7jINZDgeCRJVjkGUCRgZSZmVqLqEN/qiU16bS0qBfofMjdzwftEpZ7RCwVoVtvt8LM/jFxolRxzO2YaMyRYPVqGoIamoF8hgB71ZqIobW8gvTtJcS32ez/82eL0htf/zo+fJOOXVtWV/96GQ1GPHH+HL78B/8VT5w9jzrl/rXoFq6/+yaSV25AEYnA1qnvl5aZsKogabJwUGAQOc4oBfZGhVmpMbA6ZX9DajEPbWaDcwvrX+oIaLV7EOmbMTwodFoGQlvJaaMX6ICWAanposjZ8Th8mLC6MKxgP+Yr6O1EkF9aRnxpBXkqEOGlb35HuviX30Di7vWfC0L+D5/Xg8++9Gn8xpd/G2OjB7FDKfPq4iVc+/E/onx3BZZSAUGjEn1+5777IlD9VhhsntCbJ49UiFh1zjn1VpvZYCCkRWoDmuAMhrXPyRqi/P/zI5OgWq/fV8B6jt5aZljnscNE6ePye+kpB3DA2Y8hDQOjqVynIM1shJAlp4mEZmHhld+S7v3oR2jTcHj0kie9aY61v/WVV/Drn/8i9BYPrqw+wLe+//9x/c230SK799NBmXabMDRB1TrE2YP1XuIDFxhIiQOaSJ+qxdOWZ4omG1xkAE1mo8vM9OSRt9Fj81O7Ue6rKWuMHMDMdud+z2gcnOwJII5BN/qp84YHgxh1++n6U/O2dWjkCe2ccapUyV0WquA5siClb98mWJG0HrlMlAynD03jla++gnPP/DJtHQE/+ulb+O53/xYrd25DRRgNUOPPkgiHpwdhG+lHj+xe4URZ4cja5Cn1Wj3KFT4sZxY5kDrNDBnC5ey0CAgt2kBdOQiqPYvGCKvRBouFgVgs0NhNDMQGd9CH4BDFaHAIQ+5BuLUecHrhQdDJJcx3eCCSgoEobTapW6S/+8jFcRx9BgPOHZnFc7/6LIaph3YSefzwtbdw8f1LKJbzMPI7QX6mKEt8I4TLARfaZHZZ8HU5AivZyCp+ZEnaYDAN2blk2ZWFDqoMRGQgHZYXKQFmpRYunRV2WrcmA7NBtFLRujV4bVwY9WOE3vLo0Cj8dg5cSoIKJdWjl0wYHNAESafTc6KjcKPOkb9i7El0yVUckvzwDvSxUSWE4hksrYWQowclB9HPvxokzvfbtFw3GFAnh4h0X/kjMBJ9zCRTnZbbH6KMSJVQYyAV2fhjIDWWmMj5X+opqJRVsKr0VNBcKmlt0KmNUFANqziNygDio7oYGR7BcHCUmo5LIErbf+sSjCarND0zi/lDc3Bw1lY2RbS5WcoQo+PZDGI0otOswyJlhxy5nzeeYS1PkrB8dEsUFgFZoYl4mzxBeNUb1PBSZnhIagaebI8QXmOJVZiBMgOoKDsQlV2u5XiGCg17Q8tT1sFKaDUwCJXSQLNcz6wYODY7CTiDCPiHMDgYoDDl88kj6yOX/EwsAAiTUwvS59nMzz53Hg7OyWIuh62bN/D2T17DW1evYouC7WOu9xDrn+APP3ngEE3sAGh2IFvJYC2+hxBtnhYJz2HTY4gjcf+Al86+hWpYzf7qoMi+qZA/qioGoWHvMJv0OVkQlOQ9FbQSJQsDU6h0UHLIMlnscNO89rr88PHj8bnYP8y+rAj2S4mqjQ/WoRfX6vYgfOYL/0X66pe/hJPHZkBeQj1fxs23L+Kv/uLr+MkHl1gOD0FAQ+Kapwv/8vmnyClPwtvnR4cqdGd1FXfuLyFM3aXiZOd3GzE8THVLJ1JnN+9vvGSmL9RFVGTkkrOh5kdB555zPfsdHaJXh4udnqTkyk4HI/nCSYTycDvmcXNl4XAzOwxOljQyh34UiAzZIoFEJLwLf/7tV6VPf/IT8HEokq9KpopLr76Lr33j/+Ddu5f3/0zLZhz1BfHJJ5/E5z77AiYPHybmmzju5rBz7T7uX7+DHKdGGx8w6DVgMOCgVHdARRSTHzxHVi9wnqixuemaEYabLLU6pYu4T54VuvAiZ3y5Zww0C51c83kDNCMGh+HuH4SLU6fNygDVdFz4PHIg8vUwIxLackZurIelQ9zGUg/u68XsXgk//d47+NZ3vonFzWtQcwk54h/FU2cv4FdeeAYLZ47QLuViiC6QmKwiuriJ8N11tCjpXSwZv1MJp0cHnUMPychTV9DIowdW5lJRJJPX5abnujqd5xjN5WiSI0MpR+efdqKKj2l1uummjME3PskNwBgNPkp92SIi2Zr5iDKi/uK1j1q5ZltyEKHkS66iZKiEi99fxM9+8o8IcUVm55xx/NRxnH3+HGaPTcNGtbr/XRmJkiLSDxIo7aSh5ArCKs8mhhZPlVEaJKplShNlA0VGzZ0oe0jBnWRjf58YiYawHQ4hxtlfZCCKuoJ6ysTf9/Hhx2CbmKBdOgrHjDx4BTFoJjzL6xyetsAHlVfk+5es12TgaNN8+DhKHhyyuw1sXItie2kTTRrSfcNOjB8NYGCGzjpPeT+lDLhZJxLF6ihHyazZOtRVIhbLxSBUiTx1CsEag6ihohBRY4O3ebM2dVWVRl06yRXEzhp2dreQyfBlAGbD0NbAwD2kzu6Cyksvly68ivaSe+ExlvIcDvgCoIyEusW1OActgaWqJIKqSR3yfkdgHPuxyf/bFCWUuKNrZMi4hFuNkYzrY2266DYyBvmL+w3GlwtKORIb307oFKhkKQ6VnDdUdNlVTZKrVCS8lmi7VvYz0uTmtkP+aNFLlveJCfpokfA60im+CFDrQseGN1KqK7luaKiMKHLNl6dh3vJ74Du5gCPnH8c85yKZ09sJVsB6GC06mEaiqJv7FhtH538JpMumkTfRYokIJQmgfoOa/U+E3Mc6OQgZv3hfmso9lNPUT3kOCBUqWWZDUa5B4FiqbFCJ0o3pqqtoqEV+KBWVlPCdKurlDLLpXb71sIFcMkp50gCFAcxEMHWL835Ni3BRwlaxjT3O7C2LAe5DUzj63DkcP3kMbuqxHJ3LnSt3UNiWwUWFMZrlQ9ymCb2PMtLiUTeaEqc3gezKjRwDoNx62A9yJvghQqJExVrkzWq5HtcUXfQ4wkocRQWWjLJa5qsf/LA3FPSduvw0VS2yegnlMt96SLInIktI7REc+H0HPbl+F60ouvf1uhbbCQEfbjfwIN5EVr4hA9QR/Q7QkDt6+ij3+ApOpvew/P6HyNP8MNOqnaDUn6WRIeRrdYkGCU+dNoxcc7RsGCj4r4+CYNPK+xE50LYCYp3Iw6w1SjwxjrFtzuZdrrJBl13TqsGiatKNV7LWeRK0iVoEgCIzkeTDRzY+RHjtGnKcaXQUkNy90uAgu+vMXPUpcGuricurNYTSLMWPoYnc4To4iKljUzAQZneurmL7fpjP9BCG+Z4E5uUZ/9LVJUnFGnVza+vp43smfAiZdD++uMOiWu1xL0jSEjnXifQl5R1phX/OCbBJw7stVvk2ERudI6jdJNAaos4i2imsGlm0I5dK0BW8idCtdxC+9z7EdATcYVJ28L4D1GlKC5bjPXzwoIZbIQ5kj+4r+CymYSsCfMtCS+iO3o5yVceD++hyyIFw+BL+7x/+laSXtJh5bB7TxydoBFAmPCIu5ZNpMBt0+NGt8L0Umm09LhZb9KrqzIZIE7vNTKiENkxc8NtssjVk4WBE8cf9d4dQmY+nsXPzMrav/BjpexcJ1THqOm62fBxzOV3u1jVYDDWxuNFAOCeH/shFBrSM2zF6LMCybSJ6gw7o2kPZRKzCGMXpiRmW1u+f+11JrzDh0ONncOSZo+g7aAW1237e5B8kQLFRyaDyVpQlpeBh7AdDR0Ns1FnbZTIrV8s06gx8Q8hEWWLaD0TL0ZXf44+UklmEr32A+OVXIS6/D6OYgNXKtyTI1rsdBfeVLb5AI2KDfdf4xeWRQQnXHJ3+00Haui1Er0awfTPLOYQZJfSemRzH8adPQfijx35TUkkGDC8cx/j5Y3BOuTmdEW65KuiRKNn74Ky0//BK7moIRlASpgUKwRaja7S4Xu4wOnKFhuyrk90QkqaR/ixFLMFDItekkbzxHoqLtP/XL8PUzMHAlw1KfJDrmQZeXythMUai/PnZbj8tCsJa3xE/Dp0b5vDV5u/QXL9Cs6Eo4FCwDxeeOo25p87inwHX0AbEK5ObvAAAAABJRU5ErkJggg=="},71648:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useInpaintRequest=void 0;var m=r(96486),v=r(77466),g=h(r(787)),y=r(8035),b=r(14587),w=r(29548),_=r(98136),x=r(98136),S=r(13603),k=r(50013),O=r(89861);t.useInpaintRequest=function(){var e=(0,v.useAppDispatch)(),t=(0,v.useAppSelector)(S.imageEditorURL),r=(0,v.useAppSelector)(b.selectPromptHistories),n=(0,v.useAppSelector)(S.currentImageMask),i=(0,v.useAppSelector)(S.currentImageTransparentMask),u=(0,v.useAppSelector)(S.currentExtendCanvas),d=f((0,k.useInpaintImageMutation)(),1)[0],p=f((0,k.useOutpaintImageMutation)(),1)[0],h=f((0,k.useSketchImageMutation)(),1)[0],E=f((0,k.useEnhanceMutation)(),1)[0],C=(0,v.useAppSelector)(b.selectImageReference),j=(0,v.useAppSelector)(S.selectImage),P=j.width,L=j.height,M=j.scale,A=function(t,n,o){if(401===(0,m.get)(t,"error.originalStatus"))e((0,w.setETAccount)({errorMessage:"Invalid API Key or Username"}));else{var i=(0,m.get)(t,"data.content",[]),a=(0,m.get)(t,"error",!1);if(a&&e((0,_.showError)(a)),i){var u=(0,m.get)(r,n,[]),f=(0,m.get)(t,"data.eta",0),d=(0,m.get)(t,"data.status",""),p=Math.ceil((0,m.toNumber)(f)),h=isNaN(p)?0:1e3*p+2e3;if("busy"===d)e((0,_.showError)({status:"busy",error:(0,g.default)("userPrompt","$serverBusy")}));else{var v,b,x,S=(0,O.createImagesHistoryData)(i,null!==(v=null==o?void 0:o.width)&&void 0!==v?v:P,null!==(b=null==o?void 0:o.height)&&void 0!==b?b:L,null!==(x=null==o?void 0:o.scale)&&void 0!==x?x:M);e((0,_.updateImagesHistory)(S)),e((0,_.setImageETA)(h)),e((0,_.setPromptHistories)(s(s({},r),{},c({},n,[].concat(l(u),l(i)))))),e((0,_.updateSelectedOption)(y.ImageOption.RESULT))}}}},T=function(){var r=a(o().mark((function r(i){var a,l,u,s,c,f;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=i.prompt,l=i.modification_strength,u=i.modification_type,s=t,e((0,_.setImageEditor)(!1)),e((0,x.updateLoading)(!0)),c={prompt:a,mask_image:n,width:P,height:L,modification_strength:l,modification_type:u},(0,O.isCurrentDomain)(s)?c.image_base64=C.base64:c.image_url=s,r.next=8,d(c);case 8:f=r.sent,A(f,a),e((0,x.updateLoading)(!1));case 11:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),I=function(){var r=a(o().mark((function r(a){var l,u,s,c,f;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return l=a.prompt,u=a.modification_strength,e((0,_.setImageEditor)(!1)),e((0,x.updateLoading)(!0)),r.prev=3,r.next=6,(0,O.mergeImages)({urlBg:t,base64Image:i});case 6:return s=r.sent,c={prompt:l,image_base64:s,mask_image:n,width:P,height:L,modification_strength:u},r.next=10,h(c);case 10:f=r.sent,A(f,l),e((0,x.updateLoading)(!1)),r.next=19;break;case 15:r.prev=15,r.t0=r.catch(3),e((0,_.showError)({status:"error",error:(0,g.default)("userPrompt","Something went wrong")})),e((0,x.updateLoading)(!1));case 19:case"end":return r.stop()}}),r,null,[[3,15]])})));return function(e){return r.apply(this,arguments)}}(),R=function(){var t=a(o().mark((function t(r){var n,i,a,l,s,c,f,d,h,m,v,g,y;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=r.prompt,l=r.image_influence,e((0,_.setImageEditor)(!1)),e((0,x.updateLoading)(!0)),s=u.dataURLs,c=u.finalScales,f=void 0===c?[1]:c,d=u.finalWidth,h=void 0===d?0:d,m=u.finalHeight,v=void 0===m?0:m,g={prompt:a,image_base64:null!==(n=null==s?void 0:s.imageBase64)&&void 0!==n?n:"",mask_image:null!==(i=null==s?void 0:s.mask)&&void 0!==i?i:"",width:h,height:v,image_influence:l},t.next=7,p(g);case 7:y=t.sent,A(y,a,{width:h,height:v,scale:f}),e((0,x.updateLoading)(!1));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=function(){var r=a(o().mark((function r(n){var i,a,l,u,s;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=n.enhancement_options,a=n.enhance_strength,l=t,e((0,_.setImageEditor)(!1)),e((0,x.updateLoading)(!0)),u={enhancement_options:i,enhance_strength:a},(0,O.isCurrentDomain)(l)?u.image_base64=C.base64:u.image_url=l,r.prev=6,r.next=9,E(u);case 9:s=r.sent,A(s,""),e((0,x.updateLoading)(!1)),r.next=18;break;case 14:r.prev=14,r.t0=r.catch(6),e((0,_.showError)({status:"error",error:(0,g.default)("userPrompt","Something went wrong")})),e((0,x.updateLoading)(!1));case 18:case"end":return r.stop()}}),r,null,[[6,14]])})));return function(e){return r.apply(this,arguments)}}();return{inPaintRequest:T,outPaintRequest:R,sketchRequest:I,enhanceRequest:N}}},90922:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorContainer=void 0;var n=r(85893),o=r(4316),i=r(72740);r(64474);t.ImageEditorContainer=function(){return(0,n.jsxs)("div",{className:"et-ai-image-editor-container",children:[(0,n.jsx)(i.ImageEditorSidebar,{}),(0,n.jsx)(o.ImageEditorMain,{})]})}},4316:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorMain=void 0;var a=r(85893),l=r(13603),u=r(91021),s=r(77466),c=r(92854),f=i(r(62743)),d=r(82508);t.ImageEditorMain=function(){var e,t=(0,s.useAppSelector)(l.editorMode),r=(o(e={},u.EditorModes.Modify,c.ImageEditorCanvas),o(e,u.EditorModes.Extend,f.default),o(e,u.EditorModes.Upscale,d.ImageEditorUpscale),o(e,u.EditorModes.Enhance,d.ImageEditorUpscale),e)[t];return(0,a.jsx)("div",{className:"et-ai-image-editor-main",children:r&&(0,a.jsx)(r,{})})}},72740:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorSidebar=void 0;var o=r(85893),i=r(87363),a=n(r(94184)),l=n(r(787)),u=r(13603),s=r(91021),c=r(77466),f=n(r(36789)),d=n(r(264)),p=n(r(27120)),h=n(r(57684)),m=n(r(14123));r(5501);var v=r(52814);t.ImageEditorSidebar=function(){var e=(0,c.useAppDispatch)(),t=(0,c.useAppSelector)(u.editorMode),r=(0,i.useMemo)((function(){return[s.EditorModes.Modify,s.EditorModes.Extend,s.EditorModes.Upscale,s.EditorModes.Enhance].map((function(r,n){var i=r===t;return(0,o.jsxs)("li",{className:(0,a.default)({"et-ai-editor-mode-toggle-item":!0,"et-ai-editor-mode-toggle-item-active":r===t}),"data-testid":"editor-mode-toggle-".concat(r),onClick:function(){return e((0,s.setEditorMode)(r))},children:[(0,o.jsx)(f.default,{size:14,color:i?v.COLORS.white:v.COLORS.dustyBlue,viewBox:"0 0 28 28",icon:r.toLowerCase()}),(0,l.default)("aiImageEditor",r)]},n)}))}),[t]);return(0,o.jsxs)("div",{className:"et-ai-image-editor-sidebar",children:[(0,o.jsx)("ul",{className:"et-ai-image-editor-mode-toggle",children:r}),s.EditorModes.Modify===t&&(0,o.jsx)(d.default,{}),s.EditorModes.Extend===t&&(0,o.jsx)(p.default,{}),s.EditorModes.Upscale===t&&(0,o.jsx)(h.default,{}),s.EditorModes.Enhance===t&&(0,o.jsx)(m.default,{})]})}},14123:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(87363),d=s(r(787)),p=s(r(30911)),h=r(5528),m=s(r(81149)),v=s(r(71472)),g=r(71648);r(5501),t.default=function(){var e=l((0,f.useState)(35),2),t=e[0],r=e[1],n=l((0,f.useState)({harmonize:!0,increase_saturation:!1,increase_contrast:!1,increase_detail:!1}),2),o=n[0],u=n[1],s=(0,g.useInpaintRequest)().enhanceRequest,y=function(e){u(i(i({},o),{},a({},e.target.value,e.target.checked)))};return(0,c.jsxs)("div",{className:"et-fb-form__toggle et-ai-enhance-image-sidebar",children:[(0,c.jsxs)("div",{className:"et-fb-form__group et-ai-enhancements-options-group",children:[(0,c.jsx)(h.FieldLabel,{label:(0,d.default)("aiImageEditor","Enhancements"),hint:(0,d.default)("aiImageEditor","$enhancementsHelp")}),(0,c.jsx)(m.default,{value:"harmonize",checked:o.harmonize,className:"et-ai-enhance-image-sidebar__enhancement-option et-ai-enhance-image-sidebar__checkbox-harmonize",readOnly:!0,children:(0,d.default)("aiImageEditor","Harmonize And Remove Artifacts")}),(0,c.jsx)(m.default,{value:"increase_saturation",checked:o.increase_saturation,onChange:y,className:"et-ai-enhance-image-sidebar__enhancement-option",children:(0,d.default)("aiImageEditor","Increase Saturation ")}),(0,c.jsx)(m.default,{value:"increase_contrast",checked:o.increase_contrast,onChange:y,className:"et-ai-enhance-image-sidebar__enhancement-option",children:(0,d.default)("aiImageEditor","Increase Contrast")}),(0,c.jsx)(m.default,{value:"increase_detail",checked:o.increase_detail,onChange:y,className:"et-ai-enhance-image-sidebar__enhancement-option",children:(0,d.default)("aiImageEditor","Increase Detail")})]}),(0,c.jsxs)("div",{className:"et-fb-form__group et-ai-enhancement-strength-group",children:[(0,c.jsx)(h.FieldLabel,{label:(0,d.default)("aiImageEditor","Enhancement Strength"),hint:(0,d.default)("aiImageEditor","$enhancementStrengthHelp")}),(0,c.jsx)(v.default,{default_unit:"%",name:"enhancement_strength",_onChange:function(e,t){var n=parseInt(t);r(isNaN(n)?0:n)},default:t,value:t})]}),(0,c.jsx)(p.default,{type:"submit",className:"et-common-button et-common-button--primary",onClick:function(){var e=Object.keys(o).filter((function(e){return o[e]})),r=parseFloat((t/100).toFixed(2)),n=isNaN(r)?0:r;s({enhancement_options:e,enhance_strength:n})},children:(0,d.default)("aiImageEditor","Enhance Image")})]})}},27120:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(87363),d=s(r(94184)),p=s(r(787)),h=s(r(62281)),m=r(13603),v=r(77466),g=s(r(30911)),y=s(r(94526)),b=r(71648),w=r(91021),_=r(5528),x=r(88712),S=r(52814);r(5501),t.default=function(){var e,t,r=(0,v.useAppDispatch)(),n=(0,v.useAppSelector)(m.currentExtendCanvas),o=(0,f.useRef)(null),u=(0,b.useInpaintRequest)().outPaintRequest,s=l((0,f.useState)(!1),2),k=s[0],O=s[1],E=(0,v.useAppSelector)(m.selectImage),C=E.width,j=E.height,P=E.url,L=E.scale,M=Array.isArray(L)?L.reduce((function(e,t){return e*t}),1):L,A=C*M,T=j*M;(0,f.useEffect)((function(){n.originalWidth||n.originalHeight||r((0,w.addEditorState)({imageURL:P,editorState:{extendCanvasData:{originalWidth:(0,x.getDivisibleByEight)(A),originalHeight:(0,x.getDivisibleByEight)(T),actionOrigin:"sidebar"}}}))}),[]);var I=function(e){var t,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=e.target,u=l.name,s=l.value;if(o){var c=parseInt(s)||0;"originalWidth"===u&&(s=(0,x.getDivisibleByEight)(Math.min(Math.max(c,A),S.MAX_CANVAS_SIZE))),"originalHeight"===u&&(s=(0,x.getDivisibleByEight)(Math.min(Math.max(c,T),S.MAX_CANVAS_SIZE)))}r((0,w.addEditorState)({imageURL:P,editorState:{activeExtendRatio:"",extendCanvasData:i(i({},n),{},(t={},a(t,u,s),a(t,"actionOrigin","sidebar"),t))}}))},R=(0,f.useMemo)((function(){return n.originalWidth!==A||n.originalHeight!==T}),[n,A,T]),N=(0,f.useMemo)((function(){return R?"":(0,p.default)("aiImageEditor","$imageExtendRequired")}),[R]);return(0,c.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Background Fill Description"),hint:(0,p.default)("aiImageEditor","$backgroundFillDescriptionHelp")}),(0,c.jsx)("textarea",{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",rows:5,ref:o})]}),(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Canvas Size"),hint:(0,p.default)("aiImageEditor","$canvasSzieHelp")}),(0,c.jsxs)("div",{className:"et-ai-image-editor-sidebar-extend-canvas",children:[(0,c.jsxs)("span",{children:[(0,c.jsx)(y.default,{className:"et-fb-disabled-global-shortcuts",onChange:function(e){return I(e)},onBlur:function(e){return I(e,!0)},name:"originalWidth","data-testid":"width",value:null!==(e=n.originalWidth)&&void 0!==e?e:""}),(0,c.jsx)("label",{htmlFor:"originalWidth",children:(0,p.default)("aiImageEditor","Width")})]}),(0,c.jsx)("span",{className:"et-ai-image-editor-sidebar-extend-canvas--times",children:"\xd7"}),(0,c.jsxs)("span",{children:[(0,c.jsx)(y.default,{className:"et-fb-disabled-global-shortcuts",onChange:function(e){return I(e)},onBlur:function(e){return I(e,!0)},name:"originalHeight","data-testid":"height",value:null!==(t=n.originalHeight)&&void 0!==t?t:""}),(0,c.jsx)("label",{htmlFor:"originalHeight",children:(0,p.default)("aiImageEditor","Height")})]})]})]}),(0,c.jsxs)("div",{className:"et-ai-edit-image-submit",onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},children:[k&&""!==N&&(0,c.jsx)(h.default,{id:"ai-image-extend-submit-tooltip",children:N}),(0,c.jsx)(g.default,{type:"submit",className:(0,d.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":!R}),onClick:function(){var e,t,r={prompt:null!==(e=null==o||null===(t=o.current)||void 0===t?void 0:t.value)&&void 0!==e?e:""};u(r)},disabled:!R,"data-for":"ai-image-extend-submit-tooltip",children:(0,p.default)("aiImageEditor","Extend Image")})]})]})}},264:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(87363),d=s(r(94184)),p=s(r(787)),h=s(r(62281)),m=r(77466),v=r(13603),g=r(91021),y=s(r(30911)),b=s(r(71472)),w=r(71648),_=r(5528),x=s(r(92419));r(5501),t.default=function(){var e=(0,f.useRef)(null),t=(0,m.useAppSelector)(v.imageEditorTab),r=(0,w.useInpaintRequest)(),n=r.inPaintRequest,o=r.sketchRequest,a=l((0,f.useState)(90),2),u=a[0],s=a[1],S=l((0,f.useState)("edit"),2),k=S[0],O=S[1],E=(0,m.useAppSelector)(v.currentHistory),C=(0,m.useAppSelector)(v.selectModifySelectedAll),j=l((0,f.useState)(!1),2),P=j[0],L=j[1],M=(0,f.useMemo)((function(){if(C)return!0;try{var e,t=JSON.parse(E);return(null==t||null===(e=t.lines)||void 0===e?void 0:e.length)>0}catch(e){return!1}}),[E,C]),A=(0,f.useMemo)((function(){return M?"":g.EditorTabs.ImageSketch===t?(0,p.default)("aiImageEditor","$imageSketchRequired"):g.EditorTabs.ImageSelection===t?(0,p.default)("aiImageEditor","$imageSelectionRequired"):""}),[M,t]);return(0,c.jsxs)("div",{className:"et-fb-form__toggle et-ai-image-modify-sidebar",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Image Fill Description"),hint:(0,p.default)("aiImageEditor","$imageFillDescriptionHelp")}),(0,c.jsx)("textarea",{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",rows:5,ref:e})]}),g.EditorTabs.ImageSketch===t?null:(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Modification Type"),hint:(0,p.default)("aiImageEditor","$modificationTypeHelp")}),(0,c.jsx)(x.default,{_onChange:function(e,t){return O(t)},value:k,options:{add:(0,p.default)("aiImageEditor","Add Element"),edit:(0,p.default)("aiImageEditor","Modify Element")}})]}),(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Modification Strength"),hint:(0,p.default)("aiImageEditor","$modificationStrengthHelp")}),(0,c.jsx)(b.default,{default_unit:"%",name:"reference_content_strength",_onChange:function(e,t){return s(parseInt(t))},default:90,value:u})]}),(0,c.jsxs)("div",{className:"et-ai-edit-image-submit",onMouseEnter:function(){return L(!0)},onMouseLeave:function(){return L(!1)},children:[P&&""!==A&&(0,c.jsx)(h.default,{id:"ai-image-modify-submit-tooltip",children:A}),(0,c.jsx)(y.default,{type:"submit",className:(0,d.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":!M}),onClick:function(){var r,a,l={prompt:null!==(r=null==e||null===(a=e.current)||void 0===a?void 0:a.value)&&void 0!==r?r:"",modification_strength:Math.ceil(u/100*100)/100};g.EditorTabs.ImageSketch===t?o(l):n(i(i({},l),{},{modification_type:k}))},disabled:!M,"data-for":"ai-image-modify-submit-tooltip",children:(0,p.default)("aiImageEditor","Generate Modified Image")})]})]})}},57684:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(85893),s=r(87363),c=l(r(94184)),f=r(96486),d=l(r(787)),p=l(r(62281)),h=l(r(30911)),m=r(5528),v=l(r(92419)),g=l(r(94526)),y=l(r(36789)),b=r(77466),w=r(13603),_=r(98136),x=r(89861),S=r(52814);r(5501),t.default=function(){var e=(0,b.useAppDispatch)(),t=i((0,s.useState)(2),2),r=t[0],n=t[1],a=(0,b.useAppSelector)(w.selectImage),l=a.width,k=a.height,O=a.url,E=a.scale,C=i((0,s.useState)(!1),2),j=C[0],P=C[1],L=Array.isArray(E)?E.reduce((function(e,t){return e*t}),1):E,M=l*L,A=k*L,T=M*r,I=A*r;(0,s.useEffect)((function(){(T>S.MAX_CANVAS_SIZE||I>S.MAX_CANVAS_SIZE)&&n(1)}),[r]);var R=1===r,N=(0,x.checkMultiples)(Math.max(M,A));return(0,u.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Image Scale"),hint:(0,d.default)("aiImageEditor","$imageScaleHelp")}),(0,f.isEmpty)(N)?(0,u.jsx)(g.default,{className:"disabled-placeholder-input",disabled:!0}):(0,u.jsx)(v.default,{_onChange:function(e,t){return n(parseInt(t))},value:r.toString(),options:N})]}),(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Image Dimensions"),hint:(0,d.default)("aiImageEditor","$imageDimensionsHelp")}),(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions",children:[(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions-field",children:[(0,u.jsx)(g.default,{name:"width",value:T,disabled:!0}),(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Width")})]}),(0,u.jsx)(y.default,{size:15,color:S.COLORS.dustyBlue,viewBox:"0 0 30 30",icon:"close",margin:"0"}),(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions-field",children:[(0,u.jsx)(g.default,{name:"height",value:I,disabled:!0}),(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Height")})]})]})]}),(0,u.jsxs)("div",{className:"et-ai-upscale-image-submit",onMouseEnter:function(){return P(!0)},onMouseLeave:function(){return P(!1)},children:[j&&R&&(0,u.jsx)(p.default,{id:"ai-image-upscale-submit-tooltip",children:(0,d.default)("aiImageEditor","$imageUpscaleRequired")}),(0,u.jsx)(h.default,{type:"submit",className:(0,c.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":R}),onClick:function(){var t=(0,x.increaseUrlVersion)(O),r={width:l,height:k,scale:T/l};e((0,_.updateImagesHistory)(o({},t,r))),e((0,_.setImageEditor)(!1)),setTimeout((function(){var e,t=null===(e=window.top)||void 0===e?void 0:e.document.querySelector("ul.et-ai-images-grid li.et-ai-single-image:last-child");t&&t.scrollIntoView({behavior:"smooth"})}))},disabled:R,"data-for":"ai-image-upscale-submit-tooltip",children:(0,d.default)("aiImageEditor","Upscale Image")})]})]})}},92854:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorCanvas=void 0;var o=r(85893),i=r(87363),a=n(r(787)),l=r(13603),u=r(91021),s=r(77466),c=r(52748);r(31198);var f=n(r(94184));t.ImageEditorCanvas=function(){var e=(0,s.useAppDispatch)(),t=(0,s.useAppSelector)(l.imageEditorTab),r=(0,i.useMemo)((function(){var r=[u.EditorTabs.ImageSelection,u.EditorTabs.ImageSketch].map((function(r,n){return(0,o.jsx)("li",{className:(0,f.default)({"et-ai-canvas-tab-toggle":!0,"et-ai-canvas-tab-toggle-active":r===t}),onClick:function(){return e((0,u.setEditorTab)(r))},children:(0,a.default)("aiImageEditor",r)},n)}));return(0,o.jsx)("ul",{className:"et-ai-canvas-tab-nav",children:r})}),[t]),n=u.EditorTabs.ImageSketch===t?(0,a.default)("aiImageEditor","$sketchAreaDesc"):(0,a.default)("aiImageEditor","$selectAreaDesc");return(0,o.jsxs)("div",{className:(0,f.default)({"et-ai-canvas-wrapper":!0,"et-ai-canvas-wrapper__image_selection":u.EditorTabs.ImageSelection===t,"et-ai-canvas-wrapper__image_sketch":u.EditorTabs.ImageSketch===t}),children:[r,(0,o.jsx)("p",{className:"et-ai-canvas-description",children:n}),(0,o.jsx)(c.ImageEditorCanvasDrawWrapper,{},t)]})}},13521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorControlsBar=void 0;var n=r(85893),o=r(90527);r(44158);t.ImageEditorControlsBar=function(e){var t=e.controls.map((function(e,t){return(0,n.jsx)(o.ImageEditorSingleControl,{control:e},t)}));return(0,n.jsx)("ul",{className:"et-ai-canvas-controls",children:t})}},90527:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorSingleControl=void 0;var a=r(85893),l=i(r(94184)),u=i(r(787)),s=i(r(71472)),c=i(r(36789)),f=i(r(33270));r(44158);t.ImageEditorSingleControl=function(e){var t,r=e.control;switch(r.type){case"Range":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item et-ai-canvas-controls-item__paint_control et-ai-canvas-controls-item__left_aligned",children:[(0,a.jsxs)("span",{className:"et-ai-canvas-control-label",children:[(0,u.default)("aiImageEditor",r.label)," :"]}),(0,a.jsx)(s.default,{default_unit:"",name:r.name,_onChange:function(e,t){return r.callback(r.name,parseInt(t))},value:r.value,range_settings:{min:null!==(t=r.minValue)&&void 0!==t?t:0,max:100,step:1}})]});case"TextInput":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item",children:[(0,a.jsx)("span",{className:"et-ai-canvas-control-label",children:(0,u.default)("aiImageEditor",r.label)}),(0,a.jsx)("input",{onChange:function(e){return r.callback(r.name,e.target.value)},value:r.value})]});case"Icon":return(0,a.jsx)("li",{className:(0,l.default)(o({"et-ai-canvas-controls-item":!0,"et-ai-canvas-controls-item__icon":!0,"et-ai-canvas-controls-item__right_aligned":!0},r.classNames,!0)),onClick:r.callback,children:(0,a.jsx)(c.default,{icon:r.iconCode})});case"TextButton":return(0,a.jsx)("li",{className:(0,l.default)(o({"et-ai-canvas-controls-item":!0,"et-ai-canvas-controls-item-text-button":!0,"et-ai-canvas-controls-item__left_aligned":!0},r.classNames,!0)),onClick:r.callback,children:(0,u.default)("aiImageEditor",r.label)});case"ColorPicker":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item et-ai-canvas-controls-item__paint_control et-ai-canvas-controls-item__color_picker \n et-ai-canvas-controls-item__left_aligned",children:[(0,a.jsxs)("span",{className:"et-ai-canvas-control-label",children:[(0,u.default)("aiImageEditor",r.label)," :"]}),(0,a.jsx)(f.default,{value:r.value,_onChange:function(e,t){r.callback(r.name,t)},name:r.name,animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0})]})}}},52748:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorCanvasDrawWrapper=void 0;var v=r(85893),g=r(87363),y=m(r(1911)),b=r(96486),w=m(r(94184)),_=r(13603),x=r(91021),S=r(77466),k=r(77946),O=r(52814),E=r(13521);t.ImageEditorCanvasDrawWrapper=function(){var e=(0,S.useAppDispatch)(),t=(0,S.useAppSelector)(_.imageEditorURL),r=(0,S.useAppSelector)(_.currentBrushSize),n=(0,S.useAppSelector)(_.currentBrushBlur),o=(0,S.useAppSelector)(_.currentBrushColor),u=(0,S.useAppSelector)(_.currentHistory),p=(0,S.useAppSelector)(_.imageEditorTab),h=(0,g.useRef)(null),m=(0,g.useRef)(null),C=(0,g.useRef)(null),j=(0,S.useAppSelector)(_.selectModifySelectedAll),P=(0,k.useImagePropsCalculator)(t),L=P.imageHeight,M=P.imageWidth,A=P.scaleRate,T=d((0,g.useState)(!1),2),I=T[0],R=T[1],N=d((0,g.useState)(!1),2),D=N[0],z=N[1];(0,g.useEffect)((function(){return null!=h&&h.current&&(h.current.drawPoints=function(e){function t(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}}var r=e.points,n=e.brushColor,o=e.brushRadius,i=e.brushBlur||this.props.brushBlur;this.ctx.temp.filter="blur(".concat(i,"px)"),this.ctx.temp.lineJoin="round",this.ctx.temp.lineCap="round",this.ctx.temp.strokeStyle=n,this.clearWindow(this.ctx.temp),this.ctx.temp.lineWidth=2*o;var a=r.map((function(e){return{x:e.x/A,y:e.y/A}})),l=a[0],u=a[1];this.ctx.temp.moveTo(u.x,u.y),this.ctx.temp.beginPath();for(var s=1,c=a.length;s<c;s++){var f=t(l,u);this.ctx.temp.quadraticCurveTo(l.x,l.y,f.x,f.y),l=a[s],u=a[s+1]}this.ctx.temp.lineTo(l.x,l.y),this.ctx.temp.stroke()},m.current.drawPoints=h.current.drawPoints,h.current.saveLine=function(r){var n=this,o=void 0===r?{}:r,i=o.brushColor,a=o.brushRadius,l=o.brushBlur;this.points.length<2||(this.lines.push({points:[].concat(this.points),brushColor:i||this.props.brushColor,brushRadius:a||this.props.brushRadius,brushBlur:l||this.props.brushBlur}),this.points.length=0,this.inClientSpace([this.ctx.drawing,this.ctx.temp],(function(){n.ctx.drawing.drawImage(n.canvas.temp,0,0,n.canvas.drawing.width,n.canvas.drawing.height)})),this.clearWindow(this.ctx.temp),this.triggerOnChange(),e((0,x.addEditorState)({imageURL:t,editorState:{lastPoints:this.getSaveData()}})))},m.current.saveLine=function(e){var t=this,r=void 0===e?{}:e,n=r.brushColor,o=r.brushRadius,i=r.brushBlur;this.points.length<2||(this.lines.push({points:[].concat(this.points),brushColor:n||this.props.brushColor,brushRadius:o||this.props.brushRadius,brushBlur:i||this.props.brushBlur}),this.points.length=0,this.inClientSpace([this.ctx.drawing,this.ctx.temp],(function(){t.ctx.drawing.drawImage(t.canvas.temp,0,0,t.canvas.drawing.width,t.canvas.drawing.height)})),this.clearWindow(this.ctx.temp),this.triggerOnChange())},h.current.simulateDrawingLines=function(e){var t=this,r=e.lines,n=e.immediate,o=0,i=n?0:this.props.loadTimeOffset;r.forEach((function(e){var r=e.points,a=e.brushColor,l=e.brushBlur,u=e.brushRadius;if(n)return t.drawPoints({points:r,brushColor:a,brushRadius:u,brushBlur:l}),t.points=r,void t.saveLine({brushColor:a,brushRadius:u,brushBlur:l});for(var s=function(e){o+=i,window.setTimeout((function(){t.drawPoints({points:r.slice(0,e+1),brushColor:a,brushRadius:u,brushBlur:l})}),o)},c=1;c<r.length;c++)s(c);o+=i,window.setTimeout((function(){t.points=r,t.saveLine({brushColor:a,brushRadius:u,brushBlur:l})}),o)}))},m.current.simulateDrawingLines=h.current.simulateDrawingLines,h.current.drawInterface=function(e,t,r){this.props.hideInterface||(this.clearWindow(e),e.beginPath(),e.fillStyle=this.props.brushColor,e.arc(r.x/A,r.y/A,this.props.brushRadius,0,2*Math.PI,!0),e.fill(),e.beginPath(),e.fillStyle=this.props.catenaryColor,e.arc(t.x/A,t.y/A,4,0,2*Math.PI,!0),e.fill(),e.beginPath(),e.fillStyle=this.props.catenaryColor,e.arc(r.x/A,r.y/A,2,0,2*Math.PI,!0),e.fill())},m.current.drawInterface=h.current.drawInterface,h.current.undo=function(){var r,n,o=[],i={};this.lines.length?(i=this.lines[this.lines.length-1],o=this.lines.slice(0,-1)):this.erasedLines.length&&(i=this.erasedLines.pop()),null!==(r=null==this||null===(n=this.undoneLines)||void 0===n?void 0:n.length)&&void 0!==r&&r?h.current=(0,b.assign)(this,{undoneLines:[].concat(f(this.undoneLines),[i])}):h.current=(0,b.assign)(this,{undoneLines:[i]}),this.clearExceptErasedLines(),this.simulateDrawingLines({lines:o,immediate:!0}),this.triggerOnChange(),e((0,x.addEditorState)({imageURL:t,editorState:{lastPoints:this.getSaveData()}}))},h.current.redo=function(){var r=[],n=this.undoneLines;n&&n.length&&(r=[].concat(f(this.lines),[n.pop()])),h.current=(0,b.assign)(this,{undoneLines:f(n)}),(0,b.isEmpty)(r)||(this.clearExceptErasedLines(),this.simulateDrawingLines({lines:r,immediate:!0}),this.triggerOnChange(),e((0,x.addEditorState)({imageURL:t,editorState:{lastPoints:this.getSaveData()}})))},u&&setTimeout((function(){return null==h?void 0:h.current.loadSaveData(u,!0)}),500)),function(){h.current=null,m.current=null}}),[]),(0,g.useEffect)((function(){if(C.current){var e=C.current.offsetHeight*A;C.current.style.height="".concat(e,"px")}}),[A]);var F=function(){var e;I&&(null==h||null===(e=h.current)||void 0===e||e.undo())},B=function(){var e;D&&(null==h||null===(e=h.current)||void 0===e||e.redo())},H=function(){var r,n;null==h||null===(r=h.current)||void 0===r||r.eraseAll();var o=null==h||null===(n=h.current)||void 0===n?void 0:n.undoneLines;o&&o.length&&(h.current=(0,b.assign)(h.current,{undoneLines:[]})),e((0,x.addEditorState)({imageURL:t,editorState:{lastPoints:""}}))},U=function(r,n){var o=c({},r,n);e((0,x.addEditorState)({imageURL:t,editorState:o}))},W=x.EditorTabs.ImageSelection===p?[{type:"Range",name:"brushSize",label:"Brush Size",callback:U,value:r,minValue:1},{type:"Range",name:"brushBlur",label:"Brush Blur",callback:U,value:n},{type:"TextButton",label:"Select All",callback:function(){if(j)H(),e((0,x.setModifySelectedAll)(!1));else{var t,r;H();var n=null==h||null===(t=h.current)||void 0===t||null===(r=t.ctx)||void 0===r?void 0:r.drawing,o=h.current.canvas.grid.width,i=h.current.canvas.grid.height;n.rect(0,0,o,i),n.fillStyle="rgb(255, 0, 0)",n.fill(),e((0,x.setModifySelectedAll)(!0))}},classNames:j?"et-ai-canvas-controls-item-text-button--selected":"et-ai-canvas-controls-item-text-button--deselected"},{type:"Icon",iconCode:"undo",callback:F,classNames:I?"":"et-ai-canvas-controls-item-icon__disabled"},{type:"Icon",iconCode:"redo",callback:B,classNames:D?"":"et-ai-canvas-controls-item-icon__disabled"}]:[{type:"Range",name:"brushSize",label:"Paintbrush Size",callback:U,value:r,minValue:1},{type:"ColorPicker",name:"brushColor",label:"Paint Color",callback:U,value:o},{type:"Icon",iconCode:"undo",callback:F,classNames:I?"":"et-ai-canvas-controls-item-icon__disabled"},{type:"Icon",iconCode:"redo",callback:B,classNames:D?"":"et-ai-canvas-controls-item-icon__disabled"}],V=function(){var e=s(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){setTimeout((function(){var r;null==m||null===(r=m.current)||void 0===r||r.loadSaveData(t,!0),e("")}),500)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),q=function(){var e=s(l().mark((function e(){var t,r,n,o,s,c,f,d,h,v,g,y,w,_,S,k;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!j){e.next=12;break}null==m||null===(t=m.current)||void 0===t||t.eraseAll(),s=null==m||null===(r=m.current)||void 0===r||null===(n=r.ctx)||void 0===n?void 0:n.drawing,c=m.current.canvas.grid.width,f=m.current.canvas.grid.height,s.rect(0,0,c,f),s.fillStyle=O.COLORS.white,s.fill(),d=null==m||null===(o=m.current)||void 0===o?void 0:o.getDataURL("png",!1,O.COLORS.black),U("mask",d),e.next=22;break;case 12:if(!u||""===u){e.next=22;break}if(x.EditorTabs.ImageSelection===p){e.next=16;break}return e.next=16,V(u).then((function(){var e,t=null==m||null===(e=m.current)||void 0===e?void 0:e.getDataURL("png",!1,"rgba(255, 255, 255, 0)");U("transparentMask",t)}));case 16:if(h=JSON.parse(u),v=null==h?void 0:h.lines,g=[],!(0,b.isEmpty)(v)){y=a(v);try{for(y.s();!(w=y.n()).done;)_=w.value,(S=i({},_)).brushColor=O.COLORS.white,x.EditorTabs.ImageSelection!==p&&(S.brushBlur=5,S.brushRadius=S.brushRadius>20?S.brushRadius:20),g.push(S)}catch(e){y.e(e)}finally{y.f()}h.lines=g}k=JSON.stringify(h),V(k).then((function(){var e,t=null==m||null===(e=m.current)||void 0===e?void 0:e.getDataURL("png",!1,O.COLORS.black);U("mask",t)}));case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(e,t){return e!==t?t:e},Y=(0,g.useMemo)((function(){return(0,v.jsx)(E.ImageEditorControlsBar,{controls:W})}),[r,n,o,p,j,D,I]),K=p===x.EditorTabs.ImageSelection?"rgb(255, 0, 0)":o,$=p===x.EditorTabs.ImageSelection?n:0;return(0,v.jsxs)("div",{className:"et-ai-canvas-frame",onMouseLeave:q,children:[Y,(0,v.jsx)("div",{className:"et-ai-image-editor-frame-wrapper",ref:C,children:(0,v.jsxs)("div",{className:"et-ai-image-editor-frame",style:{transform:"scale(".concat(A,")")},children:[(0,v.jsx)("div",{className:(0,w.default)({"et-ai-image-background-placeholder":!0,"et-ai-image-background-placeholder__image_selection":x.EditorTabs.ImageSelection===p}),style:{background:"url(".concat(t,")"),backgroundSize:"contain",backgroundRepeat:"no-repeat"},children:(0,v.jsx)(y.default,{canvasWidth:M,canvasHeight:L,style:{position:"relative"},backgroundColor:"rgba(0, 0, 0, 0)",brushRadius:r,hideGrid:!0,brushBlur:$,immediateLoading:!0,brushColor:K,lazyRadius:0,ref:h,disabled:j,onChange:function(e){R((function(t){var r,n;return G(t,null!==(r=(null==e||null===(n=e.lines)||void 0===n?void 0:n.length)>0)&&void 0!==r&&r)})),z((function(t){var r,n;return G(t,null!==(r=(null==e||null===(n=e.undoneLines)||void 0===n?void 0:n.length)>0)&&void 0!==r&&r)}))}},p)}),(0,v.jsx)("div",{style:{position:"absolute",zIndex:"-99999"},children:(0,v.jsx)(y.default,{canvasWidth:M,canvasHeight:L,style:{position:"relative"},backgroundColor:"rgba(0, 0, 0, 0)",brushRadius:r,hideGrid:!0,brushBlur:$,immediateLoading:!0,brushColor:K,lazyRadius:0,ref:m},"".concat(p,"-hidden"))})]})})]})}},77946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImagePropsCalculator=void 0;var n=r(77466),o=r(13603);t.useImagePropsCalculator=function(e){var t=(0,n.useAppSelector)(o.selectImage),r=t.width,i=t.height;return{imageWidth:r,imageHeight:i,scaleRate:r>512||i>512?512/Math.max(r,i):1}}},82508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorUpscale=void 0;var n=r(85893),o=r(13603),i=r(77466);t.ImageEditorUpscale=function(){var e=(0,i.useAppSelector)(o.imageEditorURL);return(0,n.jsx)("div",{className:"et-ai-canvas-frame",children:(0,n.jsx)("div",{className:"et-ai-image-editor-frame",children:(0,n.jsx)("div",{className:"et-ai-image-background-placeholder",style:{background:"url(".concat(e,")"),backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",width:"512px",height:"512px"}})})})}},47617:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(85893),s=r(87363),c=l(r(94184)),f=l(r(787)),d=l(r(43626)),p=r(14587),h=r(77466);r(14389);var m=window.et_ai_data.images_uri,v={shortcode:{text:(0,f.default)("userPrompt","Generating Layout"),imgSrc:"".concat(m,"/card-1.svg"),progress:20},content:{text:(0,f.default)("userPrompt","Writing Text Content"),imgSrc:"".concat(m,"/card-2.svg"),progress:40},images:{text:(0,f.default)("userPrompt","Creating Imagery"),imgSrc:"".concat(m,"/card-3.svg"),progress:80}};t.default=function(){var e=(0,h.useAppSelector)(p.selectLayoutGenerationStage),t=(0,h.useAppSelector)(p.selectLayoutsImagesCount),r=(0,h.useAppSelector)(p.selectLayoutsImagesUpscaleCount),n=i((0,s.useState)(1),2),a=n[0],l=n[1],m=i((0,s.useState)(1),2),g=m[0],y=m[1],b=(0,s.useRef)(),w=(0,s.useRef)();(0,s.useEffect)((function(){return function(){null!=b&&b.current&&clearInterval(b.current),null!=w&&w.current&&clearInterval(w.current)}}),[]),(0,s.useEffect)((function(){t&&t>0&&(b.current=setInterval((function(){return l((function(e){return t&&e===t&&clearInterval(b.current),e+1}))}),7e3))}),[t]),(0,s.useEffect)((function(){r&&r>0&&(w.current=setInterval((function(){return y((function(e){return r&&e===r&&clearInterval(w.current),e+1}))}),1e4))}),[r]);return(0,u.jsx)("div",{className:"et_layout_generation__overlay",children:(0,u.jsx)("div",{className:"et_layout_generation__container",children:function(){if(!e)return null;var n=!t&&"images"===e,i=n?"content":e,l=v[i],s=e,p=l.text,h=l.imgSrc,m=l.progress,y=Object.keys(v),b=y.indexOf(s),w=y[b-1],_=b>0?v[w].progress:20,x="et_layout_generation_card__stage_".concat(i),S="Stage ".concat(b+1),k=p,O=n?80:m,E=(0,c.default)(o({et_layout_generation__card:!0},x,!0));if("images"===i){O+=(t&&t>0?Math.floor(15/t):0)*a,k=t&&t>0&&a<=t?"".concat(p," (").concat(a,"/").concat(t,")"):r&&r>0&&g<=r?"".concat((0,f.default)("userPrompt","Upscaling Images")," (").concat(g,"/").concat(r,")"):(0,f.default)("userPrompt","Processing Imagery")}return(0,u.jsxs)("div",{className:E,children:[(0,u.jsx)("img",{src:h,alt:S}),(0,u.jsx)("div",{className:"et_layout_generation_card__stage_text",children:(0,u.jsx)("h3",{children:k})}),(0,u.jsx)("div",{className:"et_layout_generation_card__stage_progress",children:(0,u.jsx)(d.default,{targetProgress:O,previousProgress:_})})]},b)}()})})}},43626:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var i=r(85893),a=r(87363);t.default=function(e){var t=e.targetProgress,r=e.previousProgress,o=void 0===r?0:r,l=n((0,a.useState)(o),2),u=l[0],s=l[1];return(0,a.useEffect)((function(){var e=setInterval((function(){s((function(r){var n=r+1;return n>=t&&clearInterval(e),n}))}),20);return function(){return clearInterval(e)}}),[t]),(0,i.jsx)("div",{className:"et-common-progress-bar",children:(0,i.jsx)("div",{className:"et-common-progress-bar__background",children:(0,i.jsx)("div",{className:"et-common-progress-bar__bar",style:{width:"".concat(u,"%")},children:(0,i.jsx)("div",{className:"et-common-progress-bar__value",children:"".concat(u,"%")})})})})}},54134:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=n(r(787)),a=r(77466),l=r(98136);r(60937);t.default=function(e){var t=e.error,r=(0,a.useAppDispatch)(),n="";switch(t){case"You have used all your free requests. Please upgrade your subscription.":n=(0,i.default)("userPrompt","Purchase Membership");break;case"You have reached your monthly usage limit. Please upgrade your subscription.":n=(0,i.default)("userPrompt","Upgrade Membership");break;default:n=(0,i.default)("userPrompt","Level up your efficiency")}return(0,o.jsxs)("div",{className:"et-ai-upgrade-modal",children:[(0,o.jsx)("img",{width:"440",height:"192",src:"https://www.elegantthemes.com/images/vb/ai/upgrade.png",alt:(0,i.default)("userPrompt","AI Unlimited")}),(0,o.jsx)("h2",{children:(0,i.default)("userPrompt","Upgrade to Divi AI Unlimited")}),(0,o.jsx)("p",{children:n}),(0,o.jsx)("button",{className:"et-common-button et-common-button--primary",onClick:function(){r((0,l.hideModal)()),window.open("https://www.elegantthemes.com/ai/?utm_source=Divi+AI&utm_medium=Free+Trial&utm_campaign=Native","_blank")},children:(0,i.default)("userPrompt","Learn More")})]})}},85463:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(40930),a=n(r(94184)),l=n(r(30911)),u=n(r(787)),s=r(77466),c=n(r(59353)),f=n(r(2428)),d=n(r(84565)),p=n(r(13288)),h=n(r(20759)),m=r(14587);r(64591);t.default=function(e){var t=(0,i.useFormContext)().getValues,r=(0,s.useAppSelector)(m.selectPrefilledContentType),n="html"===t("content_type")?"html":"css",v=(0,h.default)(e),g=v.isLoading,y=v.setIsLoading,b=v.generatedCode,w=v.onChange,_=v.setRefinedCode,x=v.onCodeEditorChange,S=v.handleUseCodeClick;if(g)return(0,o.jsx)("div",{className:"et-ai-modal-spinner-container",children:(0,o.jsx)(f.default,{})});var k={"et-ai-content-results-prompt":!0,"et-ai-modal-disabled":g};return(0,o.jsxs)("div",{className:(0,a.default)(k),children:[(0,o.jsx)("div",{className:"et-fb-form__toggle et-fb-form__description-toggle",children:(0,o.jsxs)("div",{className:"et-ai-content-results-prompt__description",children:[(0,o.jsx)(c.default,{viewportMargin:1/0,inline:"css"!==r&&"free-form-css"!==r,cursorBlinkRate:550,value:b,lint:!0,mode:n,name:"code-results",_onChange:x}),(0,o.jsx)(p.default,{onChange:w}),(0,o.jsx)(l.default,{className:"et-common-button--primary",onClick:S,children:(0,u.default)("userPrompt","Use This Code")})]})}),(0,o.jsx)(d.default,{setCode:_,setIsLoading:y})]})}},84565:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(85893),s=r(40930),c=r(97849),f=r(535),d=l(r(33477)),p=l(r(36789)),h=l(r(30911)),m=l(r(94526)),v=l(r(787)),g=r(77466),y=r(5528),b=r(8035),w=r(89861),_=r(14587);t.default=function(e){var t=e.setCode,r=e.setIsLoading,n=(0,f.useRefineCodeForm)(),o=n.control,a=n.register,l=n.rewrite,x=(0,c.useRefineCode)(t,r),S=x.onSubmit,k=x.onSelect,O=x.selectedLabel,E=x.selectedValue,C=(0,g.useAppSelector)(_.selectHistory),j=(0,g.useAppSelector)(_.selectSelectedOption),P=(0,g.useAppSelector)(_.selectAIMenuContext);return(0,u.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,u.jsx)("div",{className:"et-ai-content-results-prompt__tags",children:(0,u.jsxs)("div",{className:"et-ai-content-results-prompt__tags-pill",children:[C.length<1||j===b.CodeOption.IMPROVE_CODE_WITH_AI&&C.length<2?null:(0,u.jsxs)("label",{className:"et-ai-content-results-prompt__tag",htmlFor:"tag",children:[(0,v.default)("userPrompt","tags.Retry"),(0,u.jsx)("input",i(i({id:"tag",type:"radio",value:"retry"},a("tag")),{},{onClick:function(){return S({tag:"retry"},!0)}}))]}),(0,u.jsx)("div",{className:"et-ai-content-results-prompt__tone",children:(0,u.jsx)(d.default,{button:(0,u.jsxs)(u.Fragment,{children:[O||"Improve With AI",(0,u.jsx)(p.default,{icon:"arrow-down-dense"})]}),value:E,onSelect:k,context:P})})]})}),(0,u.jsxs)("div",{className:"et-ai-content-results-prompt__regenerate",children:[(0,u.jsx)(y.FieldLabel,{label:(0,v.default)("userPrompt","Refine Result"),hint:(0,v.default)("userPrompt","$refineHint")}),(0,u.jsxs)("div",{className:"et-ai-content-results-prompt__rewrite",children:[(0,u.jsx)(s.Controller,{name:"rewrite",control:o,render:function(e){var t=e.field;return(0,u.jsx)(m.default,i(i({},t),{},{"data-testid":"refineResult",placeholder:"Rewrite to be more engaging",onKeyDown:function(e){return(0,w.handleEnterKeyCallback)(e,(function(){return S({tag:"retry"})}),""===l)}}))}}),(0,u.jsx)(h.default,{onClick:function(){return S({tag:"retry"})},ripple:!1,disabled:""===l,className:"et-common-button--meta",children:(0,v.default)("userPrompt","Regenerate")})]})]})]})}},82895:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(85893),s=l(r(94184)),c=r(40930),f=l(r(787)),d=r(5528),p=r(14587),h=r(77466),m=r(12351),v=r(98136);r(97147);t.default=function(e){var t=e.isMissingPrompt,r=void 0!==t&&t,n=(0,c.useFormContext)(),o=n.register,a=n.getValues,l=(0,h.useAppSelector)(p.selectPrefilledContentType),g=""!==(0,h.useAppSelector)(p.selectEditorValue),y=(0,h.useAppDispatch)(),b="html"===l?(0,f.default)("userPrompt","What would you like to create using custom code?"):(0,f.default)("userPrompt","How would you like to change the style of this element?");return(0,u.jsxs)("div",{className:"et-ai-code et-fb-form__toggle",children:[(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(d.FieldLabel,{label:b,hint:(0,f.default)("userPrompt","$codePromptHint"),htmlFor:"et_ai_code_style_description"}),(0,u.jsx)("textarea",i({className:(0,s.default)({"et-ai-error-field":r&&""===a("prompt").trim(),"et-ai-control-textarea":!0,"et-fb-disabled-global-shortcuts":!0}),rows:5,id:"et_ai_code_style_description"},o("prompt")))]}),g&&(0,u.jsx)(m.LoadOptions,{onCheckboxChange:function(e){y((0,v.setCodeEditorInsertMode)(e))}})]})}},12351:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadOptions=void 0;var a=r(85893),l=r(87363),u=i(r(787)),s=i(r(81149)),c=r(8035);t.LoadOptions=function(e){var t=e.onCheckboxChange,r=n((0,l.useState)(c.AICodeInsertMode.APPEND),2),o=r[0],i=r[1];(0,l.useEffect)((function(){t(o)}),[]);var f=function(e){var r=e===o?null:e;i(e===o?null:e),t(r)};return(0,a.jsxs)("div",{className:"et-fb-form__group",children:[(0,a.jsx)(s.default,{value:c.AICodeInsertMode.REPLACE,checked:o===c.AICodeInsertMode.REPLACE,onChange:function(){return f(c.AICodeInsertMode.REPLACE)},children:(0,u.default)("aiCode","Replace Existing Content")}),(0,a.jsx)(s.default,{value:c.AICodeInsertMode.INSERT,checked:o===c.AICodeInsertMode.INSERT,onChange:function(){return f(c.AICodeInsertMode.INSERT)},children:(0,u.default)("aiCode","Insert Code at Cursor")})]})}},27687:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var a=r(77466),l=r(14587);t.default=function(){var e=(0,a.useAppSelector)(l.selectAiMode),t=(0,a.useAppSelector)(l.selectEditorValue),r=(0,a.useAppSelector)(l.selectEditorName),n=(0,a.useAppSelector)(l.selectEditorInsertMode),u=(0,a.useAppSelector)(l.selectEditorCursor);return[function(a){if("code"===e){var l,s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({code:null!==(l=null==a?void 0:a.code)&&void 0!==l?l:t,name:r,previousCode:t,insertMode:n,cursor:u},a);window.dispatchEvent(new CustomEvent("ai_prompt_use_code",{detail:s}))}}]}},20759:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(87363),f=r(40930),d=r(96486),p=s(r(27687)),h=r(77466),m=r(98136),v=r(14587);t.default=function(e){var t=e.closePrompt,r=(0,f.useFormContext)().getValues,n=(0,h.useAppDispatch)(),o=l((0,p.default)(),1)[0],a=(0,h.useAppSelector)(v.selectHistory),u=(0,h.useAppSelector)(v.selectAdditionalInfo),s=(0,h.useAppSelector)(v.selectEditorName),g=(0,h.useAppSelector)(v.selectEditorValue),y=(0,h.useAppSelector)(v.selectEditorInsertMode),b=(0,h.useAppSelector)(v.selectEditorCursor),w=(0,h.useAppSelector)(v.selectCurrent),_=l((0,c.useState)(!1),2),x=_[0],S=_[1],k=l((0,c.useState)(""),2),O=k[0],E=k[1],C=u||{},j=C.fields,P=C.field_name;(0,c.useEffect)((function(){a.length&&E(a.at(-1))}),[a]),(0,c.useEffect)((function(){O&&o({code:O})}),[O]);return{isLoading:x,setIsLoading:S,generatedCode:O,setGeneratedCode:E,onChange:function(e){E(a[e])},setRefinedCode:function(e){E(e)},onCodeEditorChange:function(e,t){"code-results"===e&&(n((0,m.updateHistoryAtIndex)({index:w,value:t})),E(t))},handleUseCodeClick:function(){var e=null==P?void 0:P.match(/__hover|_tablet|_phone/),n=j.find((function(t){var r=t.name;return null!=e&&e.length&&(r+=(0,d.first)(e)),r===P})),a={};if(n){var l=n.selectedText,u=n.defaultValue;a=l?{text:u.replace(l,r("text")),fieldName:P}:{text:r("text"),fieldName:P}}else a={code:O,name:s,insertMode:y,previousCode:g,cursor:b,useCodeAction:!0};t(!1),o(i(i({},a),{},{insertMode:a.insertMode||""}))}}}},97849:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.useRefineCode=void 0;var f=r(87363),d=r(40930),p=r(96486),h=r(77466),m=r(50013),v=r(98136),g=r(14587),y=r(8035),b=r(89861);t.useRefineCode=function(e,t){var r=(0,d.useFormContext)().getValues,n=(0,h.useAppDispatch)(),i=(0,h.useAppSelector)(g.selectHistory),l=(0,h.useAppSelector)(g.selectCodeQuery).content,c=(0,h.useAppSelector)(g.selectCurrent),w=s((0,m.useLazyRefineCodeQuery)(),1)[0],_=s((0,m.useGenerateCodeMutation)(),1)[0],x=(0,h.useAppSelector)(g.selectSelectedOption),S=(0,h.useAppSelector)(g.selectPrefilledContentType),k=(0,h.useAppSelector)(g.selectProcessedKey),O=(0,h.useAppSelector)(g.selectContext),E=(0,h.useAppSelector)(g.selectEditorInsertMode),C=(0,h.useAppSelector)(g.selectEditorValue),j=(0,h.useAppSelector)(g.selectLastCodeRequestType),P=s((0,f.useState)(""),2),L=P[0],M=P[1],A=s((0,f.useState)(""),2),T=A[0],I=A[1];(0,f.useEffect)((function(){[y.CodeOption.CODE_WITH_AI,y.CodeOption.IMPROVE_CODE_WITH_AI,y.CodeOption.RESULT].includes(x)||R(x)}),[]);var R=function(){var s,f=(s=o().mark((function u(s){var f,d,h,m,g,x,P=arguments;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(f=P.length>1&&void 0!==P[1]&&P[1],t(!0),d=a({prompt:"retry"===s.tag?r("rewrite"):"",code_language:S,previous_result:i.at(c)||l||""},"before"===k||"after"===k?{pseudo_element:k}:{}),(0,p.isObject)(s)&&(d=a(a({},d),s)),E!==y.AICodeInsertMode.REPLACE&&(d.existing_code=C),!f||"refine"===j){o.next=13;break}return m=a({prompt:r("prompt"),code_language:S,module_html:(0,b.getModuleHTMLForCode)(O.module,S)},"before"===k||"after"===k?{pseudo_element:k}:{}),o.next=9,_(m);case 9:h=o.sent,n((0,v.setLastCodeRequestType)("generate")),o.next=18;break;case 13:return"retry"===s.tag&&(d=a(a({},d),{tag:""})),o.next=16,w(d);case 16:h=o.sent,n((0,v.setLastCodeRequestType)("refine"));case 18:g=(0,p.get)(h,"data.content",""),(x=(0,p.get)(h,"error",!1))&&n((0,v.showError)(x)),g&&(e(g),n((0,v.updateSelectedOption)(y.CodeOption.RESULT)),n((0,v.updateHistory)(g))),t(!1);case 23:case"end":return o.stop()}}),u)})),function(){var e=this,t=arguments;return new Promise((function(r,n){var o=s.apply(e,t);function i(e){u(o,r,n,i,a,"next",e)}function a(e){u(o,r,n,i,a,"throw",e)}i(void 0)}))});return function(e){return f.apply(this,arguments)}}();return{onSubmit:R,onSelect:function(e){var t=e.parentValue,r=e.value,n=e.name;return M(n),I(r),R(t&&t!==r?{tag:[t,r]}:{tag:r})},selectedLabel:L,selectedValue:T}}},535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRefineCodeForm=void 0;var n=r(40930);t.useRefineCodeForm=function(){var e=(0,n.useFormContext)(),t=e.control;return{control:t,register:e.register,getValues:e.getValues,rewrite:(0,n.useWatch)({control:t,name:"rewrite"})}}},22398:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["onChange"],i=["onChange"],a=["onChange"],l=["onChange"];function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var m=r(85893),v=r(87363),g=r(40930),y=r(96486),b=h(r(94184)),w=h(r(92419)),_=h(r(787)),x=h(r(36789)),S=h(r(94526)),k=h(r(62281)),O=h(r(30911)),E=r(5528),C=r(14587),j=r(98136),P=r(77466),L=r(89861),M=r(66705),A=h(r(58685)),T=h(r(71472)),I=h(r(52981)),R=h(r(65074)),N=h(r(42327));r(12524);t.default=function(e){var t,r=(0,g.useFormContext)(),n=r.register,s=r.control,f=r.setValue,p=r.getValues,h=(0,P.useAppDispatch)(),D=d((0,v.useState)(null!==(t=p("prompt"))&&void 0!==t?t:""),2),z=D[0],F=D[1],B=(0,P.useAppSelector)(C.selectImageReference);(0,v.useEffect)((function(){var t=(null==B?void 0:B.base64)||"";""!==t&&f("referenceImageBase64",t),e.triggerFormSubmit&&e.triggerFormSubmit()}),[]);var H,U,W,V,q,G,Y,K=(0,R.default)(),$=K.onAspectRatioChange,Q=K.onDimensionChange,Z=(0,N.default)({setPromptValue:F}),X=Z.descGenerating,J=Z.imageSizeExceeded,ee=Z.handleGeneratePrompt,te=Z.handleImageRemoveButtonClick,re=Z.handleUploadReferenceImageButtonClick;return(0,m.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Image Style"),hint:(0,_.default)("userPrompt","$imageStyleHint")}),(0,m.jsx)(g.Controller,{name:"imageStyle",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,l);return(0,m.jsx)(M.ImageStyleThumbs,c(c({},n),{},{onThumbChange:function(e,t){r(t)}}))}})]}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Image Description"),hint:(0,_.default)("userPrompt","$imagePromptHint")})}),(0,m.jsxs)("div",{className:"et-ai-input-with-icon",children:[(0,m.jsx)(k.default,{id:"et-ai-prompt-desc-generate"}),X?(0,m.jsxs)("p",{className:"et-ai-prompt-loading",children:[(0,_.default)("userPrompt","Generating"),"..."]}):(0,m.jsx)(x.default,{icon:"divi-ai",viewBox:"0 0 28 28","data-testid":"et-ai-prompt-desc-generate","data-for":"et-ai-prompt-desc-generate","data-tip":(0,_.default)("userPrompt","Generate Prompt With AI"),onClick:ee}),(0,m.jsx)("textarea",c({className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",placeholder:(0,_.default)("userPrompt","$imagePlaceholder"),rows:5,maxLength:200,onInput:function(e){return F(e.currentTarget.value)}},n("prompt"))),(0,m.jsx)("span",{className:"et-ai-chars-counter",children:"".concat(z.length,"/200")})]}),(V=""!==B.url,q=(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Reference Image (Optional)"),hint:(0,_.default)("userPrompt","$referenceImageHint")}),G=V&&""!==(H=B.url)&&(0,m.jsx)(A.default,{name:"reference_image",type:"image",className:"et-fb-settings-option-upload-type-image",previewStyle:(W={},W.backgroundColor=I.default.uploadImagePreview,W),showAddButton:!1,showEditButton:!1,showRemoveButton:!0,showResetButton:!1,onClickCanvas:y.noop,onClickAddButton:y.noop,onClickEditButton:y.noop,onClickRemoveButton:te,onClickResetButton:y.noop,children:(U=H,(0,m.jsx)("img",{src:U}))}),Y=!V&&(0,m.jsx)(O.default,{type:"button",className:"et-common-button et-common-button--reference_image",onClick:re,children:(0,_.default)("userPrompt","Upload a Reference Image")}),(0,m.jsxs)("div",{className:"et-fb-form__group",children:[q,J?(0,m.jsx)("p",{className:(0,b.default)({"et-fb-form__error":J}),children:(0,_.default)("userPrompt","The size of the image must be less than 10MB")}):null,G,(0,m.jsx)("input",c({type:"hidden"},n("referenceImageBase64"))),Y]})),function(){if(!(""!==B.url))return!1;var e=(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Reference Image Influence"),hint:(0,_.default)("userPrompt","$referenceImageInfluenceHint")}),t=(0,m.jsx)(g.Controller,{name:"referenceImageInfluence",control:s,defaultValue:.3,render:function(e){var t=e.field.onChange;return(0,m.jsx)(T.default,{default_unit:"%",name:"reference_image_influence",_onChange:function(e,r){!function(e,t,r){var n=parseInt(t)||0,o={url:B.url,base64:B.base64,influence:n};h((0,j.setImageReference)(o)),r(n=n>0?n/100:0)}(0,r,t)},default:50,value:B.influence})}});return(0,m.jsxs)("div",{className:"et-fb-form__group",children:[e,t]})}(),""!==B.url?null:(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Aspect Ratio"),hint:(0,_.default)("userPrompt","$aspectRatioHint")}),(0,m.jsx)(g.Controller,{name:"aspectRatio",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,o);return(0,m.jsx)(w.default,c(c({},n),{},{_onChange:function(e,t){r(t),$()},options:c({},(0,_.default)("userPrompt","aspectRatio"))}))}})]}),""!==B.url?null:(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Size"),hint:(0,_.default)("userPrompt","$sizeHint")}),(0,m.jsxs)("div",{className:"et-fb-form-group-in-row",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)(g.Controller,{name:"imageWidth",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,i);return(0,m.jsx)(S.default,c(c({role:"imageWidth",className:"et-fb-disabled-global-shortcuts"},n),{},{onChange:function(e){var t=e.target.value;r(t),Q("width",parseInt(t))},type:"number",min:"512",step:"1",value:p("imageWidth")||"",placeholder:(0,L.getDefaultDimensions)(p("aspectRatio")).width}))}}),(0,m.jsx)("span",{children:(0,_.default)("userPrompt","Width")})]}),(0,m.jsx)(x.default,{icon:"close"}),(0,m.jsxs)("div",{children:[(0,m.jsx)(g.Controller,{name:"imageHeight",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,a);return(0,m.jsx)(S.default,c(c({role:"imageHeight",className:"et-fb-disabled-global-shortcuts"},n),{},{onChange:function(e){var t=e.target.value;r(t),Q("height",parseInt(t))},type:"number",min:"512",step:"1",value:p("imageHeight")||"",placeholder:(0,L.getDefaultDimensions)(p("aspectRatio")).height}))}}),(0,m.jsx)("span",{children:(0,_.default)("userPrompt","Height")})]})]})]})]})}},86817:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=r(85893),p=r(87363),h=f(r(94184)),m=r(96486);r(6641);var v=r(77466),g=r(14587),y=r(98136),b=r(91021),w=r(13603),_=f(r(787)),x=f(r(2428)),S=f(r(36789)),k=r(89861),O=f(r(13016)),E=f(r(72644)),C=f(r(67240)),j=f(r(78069));r(29518);t.default=function(e){var t=e.isLoading,r=e.selectedImage,n=e.setSelectedImage,i=e.showInitialImages,l=e.downloadCallback,s=(0,v.useAppDispatch)(),c=u((0,p.useState)(!1),2),f=c[0],P=c[1],L=u((0,p.useState)([]),2),M=L[0],A=L[1],T=u((0,p.useState)([]),2),I=T[0],R=T[1],N=u((0,p.useState)(null),2),D=N[0],z=N[1],F=(0,v.useAppSelector)(g.selectDownloadedImages),B=(0,v.useAppSelector)(w.imageEditorLastState),H=(0,v.useAppSelector)(g.selectImagesHistory),U=(0,v.useAppSelector)(g.selectImagesHistoryUrls),W=(0,O.default)({downloadCallback:l,setCurrentlyProcessing:A,imagesHistory:H}).saveToMediaLibrary,V=(0,E.default)({setSelectedImage:n}).onSelectImage,q=(0,C.default)({isLoading:t,setLoadingImages:R}),G=q.imageVersion,Y=q.imagesPlaceholderRef,K=q.handleImageError,$=function(e){return-1!==M.indexOf(e)||I.includes(e)?(0,d.jsx)(x.default,{}):null},Q=(0,p.useMemo)((function(){return null==U?void 0:U.findIndex((function(e){return r===e}))}),[r,U]),Z=t||null==U||!U.length?[(0,d.jsx)("li",{ref:Y,className:"et-ai-single-image et-ai-single-image-placeholder",children:(0,d.jsx)("div",{className:"et-ai-image-animation-placeholder"})},"placeholder-1"),(0,d.jsx)("li",{className:"et-ai-single-image et-ai-single-image-placeholder",children:(0,d.jsx)("div",{className:"et-ai-image-animation-placeholder"})},"placeholder-2"),(0,d.jsx)("li",{className:"et-ai-single-image et-ai-single-image-placeholder",children:(0,d.jsx)("div",{className:"et-ai-image-animation-placeholder"})},"placeholder-3"),(0,d.jsx)("li",{className:"et-ai-single-image et-ai-single-image-placeholder",children:(0,d.jsx)("div",{className:"et-ai-image-animation-placeholder"})},"placeholder-4")]:[],X=t&&!i&&U.length?U.slice(0,-4):U,J=function(e,t){z(null),"start_over"===t&&s((0,b.clearImageEditorHistory)(e));var r=H[e];s((0,y.setImageEditor)(!0)),s((0,b.setEditorImage)(a({url:e},r))),s((0,b.setEditorImageURL)(e))},ee=function(e){var t,r,n=H[e],o=n.width,i=void 0===o?512:o,a=n.height,l=void 0===a?512:a,u=n.scale,s=void 0===u?1:u;if(Array.isArray(s)){var c=s.reduce((function(e,t){return e*t}),1);t=i*c,r=l*c}else t=i*s,r=l*s;return(0,d.jsx)("span",{className:"et-ai-selected-image-dimension-overlay",children:(0,d.jsxs)("span",{className:"et-ai-selected-image-dimension",children:[t," x ",r]})})},te=null==X?void 0:X.map((function(e,t){var n=r===e,o=(0,h.default)({"et-ai-single-image":!0,"et-ai-single-image-selected":n,"et-ai-single-image-dropdown":t===D});return(0,d.jsxs)("li",{className:o,onClick:function(){return V(e)},children:[$(e),(0,d.jsxs)("div",{className:"et-ai-single-image__action-icons",children:[(0,d.jsx)("span",{className:"et-ai-single-image-edit-image",onClick:function(){return function(e,t){var r=H[e];s((0,b.setEditorImageURL)(e)),s((0,b.setEditorImage)(a({url:e},r)));var n=B[e];if((0,m.isEmpty)(n))return s((0,y.setImageEditor)(!0)),void s((0,b.setEditorImageURL)(e));z(t)}(e,t)},children:(0,d.jsx)(S.default,{icon:"image-edit","data-testid":"image-edit-".concat(t),style:{margin:0}})}),!(0,m.includes)(F,e)&&(0,d.jsx)("span",{className:"et-ai-single-image-save-media",onClick:function(){return W(e)},"data-testid":"save-to-media-library-".concat(t),children:(0,d.jsx)(S.default,{icon:"save",style:{margin:0}})}),(0,d.jsx)("span",{className:"et-ai-single-image-open-gallery",onClick:function(){return P(!0)},children:(0,d.jsx)(S.default,{icon:"magnifying-glass",style:{margin:0}})})]}),(0,d.jsx)("span",{className:"et-ai-custom-dropdown-wrapper",children:(0,d.jsxs)("ul",{className:"et-ai-custom-dropdown",children:[(0,d.jsx)("li",{className:"et-ai-custom-dropdown-item",onClick:function(){return J(e,"continue_editing")},children:(0,_.default)("aiImageEditor","Continue Editing")}),(0,d.jsx)("li",{className:"et-ai-custom-dropdown-item",onClick:function(){return J(e,"start_over")},children:(0,_.default)("aiImageEditor","Start Over")})]})}),ee(e),(0,d.jsx)("img",{crossOrigin:"anonymous",alt:"Generated Image ".concat(t+1),src:(0,k.appendQueryString)(e,{reload:G}),onError:function(){return K(e)},onLoad:function(){return R((function(t){return t.filter((function(t){return t!==e}))}))},className:(0,h.default)({"et-ai-single-image-loading":I.includes(e)}),onMouseEnter:function(){return function(e){e!==D&&z(null)}(t)}})]},e)})),re=[].concat(o(te),Z);return(0,p.useEffect)((function(){var e,r;t&&(null===(e=Y.current)||void 0===e||null===(r=e.scrollIntoView)||void 0===r||r.call(e,{behavior:"smooth"}))}),[t]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("ul",{className:"et-ai-images-grid",onMouseLeave:function(){return z(null)},children:re}),(0,d.jsx)(j.default,{open:f,setOpen:P,selectedIndex:Q,imagesHistory:U})]})}},71118:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(15280),a=r(99543),l=n(r(94184)),u=r(26626),s=(0,i.createIcon)("SaveIcon",(0,o.jsx)("path",{d:"M18.95 9.051a1 1 0 1 0-1.414 1.414 5 5 0 1 1-7.07 0A1 1 0 0 0 9.05 9.051a7 7 0 1 0 9.9.001v-.001zm-5.378 8.235a.5.5 0 0 0 .857 0l2.117-3.528a.5.5 0 0 0-.429-.758H15V8a1 1 0 0 0-2 0v5h-1.117a.5.5 0 0 0-.428.758l2.117 3.528z",fillRule:"evenodd"}));t.default=function(){var e=(0,u.useImageGallerySaveButton)(),t=e.currentSlide,r=e.uploading,n=e.currentSliceSrc,c=e.downloadedImages,f=e.saveToMediaLibrary;if(c.includes(n))return null;var d=(0,l.default)({"et-common-icon":!0,"et-common-icon--spinner":r,"et-common-icon--save":!r});return r?(0,o.jsx)("button",{className:"yarl__button",children:(0,o.jsx)(a.SpinnerCircular,{"data-testid":"spinner",size:28,thickness:150,color:"var(--yarl__color_button,hsla(0,0%,100%,.8))",secondaryColor:"var(--yarl__button_background_color,transparent)",className:d})}):(0,o.jsx)(i.IconButton,{label:"Save",icon:s,disabled:!t,className:d,onClick:function(){return f(n)}})}},19475:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(99543),a=n(r(94184)),l=n(r(787)),u=n(r(15263));t.default=function(){var e=(0,u.default)(),t=e.utilizeImage,r=e.uploading,n=(0,a.default)({"et-common-icon":!0,"et-common-icon--spinner":r,"et-common-icon--save":!r});return r?(0,o.jsx)("button",{className:"yarl__button",children:(0,o.jsx)(i.SpinnerCircular,{"data-testid":"spinner",size:28,thickness:150,color:"var(--yarl__color_button,hsla(0,0%,100%,.8))",secondaryColor:"var(--yarl__button_background_color,transparent)",className:n})}):(0,o.jsx)("button",{className:"yarl__button",onClick:t,children:(0,l.default)("userPrompt","Use This Image")})}},78069:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(87363),a=n(r(15280)),l=n(r(71118)),u=n(r(19475)),s=(0,i.memo)((function(e){var t,r=e.imagesHistory,n=e.open,i=e.setOpen,s=e.selectedIndex,c=(null===(t=window.top)||void 0===t?void 0:t.document.body)||window.document.body,f=null==r?void 0:r.map((function(e){return{src:e}}));return(0,o.jsx)(a.default,{open:n,close:function(){return i(!1)},portal:{root:c},slides:f,index:s,styles:{root:{zIndex:"2000000"}},className:"et-ai-images-lightbox",toolbar:{buttons:[(0,o.jsx)(u.default,{},"use"),(0,o.jsx)(l.default,{},"save"),"close"]}})}));t.default=s},40234:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["onChange"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=r(85893),p=r(87363),h=r(40930),m=f(r(94184)),v=f(r(2428)),g=f(r(30911)),y=f(r(94526)),b=f(r(787)),w=r(5528),_=r(14587),x=r(98136),S=r(77466),k=r(89861),O=f(r(86817)),E=r(66705),C=r(74236),j=f(r(92374)),P=f(r(82875)),L=f(r(5599)),M=f(r(98045)),A=f(r(25879));r(43089);t.default=function(e){var t=(0,h.useFormContext)().control,r=(0,S.useAppDispatch)(),n=(0,S.useAppSelector)(_.selectImageQuery),i=(0,S.useAppSelector)(_.selectImagesHistoryUrls),l=(0,S.useAppSelector)(_.selectImagePrompt),c=s((0,p.useState)(!1),2),f=c[0],T=c[1],I=s((0,p.useState)(!1),2),R=I[0],N=I[1],D=s((0,p.useState)(0),2),z=D[0],F=D[1],B=s((0,p.useState)(!0),2),H=B[0],U=B[1],W=s((0,p.useState)(!1),2),V=W[0],q=W[1],G=s((0,p.useState)(""),2),Y=G[0],K=G[1],$=s((0,p.useState)(""),2),Q=$[0],Z=$[1],X=(0,p.useRef)(null),J=(0,h.useWatch)({control:t,name:"rewrite"}),ee=(0,L.default)({autoPrompt:Q,setAutoPrompt:Z,setIsLoading:T,setIsWaitingImages:N,setImagesTimeout:F}).handleGeneratedImage,te=(0,M.default)({setIsUploadingImage:q,setIsWaitingImages:N,setImagesTimeout:F,closePrompt:e.closePrompt}).utilizeImage;(0,j.default)({autoPrompt:Q,utilizeImage:te,handleGeneratedImage:ee,setImagesTimeout:F,setSelectedImage:K,setIsWaitingImages:N,setShowInitialImages:U,setIsLoading:T}),(0,P.default)({isLoading:f,imagesHistoryUrls:i,selectedImage:Y,imagesPlaceholderRef:X,setSelectedImage:K});var re=(0,A.default)({autoPrompt:Q,selectedImage:Y,setIsLoading:T,handleGeneratedImage:ee,utilizeImage:te}),ne=re.onSubmit,oe=re.generateMoreSimilar,ie=re.handleGenerateMoreImages,ae=re.handleUseImage,le={"et-fb-form__toggle":!0,"et-ai-modal-disabled":f||R},ue={"et-ai-button-disabled":f||R},se={"et-ai-button-disabled":!Y};return(0,d.jsxs)("div",{className:"et-ai-image-results-container",children:[R&&(0,d.jsx)(C.ImageProgressBar,{estimatedTime:z},z),V&&(0,d.jsx)(v.default,{}),(0,d.jsx)("div",{className:"et-fb-form__toggle et-fb-form__description-toggle",children:(0,d.jsxs)("div",{className:"et-ai-content-results-prompt__description",children:[(0,d.jsx)("p",{className:"et-ai-original-prompt-text",children:l}),(0,d.jsx)(O.default,{isLoading:f,selectedImage:Y,setSelectedImage:K,showInitialImages:H,downloadCallback:te}),(0,d.jsxs)("ul",{className:"et-ai-image-buttons",children:[(0,d.jsx)("li",{className:(0,m.default)(se),onClick:ae,children:(0,b.default)("userPrompt","Use This Image")}),(0,d.jsx)("li",{className:(0,m.default)(ue),onClick:ie,children:(0,b.default)("userPrompt","tags.GenerateMore")})]})]})}),(0,d.jsxs)("div",{className:(0,m.default)(le),children:[(0,d.jsxs)("div",{className:"et-ai-content-results-prompt__tags",children:[(0,d.jsx)(w.FieldLabel,{label:(0,b.default)("userPrompt","Modify Selected Image")}),(0,d.jsxs)("div",{className:"et-ai-content-results-prompt__tags-pill",children:[(0,d.jsx)("label",{className:"et-ai-content-results-prompt__tag",onClick:function(){return oe()},children:(0,b.default)("userPrompt","Generate More Like This One")}),(0,d.jsx)(h.Controller,{name:"imageStyle",control:t,render:function(e){var t=e.field,i=t.onChange,l=u(t,o);return(0,d.jsx)(E.ImageStyleThumbs,a(a({},l),{},{onThumbChange:function(e,t){i(t),r((0,x.updateImageQuery)(a(a({},n),{},{style:t}))),oe(t)},customMarker:"arrowDownDense"}))}})]})]}),(0,d.jsxs)("div",{className:"et-ai-content-results-prompt__regenerate",children:[(0,d.jsx)(w.FieldLabel,{label:(0,b.default)("userPrompt","New Description"),hint:(0,b.default)("userPrompt","$refineHint"),htmlFor:"rewrite"}),(0,d.jsxs)("div",{className:"et-ai-content-results-prompt__rewrite",children:[(0,d.jsx)(h.Controller,{name:"rewrite",control:t,render:function(e){var t=e.field;return(0,d.jsx)(y.default,a({className:"et-fb-disabled-global-shortcuts",placeholder:"".concat((0,b.default)("userPrompt","Refine your prompt"),"..."),maxLength:100,id:"rewrite",onKeyDown:function(e){return(0,k.handleEnterKeyCallback)(e,(function(){return ne()}),""===J)}},t))}}),(0,d.jsx)(g.default,{onClick:function(){return ne()},ripple:!1,disabled:""===J,className:"et-common-button--meta",children:(0,b.default)("userPrompt","Regenerate")})]})]})]})]})}},66705:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageStyleThumbs=void 0;var u=r(85893),s=r(87363),c=l(r(92419)),f=l(r(787)),d=l(r(97120));r(19860),t.ImageStyleThumbs=(0,s.forwardRef)((function(e,t){var r=(0,d.default)();return(0,u.jsx)(c.default,i(i({},e),{},{ref:t,_onChange:e.onThumbChange,options:r,getSvgContent:function(e){var t,r=(0,f.default)("userPrompt","imageStyles");return(0,u.jsx)("div",{className:"grid-item",children:(0,u.jsx)("div",{className:"thumbnail-container",children:(0,u.jsx)("img",{className:"thumbnail",src:null===(t=r[e])||void 0===t?void 0:t.thumbnail,alt:e})})})},additionalContentFirst:!0}))}))},65074:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var s=r(87363),c=r(40930);t.default=function(){var e=(0,c.useFormContext)(),t=e.setValue,r=e.getValues,n=l((0,s.useState)(""),2),o=n[0],u=n[1],f=l((0,s.useState)({width:!1,height:!1}),2),d=f[0],p=f[1],h=function(e,t){var n,o,i;switch("width"===e?(o=t/3*4,i=t/8*5):(o=t/4*3,i=t/5*8),r("aspectRatio")){case"portrait":n=o;break;case"landscape":n=i;break;default:n=t}return Math.floor(n)};return{onAspectRatioChange:function(){if(p({width:!1,height:!1}),"width"===o){var e=h(o,r("imageWidth"));e&&e>0&&t("imageHeight",e)}if("height"===o){var n=h(o,r("imageHeight"));n&&n>0&&t("imageWidth",n)}},onDimensionChange:function(e,n){!function(e){var r=i(i({},d),{},a({},e,!0));r.width&&r.height&&t("aspectRatio","custom"),u(e),p(r)}(e),"custom"!==r("aspectRatio")&&(isNaN(n)||("width"===e&&t("imageHeight",h(e,n)),"height"===e&&t("imageWidth",h(e,n))))}}}},5599:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(96486),f=s(r(787)),d=r(98136),p=r(89861),h=r(14587),m=r(77466);t.default=function(e){var t=e.autoPrompt,r=e.setAutoPrompt,n=e.setIsLoading,i=e.setIsWaitingImages,a=e.setImagesTimeout,s=(0,m.useAppDispatch)(),v=(0,m.useAppSelector)(h.selectImageQuery),g=(0,m.useAppSelector)(h.selectPromptHistories);return{handleGeneratedImage:function(e,h){var m=(0,c.get)(e,"data.content",[]),y=(0,c.get)(e,"data.prompt",t),b=(0,c.get)(e,"error",!1),w=(0,c.get)(e,"data.eta",0),_=(0,c.get)(e,"data.status",""),x=Math.ceil((0,c.toNumber)(w)),S=(0,c.isNaN)(x)?0:1e3*x+2e3,k=h||{},O=k.prompt,E=void 0===O?"":O,C=k.width,j=void 0===C?512:C,P=k.height,L=void 0===P?512:P,M=k.scale,A=void 0===M?1:M;b&&s((0,d.showError)(b)),"busy"===_?(n(!1),s((0,d.showError)({status:"busy",error:(0,f.default)("userPrompt","$serverBusy")}))):(i(!0),a(S/1e3),setTimeout((function(){if(m.length){var e=(0,p.createImagesHistoryData)(m,j,L,A),t=E||v.prompt,a=(0,c.get)(g,t,[]);r(y),s((0,d.setPromptHistories)(l(l({},g),{},u({},t,[].concat(o(a),o(m)))))),s((0,d.updateImagesHistory)(e))}n(!1),i(!1)}),S))}}}},42327:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var d=r(87363),p=r(40930),h=r(96486),m=r(14587),v=r(98136),g=r(77466),y=r(50013),b=r(89861);t.default=function(e){var t=e.setPromptValue,r=(0,p.useFormContext)().setValue,n=c((0,d.useState)(!1),2),o=n[0],a=n[1],u=c((0,d.useState)(!1),2),f=u[0],w=u[1],_=(0,g.useAppDispatch)(),x=(0,g.useAppSelector)(m.selectAdditionalInfo),S=(0,g.useAppSelector)(m.selectContext),k=c((0,y.useGeneratePromptMutation)(),1)[0],O=(0,g.useAppSelector)(m.selectImageReference),E=(0,g.useAppSelector)(m.selectImageQuery),C=function(){var e=s(l().mark((function e(){var n,o,i,u,s,c,f,d,p,m,g,y;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(n=x||{}).module,i=n.fields,u=window.et_ai_data,s=u.site_name,c=u.site_description,f={},r("prompt",""),a(!0),i.map((function(e){var t=e.name,r=e.defaultValue;f[t]=(0,h.isUndefined)(r)?"":r})),d={site_name:s,site_description:c,module_name:o,content_type:"image",module_fields:f,page_content:S.page},e.prev=7,e.next=10,k(d);case 10:p=e.sent,m=(0,h.get)(p,"data.prompt",""),(g=(0,h.get)(p,"error",!1))&&_((0,v.showError)(g)),m&&(y=(0,b.stripDoubleQuotes)(m),r("prompt",y),t(y)),a(!1),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(7),console.log(e.t0);case 21:case"end":return e.stop()}}),e,null,[[7,18]])})));return function(){return e.apply(this,arguments)}}();return{descGenerating:o,imageSizeExceeded:f,handleGeneratePrompt:C,handleImageRemoveButtonClick:function(){_((0,v.setImageReference)({url:"",base64:"",influence:0})),r("referenceImageBase64","")},handleUploadReferenceImageButtonClick:function(){var e,t;w(!1);var n=null===(e=window)||void 0===e||null===(t=e.top)||void 0===t?void 0:t.wp.media;if(n)var o=n({title:"Upload Image",multiple:!1}).open().on("select",s(l().mark((function e(){var t,n,a,u,s,c,f,d,p;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=o.state().get("selection").first().toJSON(),c=(null==s||null===(t=s.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.height)||512,f=(null==s||null===(a=s.sizes)||void 0===a||null===(u=a.full)||void 0===u?void 0:u.width)||512,d={name:s.filename,size:s.filesizeInBytes,type:s.mime,url:s.url,height:c,width:f},!(s.filesizeInBytes&&s.filesizeInBytes>1e7)){e.next=7;break}return w(!0),e.abrupt("return");case 7:p=function(e,t,n,o){var a=i(i({},O),{},{url:d.url,base64:e});_((0,v.setImageReference)(a)),_((0,v.updateImageQuery)(i(i({},E),{},{width:n,height:o,scale:t}))),r("referenceImageBase64",e),r("imageHeight",c),r("imageWidth",f)},(0,b.convertImageToBase64)(d,p);case 9:case"end":return e.stop()}}),e)}))))}}}},26626:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useImageGallerySaveButton=void 0;var f=r(87363),d=r(15280),p=r(77466),h=r(14587),m=r(74968),v=r(98136),g=r(89861),y=c(r(17691));t.useImageGallerySaveButton=function(){var e,t=(0,d.useLightboxState)().currentSlide,r=l((0,f.useState)(!1),2),n=r[0],u=r[1],s=null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"",c=(0,p.useAppSelector)(h.selectDownloadedImages),b=(0,p.useAppSelector)(h.selectImagesHistory),w=l((0,m.useUploadImageMutation)(),1)[0],_=(0,y.default)().applyFullImageUpscale,x=(0,p.useAppDispatch)(),S=function(){var e,t=(e=o().mark((function e(t){var r,n,a,l,s,f,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=b[r=t].scale,a=null!=n?n:1,u(!0),l=(0,g.removeQueryParam)(t,"v"),e.next=7,_(l,a);case 7:return r=e.sent,e.prev=8,e.next=11,w({url:encodeURIComponent(r),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 11:f=e.sent,(d=null==f||null===(s=f.data)||void 0===s?void 0:s.localImageURL)&&""!==d&&x((0,v.updateDownloadedImages)([].concat(i(c),[t]))),e.next=18;break;case 16:e.prev=16,e.t0=e.catch(8);case 18:u(!1);case 19:case"end":return e.stop()}}),e,null,[[8,16]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function l(e){a(i,n,o,l,u,"next",e)}function u(e){a(i,n,o,l,u,"throw",e)}l(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{currentSlide:t,uploading:n,currentSliceSrc:s,downloadedImages:c,saveToMediaLibrary:S}}},25879:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["image_base64","image_influence"];function i(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var m=r(40930),v=r(14587),g=r(98136),y=r(77466),b=r(89861),w=r(88712),_=r(50013),x=r(8035),S=h(r(92e3));t.default=function(e){var t=e.autoPrompt,r=e.selectedImage,n=e.setIsLoading,l=e.handleGeneratedImage,s=e.utilizeImage,c=(0,m.useFormContext)().getValues,p=(0,y.useAppDispatch)(),h=(0,y.useAppSelector)(v.selectImageQuery),k=(0,y.useAppSelector)(v.selectImagesHistory),O=(0,y.useAppSelector)(v.selectImagePrompt),E=(0,y.useAppSelector)(v.selectSelectedOption),C=d((0,_.useGenerateImageMutation)(),1)[0],j=d((0,_.useRefineImageMutation)(),1)[0],P=(0,S.default)(),L=function(){var e=f(a().mark((function e(r){var n,o;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c(),o=n.rewrite,"generateMore"!==r){e.next=7;break}if(x.ImageOption.GENERATE_AUTOMATICALLY!==E){e.next=5;break}return R(t),e.abrupt("return");case 5:return R(),e.abrupt("return");case 7:o&&(p((0,g.updateImageQuery)(u(u({},h),{},{prompt:o}))),R(o));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=f(a().mark((function e(s){var c,f,d,p,m,v,g;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n(!0),c=t||O,h.image_base64,h.image_influence,f=i(h,o),d=512,p=512,""===r){e.next=12;break}return e.next=8,(0,b.getImageSizeByUrl)(r);case 8:m=e.sent,v={width:m.sizes.full.width,height:m.sizes.full.height},d=(0,w.getDivisibleByEight)(v.width),p=(0,w.getDivisibleByEight)(v.height);case 12:return e.prev=12,g=u(u({},f),{},{image_base64:"",prompt:c,image_url:r,style:s||h.style,width:d,height:p}),e.t0=l,e.next=17,j(g);case 17:e.t1=e.sent,e.t2=g,(0,e.t0)(e.t1,e.t2),e.next=25;break;case 22:e.prev=22,e.t3=e.catch(12),console.log(e.t3);case 25:case"end":return e.stop()}}),e,null,[[12,22]])})));return function(t){return e.apply(this,arguments)}}(),A=function(e){return null!=e?e:h.prompt},T=function(e){var t;return null!==(t=null!=e?e:h.style)&&void 0!==t?t:""},I=function(){var e=f(a().mark((function e(){var t;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),e.next=3,P();case 3:(t=e.sent)?l(t):n(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=f(a().mark((function e(t,r){var o,i,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),o=A(t),i=T(r),s=u(u({},h),{},{prompt:o,style:i}),e.prev=4,e.t0=l,e.next=8,C(h);case 8:e.t1=e.sent,e.t2=s,(0,e.t0)(e.t1,e.t2),e.next=16;break;case 13:e.prev=13,e.t3=e.catch(4),console.log(e.t3);case 16:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(t,r){return e.apply(this,arguments)}}();return{onSubmit:L,generateMoreSimilar:M,handleGenerateMoreImages:I,handleUseImage:function(){var e=k[r].scale;s(r,!1,"",e)}}}},67240:(e,t,r)=>{"use strict";function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var l=r(87363);t.default=function(e){var t=e.isLoading,r=e.setLoadingImages,i=o((0,l.useState)(0),2),a=i[0],u=i[1],s=(0,l.useRef)(null);return(0,l.useEffect)((function(){var e,r;t&&(null===(e=s.current)||void 0===e||null===(r=e.scrollIntoView)||void 0===r||r.call(e,{behavior:"smooth"}))}),[t]),{imageVersion:a,imagesPlaceholderRef:s,handleImageError:function(e){a>20?r((function(t){return t.filter((function(t){return t!==e}))})):(r((function(t){return[].concat(n(t),[e])})),setTimeout((function(){u(a+1)}),1e3))}}}},82875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(96486);t.default=function(e){var t=e.isLoading,r=e.imagesHistoryUrls,i=e.selectedImage,a=e.imagesPlaceholderRef,l=e.setSelectedImage;(0,n.useEffect)((function(){var e;t?null===(e=a.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}):i||(0,o.isEmpty)(r)||l(r[0])}),[t])}},92374:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["image_base64","image_influence","width","height"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,l,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,u,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var h=r(87363),m=r(40930),v=r(96486),g=r(14587),y=r(98136),b=r(77466),w=r(88712),_=r(50013),x=r(8035);t.default=function(e){var t=(0,m.useFormContext)().setValue,r=(0,b.useAppDispatch)(),n=(0,b.useAppSelector)(g.selectImageQuery),i=(0,b.useAppSelector)(g.selectImageETA),c=(0,b.useAppSelector)(g.selectImagesHistoryUrls),p=(0,b.useAppSelector)(g.selectImagePrompt),S=(0,b.useAppSelector)(g.selectSelectedOption),k=(0,b.useAppSelector)(g.selectSkipAutoAction),O=(0,b.useAppSelector)(g.selectAdditionalInfo),E=(0,b.useAppSelector)(g.selectContext),C=(0,b.useAppSelector)(g.selectPrefilledContentType),j=(0,b.useAppSelector)(g.selectModuleFields),P=d((0,_.useGenerateImageMutation)(),1)[0],L=d((0,_.useAutoGenerateImageMutation)(),1)[0],M=d((0,_.useRefineImageMutation)(),1)[0],A=(0,b.useAppSelector)(g.selectImageReference),T=window.et_ai_data,I=T.site_name,R=T.site_description,N=T.site_language,D=(O||{}).module;(0,h.useEffect)((function(){if(!k){if((0,v.isString)(S))switch(S){case x.ImageOption.GENERATE_AUTOMATICALLY:case x.ImageOption.GENERATE_AND_REPLACE:z();break;case x.ImageOption.REIMAGINE:F()}else("string"==typeof S.tag||S.tag&&"edit_image_with_ai"!==S.tag[0])&&F();r((0,y.setSelectedPrompt)(n.prompt)),(0,v.isEmpty)(c)||e.setSelectedImage(c[0]),i&&!(0,v.isNaN)(i)&&0!==i&&(e.setIsWaitingImages(!0),e.setImagesTimeout(i/1e3),e.setShowInitialImages(!1),e.setIsLoading(!0),setTimeout((function(){e.setIsLoading(!1),e.setIsWaitingImages(!1),e.setShowInitialImages(!0),r((0,y.setImageETA)(0))}),i))}}),[]);var z=function(){var t=f(s().mark((function t(){var r;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.setIsLoading(!0),r={site_name:I,site_description:R,module_name:D,module_fields:j,page_content:E.page,content_type:C,language:N},t.prev=2,t.t0=e,t.next=6,L(r);case 6:t.t1=t.sent,t.t0.handleGeneratedImage.call(t.t0,t.t1),t.next=13;break;case 10:t.prev=10,t.t2=t.catch(2),console.log(t.t2);case 13:case"end":return t.stop()}}),t,null,[[2,10]])})));return function(){return t.apply(this,arguments)}}(),F=function(){var i=f(s().mark((function i(){var c,f,d,h,m,g,b,_,k,O,E,C,j,L,T,I;return s().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(e.setIsLoading(!0),f={},d=null!==(c=e.autoPrompt)&&void 0!==c?c:p,n.image_base64,n.image_influence,h=n.width,m=n.height,g=u(n,o),b=(0,w.getDivisibleByEight)(h),_=(0,w.getDivisibleByEight)(m),(k=(0,v.isObject)(S)&&S.tag||"")&&"style"===k[0]?(C=null!==(O=k[0])&&void 0!==O?O:"",j=null!==(E=k[1])&&void 0!==E?E:"",t("imageStyle",j),r((0,y.updateImageQuery)(a(a({},n),{},{style:j}))),f=l({},C,j)):k&&"upscale"===k[0]&&(f={scale:parseInt(k[1])||1}),i.prev=8,!(0,v.isString)(S)||x.ImageOption.REIMAGINE!==S){i.next=20;break}return f={tag:x.ImageOption.REIMAGINE},L=a(a({},g),{},{width:b,height:_,image_base64:A.base64,image_influence:A.influence>0?A.influence/100:A.influence,prompt:d},f),i.t0=e,i.next=15,M(L);case 15:i.t1=i.sent,i.t2=L,i.t0.handleGeneratedImage.call(i.t0,i.t1,i.t2),i.next=33;break;case 20:if(!(0,v.isObject)(S)||!k[0]||"upscale"!==k[0]){i.next=26;break}T=parseInt(k[1])||1,r((0,y.updateImageQuery)(a(a({},n),{},{scale:T}))),e.utilizeImage(A.url,!1,A.base64,T),i.next=33;break;case 26:return I=a(a({},g),{},{width:b,height:_,image_base64:A.base64,image_influence:A.influence>0?A.influence/100:A.influence,prompt:d},f),i.t3=e,i.next=30,P(I);case 30:i.t4=i.sent,i.t5=I,i.t3.handleGeneratedImage.call(i.t3,i.t4,i.t5);case 33:i.next=38;break;case 35:i.prev=35,i.t6=i.catch(8),console.log(i.t6);case 38:case"end":return i.stop()}}),i,null,[[8,35]])})));return function(){return i.apply(this,arguments)}}()}},13016:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}Object.defineProperty(t,"__esModule",{value:!0}),t.useImageProcessing=void 0;var u=r(77466),s=r(98136),c=r(14587);t.useImageProcessing=function(e){var t=e.downloadCallback,r=e.setCurrentlyProcessing,n=e.imagesHistory,a=(0,u.useAppDispatch)(),f=(0,u.useAppSelector)(c.selectDownloadedImages),d=function(){var e,u=(e=o().mark((function e(l){var u,c,d,p;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r((function(e){return[].concat(i(e),[l])})),!t){e.next=8;break}return u=n[l],c=(u||{}).scale,d=void 0===c?1:c,e.next=6,t(l,!0,"",d);case 6:(p=e.sent)&&""!==p&&a((0,s.updateDownloadedImages)([].concat(i(f),[l])));case 8:r((function(e){var t=e.indexOf(l);return e.splice(t,1),i(e)}));case 9:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,u,"next",e)}function u(e){l(i,n,o,a,u,"throw",e)}a(void 0)}))});return function(e){return u.apply(this,arguments)}}();return{saveToMediaLibrary:d}},t.default=t.useImageProcessing},72644:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var i=r(77466),a=r(98136),l=r(14587);t.default=function(e){var t=e.setSelectedImage,r=(0,i.useAppDispatch)(),o=(0,i.useAppSelector)(l.selectPromptHistories);return{onSelectImage:function(e){t(e);for(var i=0,l=Object.entries(o);i<l.length;i++){var u=n(l[i],2),s=u[0];u[1].includes(e)&&r((0,a.setSelectedPrompt)(s))}}}}},97120:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=r(96486),a=n(r(787));t.default=function(){return(0,o.useMemo)((function(){var e=(0,a.default)("userPrompt","imageStyles"),t={};return(0,i.forEach)(e,(function(e,r){t[r]=null==e?void 0:e.label})),t}),[])}},17691:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function a(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var c=r(96486),f=r(50013);t.default=function(){var e=l((0,f.useUpscaleImageMutation)(),1)[0],t=function(){var t,r=(t=o().mark((function t(r,n,a){var l,u,s,f,d,p;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l=Array.isArray(n)?n:[n],u=r,s=a,f=i(l),t.prev=4,p=o().mark((function t(){var r,n,i,a,l,f,p,h,m;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=d.value,n={scale:r},s?n.image_base64=u:n.image_url=u,!(r>1)){t.next=14;break}return t.next=6,null===(i=e(n))||void 0===i?void 0:i.unwrap();case 6:return f=t.sent,p=null!==(a=null==f?void 0:f.eta)&&void 0!==a?a:0,h=Math.ceil((0,c.toNumber)(p)),m=isNaN(h)?0:1e3*h+2e3,t.next=12,new Promise((function(e){return setTimeout(e,m)}));case 12:u=null!==(l=null==f?void 0:f.content)&&void 0!==l?l:u,s=!1;case 14:case"end":return t.stop()}}),t)})),f.s();case 7:if((d=f.n()).done){t.next=11;break}return t.delegateYield(p(),"t0",9);case 9:t.next=7;break;case 11:t.next=16;break;case 13:t.prev=13,t.t1=t.catch(4),f.e(t.t1);case 16:return t.prev=16,f.f(),t.finish(16);case 19:return t.abrupt("return",u);case 20:case"end":return t.stop()}}),t,null,[[4,13,16,19]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function l(e){a(i,n,o,l,u,"next",e)}function u(e){a(i,n,o,l,u,"throw",e)}l(void 0)}))});return function(e,t,n){return r.apply(this,arguments)}}();return{applyFullImageUpscale:t}}},15263:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(87363),f=r(15280),d=r(77466),p=r(14587),h=r(74968),m=r(50013),v=r(98136),g=r(89861),y=s(r(17691));t.default=function(){var e,t=(0,f.useLightboxState)().currentSlide,r=null!==(e=null==t?void 0:t.src)&&void 0!==e?e:"",n=(0,d.useAppSelector)(p.selectAdditionalInfo),i=(0,d.useAppSelector)(p.selectImagesHistory),u=l((0,h.useUploadImageMutation)(),1)[0],s=l((0,m.useUpscaleImageMutation)(),1)[0],b=(0,y.default)().applyFullImageUpscale,w=(0,d.useAppDispatch)(),_=l((0,c.useState)(!1),2),x=_[0],S=_[1];return{utilizeImage:(0,c.useCallback)(a(o().mark((function e(){var t,a,l,s,c,f,d,p,h,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i[t=r].scale,l=null!=a?a:1,S(!0),e.prev=4,s=(0,g.removeQueryParam)(r,"v"),e.next=8,b(s,l);case 8:t=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),console.log(e.t0);case 14:return e.prev=14,e.next=17,u({url:encodeURIComponent(t),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 17:return d=e.sent,p=null==d||null===(c=d.data)||void 0===c?void 0:c.localImageURL,h=null==d||null===(f=d.data)||void 0===f?void 0:f.localImageID,p&&(m={text:p,localImageID:h,fieldName:null==n?void 0:n.field_name},window.dispatchEvent(new CustomEvent("ai_prompt_use_text_click",{detail:m})),w((0,v.hideModal)())),S(!1),e.abrupt("return",p);case 25:return e.prev=25,e.t1=e.catch(14),console.log(e.t1),e.abrupt("return","");case 29:case"end":return e.stop()}}),e,null,[[4,11],[14,25]])}))),[r,n,i,u,s,w]),uploading:x,applyFullImageUpscale:b}}},98045:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(14587),c=r(77466),f=r(89861),d=r(74968),p=u(r(17691));t.default=function(e){var t=e.setIsUploadingImage,r=e.setIsWaitingImages,n=(e.setImagesTimeout,e.closePrompt),l=(0,c.useAppSelector)(s.selectImageQuery),u=(0,c.useAppSelector)(s.selectImageReference),h=a((0,d.useUploadImageMutation)(),1)[0],m=(0,p.default)().applyFullImageUpscale,v=(0,c.useAppSelector)(s.selectAdditionalInfo).field_name,g=function(){var e,a=(e=o().mark((function e(i){var a,s,c,d,p,g,y,b,w,_,x,S,k,O,E,C,j=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=j.length>1&&void 0!==j[1]&&j[1],c=j.length>2&&void 0!==j[2]?j[2]:"",d=j.length>3&&void 0!==j[3]?j[3]:1,i){e.next=5;break}return e.abrupt("return");case 5:return p=i,g=1!==d?d:null!==(a=null==l?void 0:l.scale)&&void 0!==a?a:1,s||t(!0),y=(0,f.removeQueryParam)(i,"v"),b=(0,f.isCurrentDomain)(i)||""!==c,w=(0,f.isCurrentDomain)(i)?u.base64:c,_=b&&w?w:y,s||r(!0),e.next=15,m(_,g,b);case 15:return p=e.sent,s||r(!1),e.prev=17,e.next=20,h({url:encodeURIComponent(p),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 20:return k=e.sent,O=null==k||null===(x=k.data)||void 0===x?void 0:x.localImageURL,E=null==k||null===(S=k.data)||void 0===S?void 0:S.localImageID,s||t(!1),!s&&O&&(C={text:O,localImageID:E,fieldName:v},window.dispatchEvent(new CustomEvent("ai_prompt_use_text_click",{detail:C})),n()),e.abrupt("return",O);case 28:return e.prev=28,e.t0=e.catch(17),console.log(e.t0),e.abrupt("return","");case 32:case"end":return e.stop()}}),e,null,[[17,28]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))});return function(e){return a.apply(this,arguments)}}();return{utilizeImage:g,applyFullImageUpscale:m}}},56921:function(e,t,r){"use strict";var n=["value","onChange"],o=["value","onChange"],i=["value","onChange"],a=["value","onChange"];function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===l(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var m=r(85893),v=r(87363),g=r(40930),y=r(37727),b=r(77466),w=h(r(30911)),_=h(r(42057)),x=h(r(36789)),S=r(5528),k=h(r(787)),O=h(r(92419)),E=h(r(12172)),C=h(r(33270)),j=r(98136),P=r(14587),L=r(28809),M=r(77466);r(1772);var A=window.et_ai_data.available_fonts,T=d({"":(0,k.default)("userPrompt","layoutsFont.letAIChoose")},A),I="headingFont",R="bodyFont",N="headingFontColor",D="bodyFontColor",z="primaryColor",F="secondaryColor",B="siteDescription";t.default=function(e){var t,r=e.updateLayoutDefaultSettings,l=(0,M.useAppDispatch)(),c=s((0,L.useSaveLayoutDefaultsMutation)(),1)[0],f=(0,b.useAppSelector)(P.selectDefaultBodyFontColor),h=(0,b.useAppSelector)(P.selectDefaultHeadingFontColor),A=(0,b.useAppSelector)(P.selectDefaultPrimaryFontColor),H=(0,b.useAppSelector)(P.selectDefaultSecondaryColor),U=(0,b.useAppSelector)(P.selectIsLayoutDefaultSettingsOpen),W=(0,v.useRef)(null),V=window.et_ai_data,q=V.primary_color,G=V.secondary_color,Y=V.ai_default_body_font,K=V.ai_default_heading_font,$=V.default_site_desc,Q=(0,g.useForm)({defaultValues:(t={},p(t,I,K),p(t,R,Y),p(t,N,h),p(t,D,f),p(t,z,A),p(t,F,H),p(t,B,$),t)}),Z=Q.handleSubmit,X=Q.control,J=Q.register,ee=Q.setValue,te=function(e){window.et_ai_data=d(d({},window.et_ai_data),{},{ai_default_heading_font:e[I],ai_default_body_font:e[R],primary_color:e[z],secondary_color:e[F],default_site_desc:e[B]}),r&&r(e),c(e),l((0,j.closeLayoutDefaultSettings)()),l((0,j.setDefaultSecondaryColor)(e[F])),l((0,j.setDefaultPrimaryColor)(e[z])),l((0,j.setDefaultBodyFontColor)(e[D])),l((0,j.setDefaultHeadingFontColor)(e[N]))};(0,v.useEffect)((function(){var e,t=function(e){W.current&&!W.current.contains(e.target)&&l((0,j.closeLayoutDefaultSettings)())};U&&(null===(e=window.top)||void 0===e||e.document.addEventListener("mousedown",t));return function(){var e;null===(e=window.top)||void 0===e||e.document.removeEventListener("mousedown",t)}}),[]);var re=function(){return l((0,j.closeLayoutDefaultSettings)())};return(0,m.jsx)(y.Motion,{defaultStyle:{opacity:0,scale:.5},style:{opacity:(0,y.spring)(1,{stiffness:300,damping:20}),scale:(0,y.spring)(1,{stiffness:300,damping:20})},children:function(e){return(0,m.jsx)("div",{className:"et-ai-default-layout-settings-modal",style:{opacity:e.opacity,transform:"scale(".concat(e.scale,") translate(-50%, -5px)")},ref:W,children:(0,m.jsxs)("form",{onSubmit:Z(te),children:[(0,m.jsxs)("div",{className:"et-ai-default-layout-settings-modal-content",children:[(0,m.jsx)("header",{className:"et-ai-default-layout-settings-modal-header",children:(0,m.jsx)("h4",{children:(0,k.default)("userPrompt","Divi AI Default Styles")})}),(0,m.jsx)("p",{className:"et-ai-default-layout-settings-modal-description",children:(0,k.default)("userPrompt","$layoutSettingsDescription")}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:I,control:X,render:function(e){var t=e.field,r=t.value,o=t.onChange,i=u(t,n);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Heading Font"),hint:(0,k.default)("userPrompt","$headingFontHint"),resetAction:""!==r?function(){return o("")}:void 0}),(0,m.jsx)(O.default,d(d({},i),{},{value:r,options:d({},T),_onChange:function(e,t){return o(t)},searchable:!0,searchPlaceholder:(0,k.default)("userPrompt","Search Fonts")}))]})}})}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:R,control:X,render:function(e){var t=e.field,r=t.value,n=t.onChange,i=u(t,o);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Body Font"),hint:(0,k.default)("userPrompt","$bodyFontHint"),resetAction:""!==r?function(){return n("")}:void 0}),(0,m.jsx)(O.default,d(d({},i),{},{value:r,options:d({},T),_onChange:function(e,t){return n(t)},searchable:!0,searchPlaceholder:(0,k.default)("userPrompt","Search Fonts")}))]})}})}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:N,control:X,render:function(e){var t=e.field,r=t.value,n=t.onChange,o=u(t,i);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Heading Font Color"),resetAction:""!==r?function(){return n("")}:void 0}),(0,m.jsx)(C.default,d(d({},o),{},{value:r,_onChange:function(e,t){return n(t)},animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0}))]})}})}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:D,control:X,render:function(e){var t=e.field,r=t.value,n=t.onChange,o=u(t,a);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Body Font Color"),resetAction:""!==r?function(){return n("")}:void 0}),(0,m.jsx)(C.default,d(d({},o),{},{value:r,_onChange:function(e,t){return n(t)},animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0}))]})}})}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:z,control:X,defaultValue:q,render:function(e){var t=e.field.value;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Primary Color"),resetAction:""!==t?function(){return ee(z,"")}:void 0}),(0,m.jsx)(C.default,{value:t,_onChange:function(e,t){return ee(z,t)},name:z,animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0})]})}})}),(0,m.jsx)("div",{className:"et-fb-form__group",children:(0,m.jsx)(g.Controller,{name:F,control:X,defaultValue:G,render:function(e){var t=e.field.value;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Secondary Color"),resetAction:""!==t?function(){return ee(F,"")}:void 0}),(0,m.jsx)(C.default,{value:t,_onChange:function(e,t){return ee(F,t)},name:F,animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0})]})}})}),(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(S.FieldLabel,{label:(0,k.default)("userPrompt","Website Description (Optional)"),hint:(0,k.default)("userPrompt","$siteDescHint")}),(0,m.jsx)(E.default,d({className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",placeholder:(0,k.default)("userPrompt","$siteDescPlaceholder"),rows:5},J(B)))]})]}),(0,m.jsx)("footer",{className:"et-ai-default-layout-settings-modal-actions",children:(0,m.jsxs)(_.default,{block:!0,children:[(0,m.jsx)(w.default,{className:"et-common-button--danger",onClick:re,title:"Close",children:(0,m.jsx)(x.default,{icon:"exit",color:"#FFFFFF"})}),(0,m.jsx)(w.default,{type:"submit",className:"et-common-button--success",title:"Save",children:(0,m.jsx)(x.default,{icon:"check",color:"#FFFFFF"})})]})})]})})}})}},10376:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["onChange"],i=["onChange","value"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=r(85893),d=r(87363),p=r(40930),h=r(96486),m=c(r(787)),v=r(5528),g=c(r(92419)),y=c(r(33270));t.default=function(e){var t=e.options,r=e.aiDefaultColor,n=e.showFontColorCustom,a=e.setShowFontColorCustom,u=e.label,c=e.hint,b=e.websiteDefaultColor,w=void 0===b?"":b,_=e.fontColorSelectName,x=e.fontColorName,S=(0,p.useFormContext)(),k=S.control,O=S.setValue,E=(0,S.watch)(_);return(0,d.useEffect)((function(){r&&"diviAIDefault"!==E?O(_,"diviAIDefault"):r||"diviAIDefault"!==E||(O(_,""),O(x,""))}),[r]),(0,d.useEffect)((function(){a("custom"===E),(0,h.startsWith)(E,"gcid-")?O(x,E):"diviAIDefault"===E?O(x,r):E||O(x,"")}),[E,w,r,a,x,_]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.FieldLabel,{label:(0,m.default)("userPrompt",u),hint:(0,m.default)("userPrompt",c)}),(0,f.jsx)(p.Controller,{name:_,control:k,render:function(e){var r=e.field,n=r.onChange,i=s(r,o);return(0,f.jsx)(g.default,l(l({},i),{},{options:t,_onChange:function(e,t){n(t),O(_,t)},showSearchField:!1}))}}),n&&(0,f.jsx)(p.Controller,{name:x,control:k,render:function(e){var t=e.field,n=t.onChange,o=t.value,a=s(t,i);return(0,f.jsx)(y.default,l(l({},a),{},{value:o,_onChange:function(e,t){n(t),t||O(_,""),""!==t&&r!==t&&O(_,"custom"),""!==t&&r===t&&O(_,"diviAIDefault"),""!==t&&w===t&&O(_,"websiteDefault")},animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0}))}})]})}},86040:function(e,t,r){"use strict";var n=["onChange"],o=["onChange"];function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=r(87363),h=r(85893),m=r(87363),v=d(r(94184)),g=r(40930),y=d(r(787)),b=r(77466),w=r(5528),_=d(r(12172)),x=d(r(92419)),S=r(14587);r(99598);var k=d(r(10376)),O=window.et_ai_data,E=O.available_fonts,C=O.website_body_font_color,j=O.website_heading_font_color,P=c({"":(0,y.default)("userPrompt","layoutsFont.letAIChoose"),websiteDefault:(0,y.default)("userPrompt","layoutsFont.websiteDefault")},E),L={"":(0,y.default)("userPrompt","layoutsFont.letAIChoose"),diviAIDefault:(0,y.default)("userPrompt","layoutsColor.diviAIDefault"),custom:(0,y.default)("userPrompt","layoutsColor.custom")},M={"":(0,y.default)("userPrompt","layoutsFont.letAIChoose"),diviAIDefault:(0,y.default)("userPrompt","layoutsColor.diviAIDefault"),custom:(0,y.default)("userPrompt","layoutsColor.custom")};t.default=function(e){var t=e.isMissingPrompt,r=void 0!==t&&t,i=(0,g.useFormContext)(),u=i.control,s=i.register,f=i.getValues,d=l((0,m.useState)(!1),2),O=d[0],E=d[1],A=(0,b.useAppSelector)(S.selectDefaultBodyFontColor),T=(0,b.useAppSelector)(S.selectDefaultHeadingFontColor),I=(0,b.useAppSelector)(S.selectDefaultPrimaryFontColor),R=(0,b.useAppSelector)(S.selectDefaultSecondaryColor),N=l((0,m.useState)(!1),2),D=N[0],z=N[1],F=l((0,m.useState)(!1),2),B=F[0],H=F[1],U=l((0,m.useState)(!1),2),W=U[0],V=U[1],q=l((0,m.useState)(!1),2),G=q[0],Y=q[1],K=(0,m.useMemo)((function(){var e,t;return c(c({},P),{},{default:"".concat((0,y.default)("userPrompt","layoutsFont.default")," : ").concat(null===(e=window)||void 0===e||null===(t=e.et_ai_data)||void 0===t?void 0:t.ai_default_body_font)})}),[window.et_ai_data.ai_default_body_font]),$=(0,m.useMemo)((function(){var e,t;return c(c({},P),{},{default:"".concat((0,y.default)("userPrompt","layoutsFont.default")," : ").concat(null===(e=window)||void 0===e||null===(t=e.et_ai_data)||void 0===t?void 0:t.ai_default_heading_font)})}),[window.et_ai_data.ai_default_heading_font]),Q=(0,v.default)({"et-ai-error-field":r&&""===f("pageDescription").trim(),"et-ai-control-textarea":!0,"et-fb-disabled-global-shortcuts":!0});return(0,h.jsxs)("div",{className:"et-ai-layout et-fb-form__toggle",children:[(0,h.jsxs)("div",{className:"et-fb-form__group",children:[(0,h.jsx)(w.FieldLabel,{label:(0,y.default)("userPrompt","$pageDescTitle"),hint:(0,y.default)("userPrompt","$pageDescHint")}),(0,h.jsx)(_.default,c({className:Q,placeholder:(0,y.default)("userPrompt","$pageDescPlaceholder"),rows:5},s("pageDescription")))]}),(0,h.jsxs)("div",{className:"et-fb-form__group",children:[(0,h.jsx)(w.FieldLabel,{label:(0,y.default)("userPrompt","$siteDescTitle"),hint:(0,y.default)("userPrompt","$siteDescHint")}),(0,h.jsx)(_.default,c({className:Q,placeholder:(0,y.default)("userPrompt","$siteDescPlaceholder"),rows:5},s("additionalSiteDescription")))]}),(0,h.jsxs)("p",{className:(0,v.default)({"et-ai-advanced-toggler":!0,"et-ai-advanced-toggler--open":O}),onClick:function(){return E(!O)},children:[(0,y.default)("userPrompt","Customize Fonts and Colors").replace("and","&"),(0,h.jsx)("span",{className:"triangle-".concat(O?"up":"down")})]}),O&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"et-fb-form__flex_container",children:[(0,h.jsxs)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:[(0,h.jsx)(w.FieldLabel,{label:(0,y.default)("userPrompt","Heading Font"),hint:(0,y.default)("userPrompt","$headingFontHint")}),(0,h.jsx)(g.Controller,{name:"headingFont",control:u,defaultValue:"",render:function(e){var t=e.field,r=t.onChange,o=a(t,n);return(0,p.createElement)(x.default,c(c({},o),{},{key:window.et_ai_data.ai_default_heading_font,options:c({},$),_onChange:function(e,t){return r(t)},searchable:!0,searchPlaceholder:(0,y.default)("userPrompt","Search Fonts")}))}})]}),(0,h.jsxs)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:[(0,h.jsx)(w.FieldLabel,{label:(0,y.default)("userPrompt","Body Font"),hint:(0,y.default)("userPrompt","$bodyFontHint")}),(0,h.jsx)(g.Controller,{name:"bodyFont",control:u,defaultValue:"",render:function(e){var t=e.field,r=t.onChange,n=a(t,o);return(0,p.createElement)(x.default,c(c({},n),{},{key:window.et_ai_data.ai_default_body_font,options:c({},K),_onChange:function(e,t){return r(t)},searchable:!0,searchPlaceholder:(0,y.default)("userPrompt","Search Fonts")}))}})]})]}),(0,h.jsxs)("div",{className:"et-fb-form__flex_container",children:[(0,h.jsx)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:(0,h.jsx)(k.default,{options:c(c({},M),{},{"gcid-heading-color":(0,y.default)("userPrompt","layoutsColor.websiteDefault")}),aiDefaultColor:T,showFontColorCustom:D,setShowFontColorCustom:z,label:"Heading Font Color",hint:"$headingFontColorHint",websiteDefaultColor:j,fontColorSelectName:"headingFontColorSelect",fontColorName:"headingFontColor"})}),(0,h.jsx)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:(0,h.jsx)(k.default,{options:c(c({},M),{},{"gcid-body-color":(0,y.default)("userPrompt","layoutsColor.websiteDefault")}),aiDefaultColor:A,showFontColorCustom:B,setShowFontColorCustom:H,label:"Body Font Color",hint:"$bodyFontColorHint",websiteDefaultColor:C,fontColorSelectName:"bodyFontColorSelect",fontColorName:"bodyFontColor"})})]}),(0,h.jsxs)("div",{className:"et-fb-form__flex_container",children:[(0,h.jsx)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:(0,h.jsx)(k.default,{options:c(c({},L),{},{"gcid-primary-color":(0,y.default)("userPrompt","layoutsColor.websiteDefault")}),aiDefaultColor:I,showFontColorCustom:W,setShowFontColorCustom:V,label:"Primary Color",hint:"$primaryColorHint",fontColorSelectName:"primaryColorSelect",fontColorName:"primaryColor"})}),(0,h.jsx)("div",{className:"et-fb-form__group et-fb-form__flex_item",children:(0,h.jsx)(k.default,{options:c(c({},L),{},{"gcid-secondary-color":(0,y.default)("userPrompt","layoutsColor.websiteDefault")}),aiDefaultColor:R,showFontColorCustom:G,setShowFontColorCustom:Y,label:"Secondary Color",hint:"$secondaryColorHint",fontColorSelectName:"secondaryColorSelect",fontColorName:"secondaryColor"})})]})]})]})}},46183:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(85893),s=r(40930),c=r(5528),f=l(r(787)),d=r(77466),p=r(19695);r(51403);t.default=function(){var e=(0,s.useFormContext)(),t=e.register,r=(e.control,(0,d.useAppSelector)(p.etAccount));return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,u.jsxs)("div",{className:"et-fb-form__group et-fb-form__authentication_header",children:[(0,u.jsx)("h1",{children:(0,f.default)("authorization","Authentication Required")}),null!=r&&r.errorMessage&&""!==(null==r?void 0:r.errorMessage)?(0,u.jsx)("h3",{className:"et-fb-auth-error",children:(0,f.default)("authorization","$authErrorMessage")}):null,(0,u.jsx)("p",{children:(0,f.default)("authorization","$authenticationPrompt")})]}),(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(c.FieldLabel,{label:"".concat((0,f.default)("authorization","Username")),hint:(0,f.default)("authorization","$usernamePromptHint"),htmlFor:"et_username"}),(0,u.jsx)("input",i({type:"text",className:"et-common-input-text",id:"et_username"},t("et_username")))]}),(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(c.FieldLabel,{label:"".concat((0,f.default)("authorization","API Key")),hint:(0,f.default)("authorization","$apiKeyPromptHint"),htmlFor:"et_api_key"}),(0,u.jsx)("input",i({type:"password",className:"et-common-input-text",id:"et_api_key"},t("et_api_key")))]})]})})}},74236:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageProgressBar=void 0;var a=r(85893),l=r(87363),u=i(r(787));r(654);t.ImageProgressBar=function(e){var t=e.estimatedTime,r=t<2?t:t-1,o=n((0,l.useState)(r),2),i=o[0],s=o[1],c=(0,l.useRef)();(0,l.useEffect)((function(){if(c.current=!0,!(2>t))return f(),function(){c.current=!1}}),[]);var f=function e(){i<1||setTimeout((function(){c.current&&(s((function(e){return--e})),e())}),1e3)},d=(0,l.useMemo)((function(){var e=100*(1-i/t);return Math.floor(e)}),[i]),p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"et-common-progress-bar",children:(0,a.jsx)("span",{className:"et-common-loader et-common-loader-success"})}),(0,a.jsx)("p",{children:(0,u.default)("userPrompt","$finalizeImage")})]}),h=i<1;return 2>t?null:(0,a.jsxs)("div",{className:"image-countdown-timer",children:[h&&p,!h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h4",{children:[(0,u.default)("userPrompt","Generating Images"),"..."]}),(0,a.jsx)("div",{className:"image-countdown-timer-bar",children:(0,a.jsx)("div",{className:"image-countdown-timer-bar-progress",style:{width:"".concat(d,"%")}})}),(0,a.jsxs)("div",{className:"image-countdown-info",children:[(0,a.jsx)("p",{className:"image-countdown-info-percentage",children:"".concat(d,"%")}),(0,a.jsx)("p",{children:(0,u.default)("userPrompt","$imagesETAMessage",i)})]})]})]})}},8900:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(87363),d=r(40930),p=r(96486),h=s(r(94184)),m=s(r(33477)),v=s(r(36789)),g=s(r(12172)),y=s(r(30911)),b=s(r(94526)),w=s(r(787)),_=s(r(13288)),x=r(5528),S=r(14587),k=r(8035),O=r(77466),E=r(89861),C=r(74236),j=s(r(2428)),P=s(r(66557));r(33347);t.default=function(e){var t=e.closePrompt,r=(0,d.useFormContext)(),n=r.control,o=r.register,a=(0,O.useAppSelector)(S.selectAdditionalInfo),u=l((0,f.useState)(""),2),s=u[0],L=u[1],M=l((0,f.useState)(""),2),A=M[0],T=M[1],I=(0,O.useAppSelector)(S.selectAIMenuContext),R=(0,P.default)({closePrompt:t}),N=R.isLoading,D=R.localImageURL,z=R.isWaitingImages,F=R.imagesProgressTimeout,B=R.onSubmit,H=R.handleUseTextClick,U=(0,d.useWatch)({control:n,name:"rewrite"}),W=a||{},V=W.intent,q=W.fields,G=W.excludeStep;if(N)return(0,c.jsx)("div",{className:"et-ai-modal-spinner-container",children:(0,c.jsx)(j.default,{})});if(G)return null;return(0,c.jsxs)(c.Fragment,{children:[z&&(0,c.jsx)(C.ImageProgressBar,{estimatedTime:F},F),(0,c.jsxs)("div",{className:(0,h.default)({"et-ai-content-results-prompt":!0,"et-ai-modal-disabled":N||z}),children:[(0,c.jsx)("div",{className:"et-fb-form__toggle et-fb-form__description-toggle",children:(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__description",children:[k.MODULE_FIELDS_AUTOFILL===V?q.map((function(e){var t=e.name,r=e.label,o=e.type;return e.original?(0,c.jsx)("div",{className:(0,h.default)({"et-ai-module-fields":!0}),children:(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(x.FieldLabel,{label:r}),(0,c.jsx)(d.Controller,{name:t,control:n,render:function(e){var t=e.field;return function(e,t){if("tiny_mce"===e)return(0,c.jsx)(g.default,i(i({},t),{},{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",rows:5,disabled:!0}));if("upload"===e&&t.value){if(!D)return(0,c.jsx)(b.default,{value:""});if((0,p.isString)(t.value))return(0,c.jsx)("div",{className:"et-ai-control-image",children:(0,c.jsx)("img",{src:t.value,alt:""})})}return(0,c.jsx)(b.default,i(i({},t),{},{value:t.value?(0,E.stripDoubleQuotes)(t.value):"",disabled:!0}))}(o,t)}})]})},t):null})):(0,c.jsx)(d.Controller,{name:"text",control:n,render:function(e){var t=e.field;return(0,c.jsx)(g.default,i(i({},t),{},{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",placeholder:(0,w.default)("userPrompt","$contentPlaceholder"),rows:5,disabled:!0}))}}),(0,c.jsx)(_.default,{}),(0,c.jsx)(y.default,{className:"et-common-button--primary",onClick:H,children:(0,w.default)("userPrompt","Use This Text")})]})}),(0,c.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__tags",children:[(0,c.jsx)(x.FieldLabel,{label:(0,w.default)("userPrompt","Modify With AI")}),(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__tags-pill",children:[history.length>0&&(0,c.jsxs)("label",{className:"et-ai-content-results-prompt__tag",htmlFor:"tag",children:[(0,w.default)("userPrompt","tags.Retry"),(0,c.jsx)("input",i(i({id:"tag",type:"radio",value:"retry"},o("tag")),{},{onClick:function(){return B({tag:"retry"})}}))]}),(0,c.jsx)("div",{className:"et-ai-content-results-prompt__tone",children:(0,c.jsx)(m.default,{button:(0,c.jsxs)(c.Fragment,{children:[s||"Improve With AI",(0,c.jsx)(v.default,{icon:"arrow-down-dense"})]}),value:A,onSelect:function(e){var t=e.parentValue,r=e.value,n=e.name;return L(n),T(r),B(t&&t!==r?{tag:[t,r]}:{tag:r})},context:I})})]})]}),(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__regenerate",children:[(0,c.jsx)(x.FieldLabel,{label:(0,w.default)("userPrompt","Refine Result"),hint:(0,w.default)("userPrompt","$refineHint"),htmlFor:"refineResult"}),(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__rewrite",children:[(0,c.jsx)(d.Controller,{name:"rewrite",control:n,render:function(e){var t=e.field;return(0,c.jsx)(b.default,i(i({},t),{},{id:"refineResult",value:t.value||"",placeholder:"Rewrite to be more engaging",onKeyDown:function(e){return(0,E.handleEnterKeyCallback)(e,(function(){return B({tag:"retry"})}),""===U)}}))}}),(0,c.jsx)(y.default,{onClick:function(){return B({tag:"retry"})},ripple:!1,disabled:""===U,className:"et-common-button--meta",children:(0,w.default)("userPrompt","Regenerate")})]})]})]})]})]})}},13288:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(40930),a=n(r(94184)),l=r(98136),u=r(14587),s=n(r(36789)),c=n(r(787)),f=r(8035),d=r(77466);r(23426);t.default=function(e){var t=(0,i.useFormContext)().setValue,r=(0,d.useAppSelector)(u.selectCurrent),n=(0,d.useAppSelector)(u.selectHistory),p=(0,d.useAppSelector)(u.selectAdditionalInfo),h=(0,d.useAppDispatch)(),m=p||{},v=m.intent,g=m.fields,y=function(r){e.onChange?e.onChange(r):f.MODULE_FIELDS_AUTOFILL===v?g.map((function(e){var o=e.name;t(o,n[r][o])})):t("text",n[r]),h((0,l.updateCurrent)(r))},b=(0,a.default)({"et-ai-content-results-prompt__history__prev":!0,"et-ai-content-results-prompt__history__prev--enabled":r>0}),w=(0,a.default)({"et-ai-content-results-prompt__history__next":!0,"et-ai-content-results-prompt__history__next--enabled":r>=0&&r<n.length-1});return n.length<2?null:(0,o.jsxs)("div",{className:"et-ai-content-results-prompt__history",children:[(0,o.jsx)("div",{className:b,role:"previous-history",onClick:function(){1>r||y(r-1)},children:(0,o.jsx)(s.default,{icon:"left-arrow",viewBox:"0 0 13 13"})}),(0,o.jsx)("div",{className:w,role:"next-history",onClick:function(){r>=n.length-1||y(r+1)},children:(0,o.jsx)(s.default,{icon:"right-arrow",viewBox:"0 0 13 13"})}),(0,o.jsxs)("div",{className:"et-ai-content-results-prompt__history__count",children:[r+1," ",(0,o.jsx)("span",{children:"/"})," ",n.length," ",(0,c.default)("userPrompt","Results")]})]})}},91647:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["onChange"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(40930),d=s(r(92419));t.default=function(e){var t=e.name,r=e.control,n=e.options;return(0,c.jsx)(f.Controller,{name:t,control:r,render:function(e){var t=e.field,r=t.onChange,i=u(t,o);return(0,c.jsx)(d.default,a(a({},i),{},{_onChange:function(e,t){return r(t)},options:n}))}})}},47485:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(87363),d=r(40930),p=s(r(787)),h=s(r(36789)),m=s(r(62281)),v=r(5528),g=s(r(21062)),y=r(14587),b=r(77466),w=s(r(91647)),_=s(r(71265));t.default=function(){var e=(0,d.useFormContext)(),t=e.register,r=e.control,n=e.setValue,o=l((0,f.useState)(!1),2),a=o[0],u=o[1],s=(0,b.useAppSelector)(y.selectAdditionalInfo),x=(0,b.useAppSelector)(y.selectContext),S=(0,_.default)({additionalInfo:s,contextData:x,setValue:n}),k=S.handleGeneratePrompt,O=S.descGenerating,E=window.et_ai_data.available_languages;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:"".concat((0,p.default)("userPrompt","Content Type")),hint:(0,p.default)("userPrompt","$contentTypeHint")}),(0,c.jsx)(w.default,{name:"content_type",control:r,options:(0,p.default)("userPrompt","fieldTypes")})]})," ",(0,c.jsx)("div",{className:"et-fb-form__group",children:(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","What are you writing about?"),hint:(0,p.default)("userPrompt","$contentPromptHint")})})," ",(0,c.jsxs)("div",{className:"et-ai-input-with-icon",children:[(0,c.jsx)(m.default,{id:"et-ai-prompt-desc-generate"}),O?(0,c.jsxs)("p",{className:"et-ai-prompt-loading",children:[(0,p.default)("userPrompt","Generating"),"..."]}):(0,c.jsx)(h.default,{icon:"divi-ai",viewBox:"0 0 28 28","data-testid":"et-ai-prompt-desc-generate","data-for":"et-ai-prompt-desc-generate","data-tip":(0,p.default)("userPrompt","Generate Prompt With AI"),onClick:k}),(0,c.jsx)("textarea",i({className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",placeholder:(0,p.default)("userPrompt","$contentPlaceholder"),rows:5},t("prompt")))," "]}),(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","Added Context"),hint:(0,p.default)("userPrompt","$contextHint")}),(0,c.jsx)(w.default,{name:"context",control:r,options:(0,p.default)("userPrompt","contextTypes")})]})," ",(0,c.jsxs)("p",{className:"et-ai-advanced-toggler",onClick:function(){return u(!a)},children:[(0,p.default)("userPrompt","Guide Me"),(0,c.jsx)("span",{className:"triangle-".concat(a?"up":"down")})]})]}),a&&(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","Tone of Voice"),hint:(0,p.default)("userPrompt","$toneHint")}),(0,c.jsx)(w.default,{name:"tone",control:r,options:(0,p.default)("userPrompt","toneOfVoice")})]})," ",(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","Must Use Keywords"),hint:(0,p.default)("userPrompt","$mustUseHint")}),(0,c.jsx)("input",i({type:"text",className:"et-common-input-text"},t("must_use_words")))]})," ",(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","length.ContentLength"),hint:(0,p.default)("userPrompt","$numberWordsHint")}),(0,c.jsxs)("div",{className:"ai-content-length-inputs",children:[(0,c.jsx)("div",{className:"ai-content-length-inputs--select",children:(0,c.jsx)(w.default,{name:"length.condition",control:r,options:{Exactly:(0,p.default)("userPrompt","length.Exactly"),Maximum:(0,p.default)("userPrompt","length.Maximum"),"At least":(0,p.default)("userPrompt","length.AtLeast"),About:(0,p.default)("userPrompt","length.About")}})}),(0,c.jsx)("input",i(i({type:"number"},t("length.count")),{},{className:"et-common-input-text et-fb-disabled-global-shortcuts",placeholder:"#"})),(0,c.jsx)("div",{className:"ai-content-length-inputs--select",children:(0,c.jsx)(w.default,{name:"length.units",control:r,options:{Words:(0,p.default)("userPrompt","length.Words"),Characters:(0,p.default)("userPrompt","length.Characters"),Sentences:(0,p.default)("userPrompt","length.Sentences"),Paragraphs:(0,p.default)("userPrompt","length.Paragraphs"),"List items":(0,p.default)("userPrompt","length.ListItems")}})})]})]})," ",(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(v.FieldLabel,{label:(0,p.default)("userPrompt","language.Language"),hint:(0,p.default)("userPrompt","language.$languageHint")}),(0,c.jsx)(d.Controller,{name:"language",control:r,defaultValue:"",render:function(e){var t=e.field.value;return(0,c.jsx)(g.default,{value:t,buttonText:t||(0,p.default)("userPrompt","language.LanugageOfPrompt"),options:i({"":(0,p.default)("userPrompt","language.LanugageOfPrompt"),website_language:(0,p.default)("userPrompt","language.LanguageOfWebsite")},E),setControlValue:function(e){return n("language",e)}})}})]})," "]})})]})}},88505:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=r(85893),h=r(87363),m=r(40930),v=d(r(94184)),g=r(96486),y=d(r(46183)),b=d(r(30911)),w=d(r(85463)),_=d(r(36789)),x=d(r(8900)),S=d(r(56921)),k=d(r(34197)),O=d(r(54842)),E=d(r(82895)),C=d(r(787)),j=d(r(22398)),P=d(r(40234)),L=d(r(76516)),M=d(r(2428)),A=d(r(62281)),T=d(r(54134)),I=d(r(47485)),R=r(19695),N=r(29548),D=r(89861),z=r(98098),F=d(r(54816)),B=d(r(73686)),H=d(r(55102)),U=d(r(25788)),W=d(r(13456)),V=d(r(83104)),q=d(r(86040)),G=r(98136),Y=r(8035),K=r(50013),$=r(77466),Q=r(14587);r(67259);t.default=function(e){var t,r,n=e.hiddenModal,o=(0,$.useAppDispatch)(),a=(0,$.useAppSelector)(Q.selectAdditionalInfo),u=(0,$.useAppSelector)(Q.selectLoadingState),f=(0,$.useAppSelector)(Q.selectPrefilledContentType),d=(0,$.useAppSelector)(Q.selectControlLabel),Z=(0,$.useAppSelector)(Q.selectAiMode),X=(0,$.useAppSelector)(Q.selectModuleFields),J=(0,$.useAppSelector)(Q.selectUpgradeModal),ee=(0,$.useAppSelector)(Q.selectError),te=(0,$.useAppSelector)(Q.selectUpgradeTip),re=(0,$.useAppSelector)(Q.selectImageReference),ne=(0,$.useAppSelector)(Q.selectContextHTMLReceived),oe=(0,$.useAppSelector)(Q.selectSubmitAutoRequest),ie=c((0,h.useState)(!1),2),ae=ie[0],le=ie[1],ue=c((0,h.useState)(!1),2),se=ue[0],ce=ue[1],fe=c((0,h.useState)(!1),2),de=fe[0],pe=fe[1],he=c((0,h.useState)(!1),2),me=he[0],ve=he[1],ge=(0,$.useAppSelector)(Q.selectIsLayoutDefaultSettingsOpen),ye=(0,z.useAIRequest)(Z).generateLayoutRequest,be=window.et_ai_data,we=be.site_description,_e=be.site_language,xe=be.site_name,Se=be.page_name,ke=(be.default_site_desc,be.heading_font_color),Oe=be.body_font_color,Ee=be.primary_color,Ce=be.secondary_color,je=be.ai_default_heading_font,Pe=be.ai_default_body_font,Le=be.post_type,Me=(0,m.useForm)({defaultValues:{content_type:f,context:"page",et_api_key:"",et_username:"",field_name:d,prompt:"",page_content:"",tone:"creative",must_use_words:"",length:{condition:"Exactly",count:null,units:"words"},rewrite:"",tag:"",temperature:null,text:"",top_p:null,aspectRatio:"square",imageStyle:"photo",companyName:xe,site_name:xe,site_description:we,page_name:Se,post_type:Le,referenceImageBase64:re.base64,imageWidth:"",imageHeight:"",additionalSiteDescription:(null===(t=window)||void 0===t||null===(r=t.et_ai_data)||void 0===r?void 0:r.default_site_desc)||"",headingFont:je?"default":"",bodyFont:Pe?"default":"",headingFontColor:ke,bodyFontColor:Oe,primaryColor:Ee,secondaryColor:Ce}}),Ae=c((0,K.useGenerateFieldMutation)(),1)[0],Te=(0,K.useUserQuery)(),Ie=(Te.data,Te.error),Re=(0,$.useAppSelector)(Q.selectOpenPromptType),Ne=(0,$.useAppSelector)(Q.selectSelectedOption),De=(0,$.useAppSelector)(R.selectShowAuthorizationModal),ze=(0,$.useAppSelector)(Q.selectContext),Fe=Me.handleSubmit,Be=a||{},He=(Be.excludeStep,Be.fields),Ue=Be.intent,We=Be.module,Ve=(0,B.default)().generateImageRequest,qe=(0,F.default)(),Ge=qe.showUserError,Ye=qe.submitAuthorization,Ke=(0,W.default)().showFreeUpgradeBar,$e=(0,U.default)(),Qe=$e.closeUserPrompt,Ze=$e.handleBackBtnClick,Xe=(0,V.default)(),Je=Xe.generateModuleFieldsAutofill,et=Xe.generateModuleFieldsAutofillChain,tt=(0,H.default)(),rt=tt.generateCodeRequest,nt=tt.handleCodeModuleHTML,ot=function(){Y.MODULE_FIELDS_AUTOFILL===Ue&&((0,g.isArray)((0,g.first)(He))?et():Je()),[Y.TextOption.WRITE_AUTOMATICALLY,Y.TextOption.WRITE_AND_REPLACE].includes(Ne)&&Me.handleSubmit(it)()};(0,h.useEffect)((function(){var e=401===(0,g.get)(Ie,"status")&&(0,g.get)(Ie,"data.ai_error_message"),t=404===(0,g.get)(Ie,"originalStatus");e&&!De?Ge("401_user",(0,g.get)(Ie,"data.ai_error_message","")):t&&Ge("404_user",(0,C.default)("userPrompt","You have to update Divi in order to use AI"))}),[Ie]),(0,h.useEffect)((function(){se&&de||!se||!u&&"code"===Z&&""!==ze.module&&ne&&(Me.handleSubmit(it)(),pe(!0))}),[u,se,ne,ze.module]),(0,h.useEffect)((function(){return ot(),window.addEventListener("et_ai_code_module_html_ready",(function(e){return nt(e)})),function(){window.removeEventListener("et_ai_code_module_html_ready",nt)}}),[]),(0,h.useEffect)((function(){oe&&ot()}),[oe]);var it=function(){var e=s(l().mark((function e(t){var r,n,i,a,s,c,f,d,p,h,m,v,y,b,w,_,x,S,k,O,E,C,j,P,L;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("layout"!==Z){e.next=5;break}return o((0,G.setIsLayoutGenerationInProgress)(!0)),o((0,G.setLayoutModalTempData)(t)),ye(t),e.abrupt("return");case 5:if("code"!==Z||null!=t&&t.prompt&&""!==(null==t?void 0:t.prompt.trim())){e.next=8;break}return le(!0),e.abrupt("return");case 8:if("code"!==Z||ne){e.next=12;break}return o((0,G.updateLoading)(!0)),ce(!0),e.abrupt("return");case 12:if(!u){e.next=14;break}return e.abrupt("return",!1);case 14:if(o((0,G.updateLoading)(!0)),"image"!==Z){e.next=18;break}return Ve(t),e.abrupt("return");case 18:if("code"!==Z){e.next=23;break}return ce(!1),e.next=22,rt(t);case 22:return e.abrupt("return");case 23:return r=t.content_type,n=t.field_name,i=t.prompt,a=t.context,s=t.tone,c=t.must_use_words,f=t.length,d=f.condition,p=f.count,h=f.units,m=t.override_prompt,v=t.model_id,y=t.temperature,b=t.top_p,w=t.presence_penalty,_=t.frequency_penalty,x=t.site_name,S=t.site_description,k=t.language,O=null!=a?a:"page",E=(0,g.isUndefined)(k)||"website_language"===k?_e:k,C={content_type:r,field_name:n,prompt:i,page_content:"empty"===O?"":ze[O],module_name:We,tone:s,must_use_words:c?[c]:void 0,length:{condition:d,count:p,units:h},override_prompt:m,model_id:v,temperature:y,top_p:b,presence_penalty:w,frequency_penalty:_,site_name:"empty"===O?"":x,site_description:"empty"===O?"":S,language:E,module_fields:X},o((0,G.updateTextQuery)(C)),e.prev=28,e.next=31,Ae(C);case 31:j=e.sent,401===(0,g.get)(j,"error.originalStatus")?o((0,N.setETAccount)({errorMessage:"Invalid API Key or Username"})):(P=(0,g.get)(j,"data.content",""),(L=(0,g.get)(j,"error",!1))&&o((0,G.showError)(L)),P&&o((0,G.updateHistory)((0,D.stripDoubleQuotes)(P)))),o((0,G.updateLoading)(!1)),e.next=39;break;case 36:e.prev=36,e.t0=e.catch(28),console.log(e.t0);case 39:o((0,G.updateSelectedOption)(Y.TextOption.RESULT));case 40:case"end":return e.stop()}}),e,null,[[28,36]])})));return function(t){return e.apply(this,arguments)}}(),at=function(){var e=s(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ye(t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),lt=function(){var e;switch(Z){case"image":e=(0,C.default)("userPrompt","Generate");break;case"code":e=(0,C.default)("userPrompt","Generate Code");break;case"layout":e=(0,C.default)("userPrompt","Generate Layout");break;default:e=(0,C.default)("userPrompt","Generate Text")}return e},ut=Me.formState.isDirty,st=Re===Y.PromptType.Generate&&!u&&!J;return(0,p.jsx)(m.FormProvider,i(i({},Me),{},{children:(0,p.jsxs)("div",{id:"et-ai-user-prompt-form",className:(0,v.default)({"et-ai-user-prompt":!0,"et-ai-user-prompt__hidden":n,"et-ai-spinner":u,"et-ai-upgrade-modal-wrapper":J,"et-ai-modal-no-footer":!st}),children:[(0,p.jsxs)(L.default,{draggable:"code"===Z,modalKey:"et_ai_user_prompt",children:[(0,p.jsxs)(L.default.Header,{className:(0,v.default)({"et-ai-content-results-prompt__header":Re===Y.PromptType.Refine,"et-ai-upgrade-prompt__header":J}),onClose:Qe,onBack:Ze(),additionalActions:function(){if("layout"===Z)return(0,p.jsx)(b.default,{className:"et-common-button--round",onClick:function(){return o((0,G.openLayoutDefaultSettings)())},"data-for":"et-ai-layout-settings-tooltip","data-testid":"et-ai-layout-settings-tooltip","data-tip":!0,onMouseEnter:function(){return ve(!0)},onMouseLeave:function(){return ve(!1)},children:(0,p.jsx)(_.default,{icon:"setting",color:"#ffffff"})})}(),children:[me&&(0,p.jsx)(A.default,{id:"et-ai-layout-settings-tooltip",children:(0,C.default)("userPrompt","Adjust Divi AI Default Styles")}),te&&(0,p.jsxs)(A.default,{id:"ai-subscription-message",children:["layout"===Z?(0,C.default)("userPrompt","upgradeTipPart1_layouts"):(0,C.default)("userPrompt","upgradeTipPart1")," ",(0,p.jsx)("br",{}),(0,C.default)("userPrompt","upgradeTipPart2")," ",(0,p.jsx)("br",{}),(0,C.default)("userPrompt","upgradeTipPart3")]}),!J&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"left",children:J?null:De?(0,C.default)("authorization","Authentication"):"image"===Z?(0,C.default)("userPrompt","Generate Image With AI",d):"code"===Z?d:"layout"===Z?(0,C.default)("userPrompt","Build Your Page With AI"):Y.PromptType.Generate===Re?(0,C.default)("userPrompt","Write %s With AI",d):Y.PromptType.Refine===Re?(0,C.default)("userPrompt","Content Results"):void 0}),(0,p.jsx)("div",{className:"right",children:Ke?(0,p.jsx)(O.default,{}):null})]})]}),ge&&(0,p.jsx)(S.default,{updateLayoutDefaultSettings:function(e){var t=Me.getFieldState,r=t("additionalSiteDescription"),n=t("headingFont"),o=t("bodyFont"),i=t("headingFontColor"),a=t("bodyFontColor"),l=t("primaryColor"),u=t("secondaryColor"),s=e.headingFont,c=e.bodyFont,f=e.headingFontColor,d=e.bodyFontColor,p=e.primaryColor,h=e.secondaryColor,m=e.siteDescription;n.isDirty||Me.setValue("headingFont",""===s?"":"default",{shouldDirty:!1}),o.isDirty||Me.setValue("bodyFont",""===c?"":"default",{shouldDirty:!1}),i.isDirty||Me.setValue("headingFontColor",f,{shouldDirty:!1}),a.isDirty||Me.setValue("bodyFontColor",d,{shouldDirty:!1}),l.isDirty||Me.setValue("primaryColor",p,{shouldDirty:!1}),u.isDirty||Me.setValue("secondaryColor",h),r.isDirty||Me.setValue("additionalSiteDescription",m,{shouldDirty:!1})}}),(0,p.jsxs)("form",{onSubmit:Me.handleSubmit(it),children:[(0,p.jsx)(L.default.Content,{children:(0,p.jsx)("div",{className:"ai-content-wrapper",children:function(){if(u)return(0,p.jsx)(M.default,{});if(De)return(0,p.jsx)(y.default,{});if(J)return(0,p.jsx)(T.default,{error:(0,g.get)(ee,"data.ai_error_message","")});switch(Re){case Y.PromptType.Generate:return"image"===Z?(0,p.jsx)(j.default,{}):"code"===Z?(0,p.jsx)(E.default,{isMissingPrompt:ae}):"layout"===Z?(0,p.jsx)(q.default,{isMissingPrompt:ae}):(0,p.jsx)(I.default,{});case Y.PromptType.Refine:return"image"===Z?(0,p.jsx)(P.default,{closePrompt:Qe}):"code"===Z?(0,p.jsx)(w.default,{closePrompt:Qe}):(0,p.jsx)(x.default,{closePrompt:Qe})}}()})}),st&&!De?(0,p.jsx)(L.default.Actions,{children:(0,p.jsx)(b.default,{"data-testid":"generate-button",type:"submit",className:"et-common-button et-common-button--primary",onClick:Fe(it),children:lt()})}):null,De?(0,p.jsx)(L.default.Actions,{children:(0,p.jsx)(b.default,{type:"submit",className:"et-common-button et-common-button--primary",disabled:De&&!ut,onClick:Fe(at),children:(0,C.default)("authorization","Submit")})}):null]})]}),(0,p.jsx)(k.default,{})]})}))}},77466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAppSelector=t.useAppDispatch=void 0;var n=r(36113);t.useAppDispatch=n.useDispatch,t.useAppSelector=n.useSelector},55102:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=r(96486),p=f(r(787)),h=f(r(27687)),m=r(29548),v=r(50013),g=r(89861),y=r(8035),b=r(77466),w=r(98136),_=r(14587);t.default=function(){var e=(0,b.useAppSelector)(_.selectPrefilledContentType),t=(0,b.useAppSelector)(_.selectContext),r=(0,b.useAppSelector)(_.selectProcessedKey),n=(0,b.useAppSelector)(_.selectEditorInsertMode),i=(0,b.useAppSelector)(_.selectEditorValue),l=s((0,h.default)(),1)[0],c=(0,b.useAppDispatch)(),f=s((0,v.useGenerateCodeMutation)(),1)[0],x=function(){var l,s=(l=o().mark((function l(u){var s,h,v,b,_;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return s=u.prompt,o.prev=1,h=a({prompt:s,code_language:e,module_html:(0,g.getModuleHTMLForCode)(t.module,e)},"before"===r||"after"===r?{pseudo_element:r}:{}),n!==y.AICodeInsertMode.REPLACE&&(h.existing_code=i),o.next=6,f(h);case 6:v=o.sent,b=(0,d.get)(v,"data.content",""),(_=(0,d.get)(v,"error",!1))&&(401===(0,d.get)(_,"originalStatus")?c((0,m.setETAccount)({errorMessage:(0,p.default)("authorization","$authErrorMessage")})):c((0,w.showError)(_))),b&&(c((0,w.setBackButtonVisibility)(!0)),c((0,w.updateHistory)(b)),c((0,w.updateSelectedOption)(y.CodeOption.RESULT))),c((0,w.updateLoading)(!1)),o.next=17;break;case 14:o.prev=14,o.t0=o.catch(1),console.log(o.t0);case 17:case"end":return o.stop()}}),l,null,[[1,14]])})),function(){var e=this,t=arguments;return new Promise((function(r,n){var o=l.apply(e,t);function i(e){u(o,r,n,i,a,"next",e)}function a(e){u(o,r,n,i,a,"throw",e)}i(void 0)}))});return function(e){return s.apply(this,arguments)}}();return{generateCodeRequest:x,handleCodeModuleHTML:function(e){var t=e.detail.module_html;t&&(c((0,w.setContextHTMLReceived)(!0)),c((0,w.setContextModule)(t)),c((0,w.updateLoading)(!1)))},resetCodePreview:function(){l({insertMode:y.AICodeInsertMode.REPLACE})}}}},98098:function(e,t,r){"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(o||[]);return n(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};s(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,l){var u=d(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==c(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=s(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),s(x.prototype,l,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),s(w,u,"Generator"),s(w,a,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===c(i)?i:String(i)),n)}var o,i}function d(e){var t=m();return function(){var r,n=g(e);if(t){var o=g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return h(e,arguments,g(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),v(n,e)},p(e)}function h(e,t,r){return h=m()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&v(o,r.prototype),o},h.apply(null,arguments)}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}var y=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useAIRequest=void 0;var b=r(87363),w=r(96486),_=r(98136),x=r(77466),S=r(50013),k=r(89861),O=r(74968),E=r(28809),C=y(r(787)),j=window.et_ai_data,P=j.website_heading_font,L=j.website_body_font,M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(i,e);var t,r,n,o=d(i);function i(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(r=o.call(this,e)).status="",r.data={},t&&"object"===c(t)&&(r.data=null==t?void 0:t.data,r.status=null==t?void 0:t.status),r}return t=i,r&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(p(Error));t.useAIRequest=function(e){var t=(0,x.useAppDispatch)(),r=(0,b.useRef)({}),i=l((0,S.useGenerateLayoutShortcodeMutation)(),1)[0],u=l((0,S.useGenerateLayoutContentMutation)(),1)[0],s=l((0,S.useGenerateLayoutImagesMutation)(),1)[0],c=l((0,E.useSaveLayoutDefaultsMutation)(),1)[0],f=l((0,O.useUploadImageMutation)(),1)[0],d=l((0,O.useDeleteImagesMutation)(),1)[0],p=l((0,S.useUpscaleImageMutation)(),1)[0],h=function(){var e=a(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({siteDescription:t.trim()});case 2:window.et_ai_data.default_site_desc=t.trim();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=a(o().mark((function e(t){var r,n,i,a,l,u,s,c,d=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>1&&void 0!==d[1]?d[1]:0,e.next=3,f({url:encodeURIComponent(t),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image});case 3:if(a=e.sent,l=null!==(r=null==a||null===(n=a.data)||void 0===n?void 0:n.data)&&void 0!==r?r:{},u=l.localImageURL,l.localImageID,s=l.message,!(i<10)||u||"Forbidden"!==s){e.next=12;break}return e.next=8,new Promise((function(e){return setTimeout(e,5e3)}));case 8:return c=0===i?"?v=".concat(i):i,e.next=11,m("".concat(t).concat(c),++i);case 11:return e.abrupt("return",e.sent);case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=a(o().mark((function e(n){var a,l,u,s,c,f,d,p,m,v,g,y,b,x,S,O,E,C,j,A,T;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=n.page_name,f=n.pageDescription,d=n.companyName,p=n.headingFont,m=n.bodyFont,v=n.headingFontColor,g=n.bodyFontColor,y=n.primaryColor,b=n.secondaryColor,x=n.site_description,S=n.additionalSiteDescription,O=n.post_type,h(S),t((0,_.setLayoutGenerationStage)("shortcode")),e.next=5,i({prompt:f,site_name:d,heading_font_color:v,body_font_color:g,primary_color:y,secondary_color:b,heading_font:(0,k.prepareLayoutGenerationFont)(p,null===(a=window)||void 0===a||null===(l=a.et_ai_data)||void 0===l?void 0:l.ai_default_heading_font,P),body_font:(0,k.prepareLayoutGenerationFont)(m,null===(u=window)||void 0===u||null===(s=u.et_ai_data)||void 0===s?void 0:s.ai_default_body_font,L),additional_description:S,theme_builder_area:(0,k.getThemeBuilderArea)(O),site_description:x,page_name:c,post_type:O});case 5:if(E=e.sent,C=(0,w.get)(E,"data.content",""),j=(0,w.get)(E,"data.page_outline",{}),A=(0,w.get)(E,"error",!1),r.current=(0,w.get)(E,"data.design",{}),!A){e.next=12;break}throw new M("AI Error",A);case 12:return(T={layout:C,tempImport:!0,design:r.current}).layout&&window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:T})),e.abrupt("return",{shortcode:C,pageOutline:j});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=a(o().mark((function e(n,i,a){var l,s,c,f,d,p,h,m,v,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=n.page_name,s=n.pageDescription,c=n.companyName,f=n.site_description,d=n.additionalSiteDescription,p=n.post_type,t((0,_.setLayoutGenerationStage)("content")),e.next=4,u({prompt:s,site_name:c,additional_description:d,page_outline:a,site_description:f,page_name:l,shortcode:i,post_type:p});case 4:if(h=e.sent,m=(0,w.get)(h,"data.content",""),v=(0,w.get)(h,"data.imageCount",0),!(g=(0,w.get)(h,"error",!1))){e.next=10;break}throw new M("AI Error",g);case 10:return window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:{layout:m,design:r.current,tempImport:!0}})),t((0,_.setLayoutsImagesCount)(v)),e.abrupt("return",m);case 13:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=a(o().mark((function e(i,l,u){var c,f,d,h,v,g,y,b,x,S,k,O,E,j,P,L,A,T,I,R,N,D,z,F,B,H,U,W,V,q,G,Y,K,$,Q,Z,X,J,ee,te,re,ne,oe,ie,ae,le,ue;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=i.page_name,f=i.pageDescription,d=i.companyName,h=i.site_description,v=i.additionalSiteDescription,g=i.post_type,y=i.bodyFont,b=i.bodyFontColor,x=i.headingFont,S=i.headingFontColor,k=i.primaryColor,O=i.secondaryColor,t((0,_.setLayoutGenerationStage)("images")),e.next=4,s({prompt:f,site_name:d,additional_description:v,page_outline:u,site_description:h,page_name:c,shortcode:l,post_type:g,primary_color:k,secondary_color:O});case 4:if(E=e.sent,j=(0,w.get)(E,"data.content",""),P=(0,w.get)(E,"error",!1),L=(0,w.get)(E,"data.images",""),A=(0,w.get)(E,"data.upscale",[]),T={},!P){e.next=12;break}throw new M("AI Error",P);case 12:if(j){e.next=14;break}throw new Error((0,C.default)("userPrompt","Unable to generate shortcode"));case 14:if(I=window.et_ai_data.placeholder_image,R=[],!((N=(0,w.get)(E,"data.eta",0))&&N>0)){e.next=20;break}return e.next=20,new Promise((function(e){return setTimeout(e,1e3*N+2e3)}));case 20:if(A){t((0,_.setLayoutsImagesUpscaleCount)(A.length)),D=n(A);try{for(D.s();!(z=D.n()).done;)F=z.value,B=F.index,H=F.scale,T["".concat(L[B])]=H}catch(e){D.e(e)}finally{D.f()}}U=[],W=n(L),e.prev=23,q=o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=V.value,U.push(new Promise(function(){var e=a(o().mark((function e(r){var n,i,a,l,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,!T[t]){e.next=11;break}return e.next=4,p({image_url:t,scale:T[t]});case 4:if(!("data"in(i=e.sent))){e.next=11;break}if(n=null!==(a=i.data.content)&&void 0!==a?a:n,!(i.data.eta&&i.data.eta>0)){e.next=11;break}return l=1e3*i.data.eta+2e3,e.next=11,new Promise((function(e){return setTimeout(e,l)}));case 11:return e.next=13,m(n);case 13:return u=e.sent,e.abrupt("return",r({url:t,response:u}));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})),W.s();case 26:if((V=W.n()).done){e.next=30;break}return e.delegateYield(q(),"t0",28);case 28:e.next=26;break;case 30:e.next=35;break;case 32:e.prev=32,e.t1=e.catch(23),W.e(e.t1);case 35:return e.prev=35,W.f(),e.finish(35);case 38:if((0,w.isEmpty)(U)){e.next=43;break}return e.next=41,Promise.allSettled(U);case 41:if(G=e.sent,!(0,w.isEmpty)(G)){Y=n(G);try{for(Y.s();!(K=Y.n()).done;)"fulfilled"===($=K.value).status&&(re=null!==(Q=null==$||null===(Z=$.value)||void 0===Z?void 0:Z.response)&&void 0!==Q?Q:{},ne=null!==(X=null==$||null===(J=$.value)||void 0===J?void 0:J.url)&&void 0!==X?X:"",oe=null!==(ee=null==re||null===(te=re.data)||void 0===te?void 0:te.data)&&void 0!==ee?ee:{},ie=oe.localImageURL,ae=oe.localImageID,j=j.replace(ne,null!=ie?ie:I),R.push(null!=ae?ae:""))}catch(e){Y.e(e)}finally{Y.f()}}case 43:return le=!(y&&b&&x&&S&&k&&O),ue=setTimeout((function(){window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:{layout:j,design:r.current,tempImport:!1,askToSaveFontColor:le}})),t((0,_.hideModal)()),t((0,_.setLayoutGenerationStage)(""))}),1e3),e.abrupt("return",{timerId:ue,localImageIDs:R});case 46:case"end":return e.stop()}}),e,null,[[23,32,35,38]])})));return function(t,r,n){return e.apply(this,arguments)}}(),j=function(){var e=a(o().mark((function e(r){var n,i,a,l,u,s,c,f,p,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v(r);case 3:return a=e.sent,l=a.shortcode,u=a.pageOutline,e.next=8,g(r,l,u);case 8:return s=e.sent,e.next=11,y(r,s,u);case 11:c=e.sent,n=c.timerId,i=c.localImageIDs,e.next=25;break;case 16:e.prev=16,e.t0=e.catch(0),d({imageIds:i}),t((0,_.setLayoutGenerationStage)("")),t((0,_.setIsLayoutGenerationInProgress)(!1)),t((0,_.setModalDisplay)(!0)),e.t0 instanceof M?t((0,_.showError)(e.t0)):(p=null!==(f=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==f?f:(0,C.default)("userPrompt","Unable to generate shortcode"),h={status:"AI Error",data:{ai_error_message:p}},t((0,_.showError)(h))),clearTimeout(n),window.dispatchEvent(new CustomEvent("ai_prompt_use_layout_generation_failure",{}));case 25:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}();return{generateLayoutRequest:j}}},54816:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var s=r(96486),c=r(29548),f=r(4255),d=r(77466),p=r(98136),h=r(50013);t.default=function(){var e=(0,d.useAppDispatch)(),t=l((0,h.useLazyUserQuery)(),1)[0],r=l((0,f.useUpdateETAccountLocalMutation)(),1)[0],n=function(){var e=a(o().mark((function e(t,n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r({et_username:t,et_api_key:n,action:"et_builder_update_et_account_local",nonce:window.et_ai_data.nonces.et_builder_update_et_account});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t,r){return e.apply(this,arguments)}}(),i=function(){var r=a(o().mark((function r(i){var a,l,u,f;return o().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=i.et_api_key.trim(),l=i.et_username.trim(),e((0,p.updateLoading)(!0)),e((0,c.setETAccount)({et_username:l,et_api_key:a,errorMessage:""})),r.prev=4,r.next=7,t();case 7:if(u=r.sent,!(f=u.error)){r.next=13;break}return e((0,c.setETAccount)({errorMessage:(0,s.get)(f,"data.ai_error_message")})),e((0,p.updateLoading)(!1)),r.abrupt("return");case 13:return r.next=15,n(l,a);case 15:e((0,p.updateLoading)(!1)),e((0,p.toggleSubmitAutoRequest)(!0)),r.next=22;break;case 19:r.prev=19,r.t0=r.catch(4),console.log(r.t0);case 22:case"end":return r.stop()}}),r,null,[[4,19]])})));return function(e){return r.apply(this,arguments)}}();return{showUserError:function(t,r){setTimeout((function(){return e((0,p.showError)({data:{error:t,ai_error_message:r}}))}),50)},submitAuthorization:i}}},66557:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["content"];function i(){i=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,o(w,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var v=r(87363),g=r(40930),y=r(36113),b=r(96486),w=m(r(787)),_=r(50013),x=r(74968),S=r(98136),k=r(14587),O=r(8035),E=r(77466),C=r(89861),j=0,P={};t.default=function(e){var t=(0,g.useFormContext)(),r=t.setValue,n=t.getValues,a=(0,E.useAppSelector)(k.selectHistory),c=(0,E.useAppSelector)(k.selectModuleQuery),h=(0,E.useAppSelector)(k.selectTextQuery),m=(0,E.useAppSelector)(k.selectSkipAutoAction),L=d((0,_.useRefineModuleMutation)(),1)[0],M=d((0,x.useUploadImageMutation)(),1)[0],A=(0,E.useAppSelector)(k.selectAdditionalInfo),T=(0,E.useAppSelector)(k.selectSelectedOption),I=(0,E.useAppSelector)(k.selectCurrent),R=d((0,_.useLazyRefineQuery)(),1)[0],N=(0,E.useAppSelector)(k.selectModuleFields),D=d((0,v.useState)(!1),2),z=D[0],F=D[1],B=d((0,v.useState)(""),2),H=B[0],U=B[1],W=d((0,v.useState)(!1),2),V=W[0],q=W[1],G=d((0,v.useState)(0),2),Y=G[0],K=G[1],$=(0,y.useDispatch)(),Q=(0,v.useRef)({}),Z=A||{},X=Z.intent,J=Z.fields,ee=Z.field_name,te=Z.excludeStep,re=function(e){(0,b.forEach)(e,(function(e){if(!(0,b.includes)(C.aiSupportedImageFields,e.name))return null;j++}))},ne=function(e,t,n){(0,b.forEach)(e,(function(e){var o=e.name;if(!t)return null;var i=t[o];(0,b.includes)(C.aiSupportedImageFields,o)?(r(o,i),le(o,{data:i},n)):r(o,(0,C.stripDoubleQuotes)((0,b.toString)(i)))}))};(0,v.useEffect)((function(){if(!m){var e=[O.TextOption.WRITE_WITH_AI,O.TextOption.IMPROVE_WITH_AI,O.TextOption.WRITE_AND_REPLACE,O.TextOption.RESULT];O.MODULE_FIELDS_AUTOFILL===X||e.includes(T)||oe(T)}}),[]),(0,v.useEffect)((function(){if(a.length){var e=a.at(-1);if(O.MODULE_FIELDS_AUTOFILL===X){if((0,b.isArray)((0,b.first)(J))){var t=a.at(-1);(0,b.forEach)(J,(function(e){return(0,b.isArray)(e)&&re(e)}));var n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(J.entries());try{for(o.s();!(n=o.n()).done;){var i=d(n.value,2),l=i[0],u=i[1];(0,b.isArray)(u)&&ne(u,t[l],l)}}catch(e){o.e(e)}finally{o.f()}}else re(J),ne(J,e);te&&!j&&ie()}else r("text",e?(0,C.stripDoubleQuotes)((0,b.toString)(e)):"")}}),[a]);var oe=function(){var e=f(i().mark((function e(t){var u,f,d,p,m,v,g,y,w,_,x,k,E;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=n(),f=u.tone,d=u.rewrite,p=u.more_option,F(!0),O.MODULE_FIELDS_AUTOFILL===X){e.next=15;break}return m=h.content,v=s(h,o),g=l(l({},v),{},{previous_result:a.at(I)||m||"",previous_prompt:h.prompt,prompt:d,more_option:p,module_fields:N}),(0,b.isObject)(t)&&(g=l(l({},g),t)),e.next=8,R(g);case 8:return y=e.sent,w=y.data,(_=y.error)&&$((0,S.showError)(_)),(i=null==w?void 0:w.content)&&(r("text",(0,C.stripDoubleQuotes)(i)),$((0,S.updateHistory)(i))),F(!1),e.abrupt("return");case 15:return e.next=17,L(l(l({},l(l({},c),{},{tone:f})),{},{prompt:d,previous_result:a.at(I)},t));case 17:if(x=e.sent,(k=(0,b.get)(x,"error",!1))&&$((0,S.showError)(k)),F(!1),E=(0,b.get)(x,"data")){e.next=24;break}return e.abrupt("return");case 24:$((0,S.updateHistory)(E)),J.map((function(e){var t=e.name;r(t,null!=E&&E[t]?(0,C.stripDoubleQuotes)(E[t]):"")}));case 26:case"end":return e.stop()}var i}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var t=null==ee?void 0:ee.match(/__hover|_tablet|_phone/),r=J.find((function(e){var r=e.name;return null!=t&&t.length&&(r+=(0,b.first)(t)),r===ee})),o={};if(r){var i=r.selectedText,u=r.defaultValue;o=i?{text:u.replace(i,n("text")),fieldName:ee}:{text:n("text"),fieldName:ee}}else o={text:n("text"),fieldName:ee};O.MODULE_FIELDS_AUTOFILL===X&&(o=function(){var e={intent:X,settings:{}};if((0,b.isArray)((0,b.first)(J))){var t=a.at(-1);e.settings=[],(0,b.forEach)(J,(function(r,n){(0,b.isArray)(r)&&(0,b.forEach)(r,(function(r){var o=r.name,i=(0,b.get)(t,n,{})[o];(0,b.includes)(C.aiSupportedImageFields,o)&&(i=(0,b.get)(P,n,"")),(0,b.isUndefined)(e.settings[n])&&(e.settings[n]={}),e.settings[n][o]=i}))}))}else J.forEach((function(t){var r=t.name;e.settings[r]=n(r)}));return e}(),"page settings"===A.module&&(o=l(l({},o),{},{text:H,localImageID:Q.current[H]}))),window.dispatchEvent(new CustomEvent("ai_prompt_use_text_click",{detail:o})),e.closePrompt()},ae=function(){var e=f(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,M({url:encodeURIComponent(t),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 5:return r=e.sent,e.abrupt("return",null==r?void 0:r.data);case 9:e.prev=9,e.t0=e.catch(2),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=f(i().mark((function e(t,n,o){var a,s,c,d,p,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=(0,b.get)(n,"data.content",[]),s=(0,b.get)(n,"error",!1),c=(0,b.get)(n,"data.eta",0),d=(0,b.get)(n,"data.status",""),p=Math.ceil((0,b.toNumber)(c)),h=(0,b.isNaN)(p)?0:1e3*p+2e3,s&&$((0,S.showError)(s)),"busy"===d?(F(!1),$((0,S.showError)({status:"busy",error:(0,w.default)("userPrompt","$serverBusy")}))):(F(!0),q(!0),K(h/1e3),setTimeout(f(i().mark((function e(){var n,s,c,f,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.length){e.next=15;break}return e.next=3,ae((0,b.first)(a));case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:n=e.t0,s=n.localImageID,c=void 0===s?0:s,f=n.localImageURL,d=void 0===f?"":f,(0,b.isUndefined)(o)?U(d):P=l(l({},P),u({},o,d)),r(t,d),Q.current=l(l({},Q.current),{},u({},d,c)),$((0,S.updateHistoryAtIndex)({index:I,value:u({},t,d),merge:!0}));case 15:F(!1),q(!1),te&&(j&&j--,j||ie());case 18:case"end":return e.stop()}}),e)}))),h));case 8:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();return{isLoading:z,localImageURL:H,isWaitingImages:V,imagesProgressTimeout:Y,onSubmit:oe,handleUseTextClick:ie}}},13456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(96486),i=r(77466),a=r(77466),l=r(19695),u=r(98136),s=r(14587),c=r(50013);t.default=function(){var e=(0,i.useAppDispatch)(),t=(0,a.useAppSelector)(s.selectError),r=(0,a.useAppSelector)(l.selectShowAuthorizationModal),f=(0,a.useAppSelector)(s.selectAdditionalInfo),d=(0,c.useUserQuery)(),p=d.data,h=(d.error,!(0,o.isUndefined)(p)&&"active"===p.subscription),m=(0,o.get)(t,"data.ai_error_message","").endsWith("Please upgrade your subscription.")||!(0,o.isUndefined)(p)&&!h&&!p.remainingRequests,v=f||{},g=v.excludeStep;v.fields,v.intent,v.module;return(0,n.useEffect)((function(){(0,o.isUndefined)(p)||r||g||h||m&&e((0,u.showUpgradeModal)(!0))}),[m]),{showFreeUpgradeBar:!(0,o.isUndefined)(p)&&!(r||g||h)}}},92e3:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(50013),c=u(r(69275));t.default=function(){var e={generateImage:a((0,s.useGenerateImageMutation)(),1)[0],refineImage:a((0,s.useRefineImageMutation)(),1)[0],autoGenerateImage:a((0,s.useAutoGenerateImageMutation)(),1)[0],inpaintImage:a((0,s.useInpaintImageMutation)(),1)[0],outpaintImage:a((0,s.useOutpaintImageMutation)(),1)[0],sketchImage:a((0,s.useSketchImageMutation)(),1)[0],enhance:a((0,s.useEnhanceMutation)(),1)[0]},t=function(){var t,r=(t=o().mark((function t(){var r,n,i,a,l;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=c.default.getLastApiAction()){t.next=3;break}return t.abrupt("return");case 3:if(n=r.meta.arg,i=n.endpointName,a=n.originalArgs,!i){t.next=9;break}return l=e[i],t.next=8,l(a);case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))});return function(){return r.apply(this,arguments)}}();return t}},71265:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});var u=r(87363),s=r(96486),c=r(50013),f=r(89861),d=r(98136),p=r(77466);t.default=function(e){var t=e.additionalInfo,r=e.contextData,n=e.setValue,l=(0,p.useAppDispatch)(),h=a((0,u.useState)(!1),2),m=h[0],v=h[1],g=a((0,c.useGeneratePromptMutation)(),1)[0],y=function(){var e,a=(e=o().mark((function e(){var i,a,u,c,p,h,m,y,b,w,_,x,S;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=(i=t||{}).module,u=i.fields,c=i.field_name,p=window.et_ai_data,h=p.site_name,m=p.site_description,y=p.site_language,b={},n("prompt",""),v(!0),null==u||u.map((function(e){var t=e.name,r=e.defaultValue;b[t]=r||""})),w={site_name:h,site_description:m,module_name:a,content_type:c,module_fields:b,page_content:r.page,language:y},e.prev=7,e.next=10,g(w);case 10:_=e.sent,x=(0,s.get)(_,"data.prompt",""),(S=(0,s.get)(_,"error",!1))&&l((0,d.showError)(S)),x&&n("prompt",(0,f.stripDoubleQuotes)(x)),v(!1),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(7),console.log(e.t0);case 21:case"end":return e.stop()}}),e,null,[[7,18]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))});return function(){return a.apply(this,arguments)}}();return{handleGeneratePrompt:y,descGenerating:m}}},73686:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var h=r(96486),m=p(r(787)),v=r(29548),g=r(50013),y=r(8035),b=r(14587),w=r(98136),_=r(88712),x=r(77466),S=r(89861);t.default=function(){var e=(0,x.useAppDispatch)(),t=c((0,g.useGenerateImageMutation)(),1)[0],r=(0,x.useAppSelector)(b.selectImageQuery),n=(0,x.useAppSelector)(b.selectPromptHistories),a=function(){var a,c=(a=o().mark((function a(s){var c,f,d,p,g,b,x,k,O,E,C,j,P,L,M,A,T,I,R,N,D,z,F,B,H,U,W,V,q,G,Y;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return c=s.prompt,f=s.imageWidth,d=s.imageHeight,p=s.imageType,g=s.imageStyle,b=s.imageMood,x=s.referenceImageBase64,k=s.referenceImageInfluence,O=s.aspectRatio,E=f&&""!==f?f:(0,S.getDefaultDimensions)(O).width,C=d&&""!==d?d:(0,S.getDefaultDimensions)(O).height,j=1,P=l(l({},r),{},{imageMood:b,imageType:p,prompt:c,style:g,image_base64:x,image_influence:k}),""===x&&(L=(0,_.getSizeWithUpscaleRate)(E,C),M=L.width,A=L.height,T=L.scale,E=M,C=A,j=T,P.width=(0,_.getDivisibleByEight)(E),P.height=(0,_.getDivisibleByEight)(C),P.scale=j),e((0,w.updateImageQuery)(P)),I=parseFloat(k)||0,e((0,w.setImageETA)(0)),o.prev=9,R={prompt:c,image_influence:I,image_base64:x,style:g,width:P.width,height:P.height,scale:P.scale},o.next=13,t(R);case 13:N=o.sent,401===(0,h.get)(N,"error.originalStatus")?e((0,v.setETAccount)({errorMessage:"Invalid API Key or Username"})):(D=(0,h.get)(N,"data.content",[]),(z=(0,h.get)(N,"error",!1))&&e((0,w.showError)(z)),D&&(F=(0,h.get)(n,c,[]),B=(0,h.get)(N,"data.eta",0),H=(0,h.get)(N,"data.status",""),U=Math.ceil((0,h.toNumber)(B)),W=(0,h.isNaN)(U)?0:1e3*U+2e3,"busy"===H?e((0,w.showError)({status:"busy",error:(0,m.default)("userPrompt","$serverBusy")})):(V=R.width,q=R.height,G=R.scale,Y=(0,S.createImagesHistoryData)(D,V,q,G),e((0,w.setImageETA)(W)),e((0,w.setPromptHistories)(l(l({},n),{},u({},c,[].concat(i(F),i(D)))))),e((0,w.updateImagesHistory)(Y)),e((0,w.updateSelectedOption)(y.ImageOption.RESULT))))),e((0,w.updateLoading)(!1)),o.next=21;break;case 18:o.prev=18,o.t0=o.catch(9),console.log(o.t0);case 21:case"end":return o.stop()}}),a,null,[[9,18]])})),function(){var e=this,t=arguments;return new Promise((function(r,n){var o=a.apply(e,t);function i(e){s(o,r,n,i,l,"next",e)}function l(e){s(o,r,n,i,l,"throw",e)}i(void 0)}))});return function(e){return c.apply(this,arguments)}}();return{generateImageRequest:a}}},25788:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(96486),i=n(r(55102)),a=r(77466),l=r(8035),u=r(14587),s=r(98136);t.default=function(){var e=(0,a.useAppDispatch)(),t=(0,a.useAppSelector)(u.selectUpgradeModal),r=(0,a.useAppSelector)(u.selectError),n=(0,a.useAppSelector)(u.selectAiMode),c=(0,a.useAppSelector)(u.selectIsBackButtonVisible),f=(0,a.useAppSelector)(u.selectSelectedOption),d=(0,a.useAppSelector)(u.selectOpenPromptType),p=function(){return(0,o.get)(r,"data.ai_error_message","").endsWith("Please upgrade your subscription.")},h=(0,i.default)().resetCodePreview;return{closeUserPrompt:function(){var r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(t)return e((0,s.showUpgradeModal)(!1)),void(p()&&e((0,s.showError)({show:!1,status:"",data:{error:"",ai_error_message:""}})));if(r&&h(),"image"===n){e((0,s.setSelectedPrompt)(""))}e((0,s.hideModal)())},handleBackBtnClick:function(){if(c){if("code"===n)return function(){h(),e((0,s.setBackButtonVisibility)(!1)),e((0,s.updateSelectedOption)(l.CodeOption.CODE_WITH_AI))}}else if("code"!==n&&l.PromptType.Refine===d&&l.TextOption.RESULT===f)return function(){return e((0,s.updateSelectedOption)(l.TextOption.WRITE_WITH_AI))}}}}},83104:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new c(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function c(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return c=function(e){this.s=e,this.n=e.next},c.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new c(e)}function f(e){var t,r;function n(t,r){try{var i=e[t](r),a=i.value,l=a instanceof d;Promise.resolve(l?a.v:a).then((function(r){if(l){var u="return"===t?"return":"next";if(!a.k||r.done)return n(u,r);r=e[u](r).value}o(i.done?"return":"normal",r)}),(function(e){n("throw",e)}))}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise((function(i,a){var l={key:e,arg:o,resolve:i,reject:a,next:null};r?r=r.next=l:(t=r=l,n(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}function d(e,t){this.v=e,this.k=t}f.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},f.prototype.next=function(e){return this._invoke("next",e)},f.prototype.throw=function(e){return this._invoke("throw",e)},f.prototype.return=function(e){return this._invoke("return",e)},Object.defineProperty(t,"__esModule",{value:!0});var p=r(96486),h=r(98136),m=r(50013),v=r(77466),g=r(14587),y=r(89861);t.default=function(){var e=(0,v.useAppDispatch)(),t=l((0,m.useGenerateModuleMutation)(),1)[0],r=(0,v.useAppSelector)(g.selectContext),n=(0,v.useAppSelector)(g.selectAdditionalInfo),i=(0,v.useAppSelector)(g.selectModuleFields),u=n||{},c=(u.excludeStep,u.fields),b=(u.intent,u.module),w=function(){var n=a(o().mark((function n(){var a,l,u,s,c,f,d,m;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=window.et_ai_data,l=a.site_name,u=a.site_description,s=a.site_language,e((0,h.updateLoading)(!0)),c={site_name:l,site_description:u,module_name:b,module_fields:i,page_content:r.page,tone:"creative",language:s},e((0,h.updateModuleQuery)(c)),n.prev=4,n.next=7,t(c);case 7:f=n.sent,d=(0,p.get)(f,"data",""),m=(0,p.get)(f,"error",!1),e((0,h.updateLoading)(!1)),m&&e((0,h.showError)(m)),d&&e((0,h.updateHistory)((0,y.getCleanAIObject)(d))),n.next=18;break;case 15:n.prev=15,n.t0=n.catch(4),console.log(n.t0);case 18:case"end":return n.stop()}}),n,null,[[4,15]])})));return function(){return n.apply(this,arguments)}}();function _(e){return x.apply(this,arguments)}function x(){var e;return e=o().mark((function e(r){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new d(t(r),0);case 2:return e.next=4,e.sent;case 4:case"end":return e.stop()}}),e)})),x=function(){return new f(e.apply(this,arguments))},x.apply(this,arguments)}var S=function(){var t=a(o().mark((function t(){var n,i,a,u,f,d,m,v,g,w,x,S,k,O,E,C,j,P;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=window.et_ai_data,i=n.site_name,a=n.site_description,u=n.site_language,e((0,h.updateLoading)(!0)),f={site_name:i,site_description:a,module_name:"",module_fields:{},page_content:r.page,tone:"creative",language:u},d=[],m=!1,v=!1,t.prev=6,w=s(c.entries());case 8:return t.next=10,w.next();case 10:if(!(m=!(x=t.sent).done)){t.next=29;break}if(S=l(x.value,2),k=S[0],O=S[1],(0,p.isArray)(O)){t.next=14;break}return t.abrupt("continue",26);case 14:return f.module_name=b[k],f.module_fields=(0,y.getFormattedFields)(O),E=_(f),t.next=19,E.next();case 19:if(C=t.sent.value,j=(0,p.get)(C,"data"),!(P=(0,p.get)(C,"error",!1))){t.next=25;break}return e((0,h.showError)(P)),t.abrupt("break",29);case 25:j&&d.push((0,y.getCleanAIObject)(j));case 26:m=!1,t.next=8;break;case 29:t.next=35;break;case 31:t.prev=31,t.t0=t.catch(6),v=!0,g=t.t0;case 35:if(t.prev=35,t.prev=36,!m||null==w.return){t.next=40;break}return t.next=40,w.return();case 40:if(t.prev=40,!v){t.next=43;break}throw g;case 43:return t.finish(40);case 44:return t.finish(35);case 45:e((0,h.updateHistory)(d)),e((0,h.updateLoading)(!1));case 47:case"end":return t.stop()}}),t,null,[[6,31,35,45],[36,,40,44]])})));return function(){return t.apply(this,arguments)}}();return{generateModuleFieldsAutofill:w,generateModuleFieldsAutofillChain:S}}},52814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_CANVAS_SIZE=t.COLORS=void 0,t.COLORS={white:"#ffffff",black:"#000000",charcoal:"#4C5866",dustyBlue:"#A2B0C1"},t.MAX_CANVAS_SIZE=8192},8035:(e,t)=>{"use strict";var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.TBArea=t.TBPostType=t.AICodeInsertMode=t.DefaultImageReferenceSize=t.CodeContentType=t.ContentType=t.MODULE_FIELDS_AUTOFILL=t.Tags=t.LayoutOption=t.CodeOption=t.ImageOption=t.TextOption=t.PromptType=void 0,function(e){e[e.Generate=0]="Generate",e[e.Refine=1]="Refine"}(r||(t.PromptType=r={})),t.TextOption={WRITE_WITH_AI:"write_with_ai",IMPROVE_WITH_AI:"improve_with_ai",WRITE_AUTOMATICALLY:"write_automatically",WRITE_AND_REPLACE:"write_and_replace",RESULT:"result"},t.ImageOption={GENERATE_WITH_AI:"generate_with_ai",GENERATE_AUTOMATICALLY:"generate_automatically",IMPROVE_WITH_AI:"improve_with_ai",GENERATE_AND_REPLACE:"generate_and_replace",REIMAGINE:"reimagine",RESULT:"result"},t.CodeOption={CODE_WITH_AI:"code_with_ai",IMPROVE_CODE_WITH_AI:"improve_code_with_ai",RESULT:"result"},t.LayoutOption={LAYOUT_WITH_AI:"layout_with_ai",RESULT:"result"},t.Tags={Retry:"retry",Simplify:"simplify",Shorten:"shorten",Lengthen:"lengthen"},t.MODULE_FIELDS_AUTOFILL="module_fields_autofill",t.ContentType={paragraph:"paragraph",title:"title",button:"button"},t.CodeContentType={code_css:"css",code_html:"html",code_css_no_selector:"css-declarations",code_css_free_form:"free-form-css"},t.DefaultImageReferenceSize={width:512,height:512,scale:1},t.AICodeInsertMode={APPEND:"append",INSERT:"insert",REPLACE:"replace"},function(e){e.EtHeaderLayout="et_header_layout",e.EtBodyLayout="et_body_layout",e.EtFooterLayout="et_footer_layout"}(n||(t.TBPostType=n={})),function(e){e.Header="header",e.Body="post_content",e.Footer="footer"}(o||(t.TBArea=o={}))},89861:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,l,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.checkMultiples=t.getMultipleUpscaleRates=t.getThemeBuilderArea=t.isCurrentDomain=t.removeQueryParam=t.appendQueryString=t.increaseUrlVersion=t.createImagesHistoryData=t.prepareLayoutGenerationFont=t.handleEnterKeyCallback=t.getModuleHTMLForCode=t.getImageSizeByUrl=t.mergeImages=t.convertImageToBase64=t.getFieldCleanValue=t.getSizeWithUpscaleRate=t.getCleanAIObject=t.stripDoubleQuotes=t.getDefaultDimensions=t.getDivisibleByEight=t.removeLoremIpsum=t.isLoremIpsum=t.getFormattedFields=t.getValidPrefilledContentType=t.aiSupportedImageFields=void 0;var c=r(96486),f=r(8035),d=s(r(787)),p=r(8035),h=r(88712),m=r(52814),v="lorem|ipsum|dolor|sit|amet|consectetur|adipiscing|elit|nunc|fringilla|nisl|neque|vitae|accumsan|eros|posuere|vel|pulvinar|nulla|sed|sodales|felis|ante|auctor|molestie|vivamus|pharetra|tempor|erat|semper|vestibulum|primis|faucibus|orci|luctus|ultrices|cubilia|curae|tortor|pretium|mollis|enim|non|maximus|tellus|ultricies|ligula|imperdiet|duis|euamet|quam|ullamcorper|consequat|donec|porttitor|libero|ex|vulputate|laoreet|lectus|interdum|mattis|maecenas|leo|scelerisque|aenean|dictum|nullam|arcu|lobortis|aliquam|augue|finibus|venenatis|eget|urna|quis|velit|fusce|tristique|cursus|morbi|sapien|suscipit|nibh|cras|efficitur|fermentum|commodo|proin|ligula|facilisis|mauris|tempus|ligula|risus|phasellus|vitae|eleifend|tellus|gravida|condimentum|vitae|placerat|malesuada|fermentum|commodo|scelerisque|augue|feugiat|ornare|tempor|dictum|ultrices|vestibulum|metus|felis|condimentum|mollis|quam|vel|erat|tellus|aliquam|pulvinar|massa|tristique|condimentum|blandit|rutrum|lacus|auctor|lorem|id|porttitor|imperdiet|volutpat|duis|consequat|tincidunt|euismod|sodales|malesuada|placerat|vitae|tincidunt|maximus|aliquam|tincidunt|fermentum|commodo|proin|scelerisque|luctus|proin|dolor|commodo|vulputate|nulla|mi|varius|iuculis|dignissim|quis|vivamus|placerat|suspendisse|egestas|diam";t.aiSupportedImageFields=["src","logo","image","image_url","portrait_url","logo_image_url","header_image_url","et_pb_post_settings_image"],t.getValidPrefilledContentType=function(e){var t=f.ContentType.paragraph;switch(e){case"text":t=f.ContentType.title;break;case"content":t=f.ContentType.paragraph;break;case"button":t=f.ContentType.button;break;case"code_css":t=f.CodeContentType.code_css;break;case"code_html":t=f.CodeContentType.code_html;break;case"code_css_no_selector":t=f.CodeContentType.code_css_no_selector;break;case"code_css_free_form":t=f.CodeContentType.code_css_free_form}return t};function g(e){return new RegExp("\\b(".concat(v,")\\b"),"gi").test(e)}function y(e){if(!e)return 0;var t=e%8;return 0===t?e:e-t}t.getFormattedFields=function(e){var t={};return e.map((function(e){var r=e.name,n=e.defaultValue;t[r]=(0,c.isUndefined)(n)?"":n})),t},t.isLoremIpsum=g,t.removeLoremIpsum=function(e){var t=new RegExp("\\b(".concat(v,")\\b"),"gi");return e.replace(t,"")},t.getDivisibleByEight=y;function b(e){return e&&(0,c.isString)(e)?e.replace(/(^"|"$)/g,""):""}t.getDefaultDimensions=function(e){switch(e){case"portrait":return{width:512,height:y(682)};case"landscape":return{width:y(819),height:512};default:return{width:512,height:512}}},t.stripDoubleQuotes=b,t.getCleanAIObject=function(e){var r={};return(0,c.forEach)(e,(function(e,n){r[n]=(0,c.includes)(t.aiSupportedImageFields,n)?e:b(e)})),r};t.getSizeWithUpscaleRate=function(e,t){var r=""!==e?parseInt(e):0,n=""!==t?parseInt(t):0,o=1;if(r<512&&n<512&&(e="512",t="512",r=512,n=512),r<1024&&n<1024)return{width:y(r),height:y(n),scale:o};var i=Math.max(r,n);o=Math.floor(i/512);var a=Math.ceil(r/o),l=Math.ceil(n/o);return{width:y(a),height:y(l),scale:o}};t.getFieldCleanValue=function(e){var t=e.defaultValue,r=void 0===t?"":t;return r=g(r)?"":r,l(l({},e),{},{defaultValue:r})};t.convertImageToBase64=function(e,t){(0,h.getImageBase64WithUpscaleRate)(e).then((function(e){var r=e.base64,n=e.width,o=e.height,i=e.scale;t(r,i,n,o)}))};var w=function(){var e,t=(e=o().mark((function e(t){var r,n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.urlBg,n=t.base64Bg,i=t.urlImage,a=t.base64Image,e.abrupt("return",new Promise((function(e,t){var o=new Image;if(o.crossOrigin="anonymous",r)o.src=r;else{if(!n)return void t((0,d.default)("aiImageEditor","$backgroundImageRequired"));o.src=n}o.onload=function(){var r=document.createElement("canvas");r.width=o.width,r.height=o.height;var n=r.getContext("2d");null==n||n.drawImage(o,0,0);var l=new Image;if(l.crossOrigin="anonymous",i)l.src=i;else{if(!a)return void t((0,d.default)("aiImageEditor","$imageRequired"));l.src=a}l.onload=function(){null==n||n.drawImage(l,0,0);var t=r.toDataURL("image/png");e(t)},l.onerror=t},o.onerror=t})));case 2:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))});return function(e){return t.apply(this,arguments)}}();t.mergeImages=w;t.getImageSizeByUrl=function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){var e={sizes:{full:{width:n.width,height:n.height}}};t(e)},n.onerror=function(e){r(e)},n.src=e}))};t.getModuleHTMLForCode=function(e,t){return("free-form-css"===t?e.replace(/class="[^"]*"/,'class="selector"'):e)||""};t.handleEnterKeyCallback=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.stopPropagation(),"Enter"===e.key)return e.preventDefault(),r||t(),!1};t.prepareLayoutGenerationFont=function(e,t,r){return"default"===e?t:"websiteDefault"===e?r:e};t.createImagesHistoryData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:512,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return e.reduce((function(e,o){return e[o]={width:t,height:r,scale:n},e}),{})};t.increaseUrlVersion=function(e){var t=new URL(e),r=parseInt(t.searchParams.get("v")||"0")+1;return t.searchParams.set("v",r.toString()),t.toString()};t.appendQueryString=function(e,t){var r=Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&");return e+(e.includes("?")?"&":"?")+r};t.removeQueryParam=function(e,t){var r=new URL(e),n=new URLSearchParams(r.search);return n.delete(t),r.search=n.toString(),r.toString()};t.isCurrentDomain=function(e){try{var t;return new URL(e).hostname===(null===(t=window.top)||void 0===t?void 0:t.location.hostname)}catch(e){return console.error(e),!1}};t.getThemeBuilderArea=function(e){var t,r;return null!==(r=(u(t={},p.TBPostType.EtHeaderLayout,p.TBArea.Header),u(t,p.TBPostType.EtBodyLayout,p.TBArea.Body),u(t,p.TBPostType.EtFooterLayout,p.TBArea.Footer),t)[e])&&void 0!==r?r:"post_content"};t.getMultipleUpscaleRates=function(e,t,r){for(var n=[],o=e;o<t;){var i=Math.min(4,Math.round(t/o)),a=Math.max(2,i);n.push(a),o*=a}return r>1&&n.push(r),n};t.checkMultiples=function(e){for(var t={},r=0,n=[2,3,4];r<n.length;r++){var o=n[r];e*o<=m.MAX_CANVAS_SIZE&&(t[o]=o.toString())}return t}},69275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(24268),i=(n=null,{middleware:function(){return function(e){return function(t){if((0,o.isAsyncThunkAction)(t)){var r=t.meta,i=r.arg.endpointName;"pending"===r.requestStatus&&["generateImage","autoGenerateImage","refineImage","inpaintImage","sketchImage","outpaintImage","enhance"].includes(i)&&(n=t)}return e(t)}}},getLastApiAction:function(){return n}});t.default=i},19695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectShowAuthorizationModal=t.etAccountStatus=t.etAccount=void 0;var n=r(24268);t.etAccount=function(e){return e.diviAIOptions.etAccount};t.etAccountStatus=function(e){return e.diviAIOptions.etAccount.status},t.selectShowAuthorizationModal=(0,n.createSelector)(t.etAccount,(function(e){return(null==e?void 0:e.errorMessage)&&""!==(null==e?void 0:e.errorMessage)||!e.username||!e.apiKey}))},29548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setETAccount=t.diviAIOptionsSlice=void 0;var n=r(24268);t.diviAIOptionsSlice=(0,n.createSlice)({name:"diviAIOptions",initialState:{etAccount:{username:"",apiKey:"",status:"not_active",errorMessage:""}},reducers:{setETAccount:function(e,t){var r,n;e.etAccount.username=null!==(r=t.payload.et_username)&&void 0!==r?r:e.etAccount.username,e.etAccount.apiKey=null!==(n=t.payload.et_api_key)&&void 0!==n?n:e.etAccount.apiKey,e.etAccount.status=t.payload.status,e.etAccount.errorMessage=t.payload.errorMessage}}}),t.setETAccount=t.diviAIOptionsSlice.actions.setETAccount,t.default=t.diviAIOptionsSlice.reducer},13603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectModifySelectedAll=t.extendCanvasRatio=t.currentExtendCanvas=t.hasImageEditHistory=t.currentImageTransparentMask=t.currentImageMask=t.currentBrushColor=t.currentHistory=t.currentBrushBlur=t.currentBrushSize=t.extendCanvasData=t.editorMode=t.imageEditorLastState=t.imageEditorTab=t.selectImage=t.imageEditorURL=void 0;var n=r(24268);t.imageEditorURL=function(e){return e.diviAIImageEditor.imageURL};t.selectImage=function(e){return e.diviAIImageEditor.image};t.imageEditorTab=function(e){return e.diviAIImageEditor.editorTab};t.imageEditorLastState=function(e){return e.diviAIImageEditor.imageEditorLastState};t.editorMode=function(e){return e.diviAIImageEditor.editorMode};t.extendCanvasData=function(e){return e.diviAIImageEditor.imageEditorLastState.extendCanvasData},t.currentBrushSize=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushSize)&&void 0!==n?n:30})),t.currentBrushBlur=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushBlur)&&void 0!==n?n:5})),t.currentHistory=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.lastPoints)&&void 0!==n?n:""})),t.currentBrushColor=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushColor)&&void 0!==n?n:"#000000"})),t.currentImageMask=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.mask)&&void 0!==n?n:""})),t.currentImageTransparentMask=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.transparentMask)&&void 0!==n?n:""})),t.hasImageEditHistory=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r=(null==e?void 0:e[t])||{};return Object.keys(r).length>0})),t.currentExtendCanvas=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r,n;return null!==(r=null==e||null===(n=e[t])||void 0===n?void 0:n.Extend.extendCanvasData)&&void 0!==r?r:{}})),t.extendCanvasRatio=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r,n;return null!==(r=null==e||null===(n=e[t])||void 0===n?void 0:n.Extend.activeExtendRatio)&&void 0!==r?r:""}));t.selectModifySelectedAll=function(e){return e.diviAIImageEditor.modifySelectedAll}},91021:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}var s;Object.defineProperty(t,"__esModule",{value:!0}),t.setModifySelectedAll=t.clearImageEditorHistory=t.setEditorTab=t.addEditorState=t.setEditorMode=t.setEditorImage=t.setEditorImageURL=t.diviAIImageEditorSlice=t.EditorTabs=t.EditorModes=void 0;var c,f,d=r(24268);!function(e){e.Modify="Modify",e.Extend="Extend",e.Upscale="Upscale",e.Enhance="Enhance"}(c||(t.EditorModes=c={})),function(e){e.ImageSelection="Image Selection",e.ImageSketch="Image Sketch"}(f||(t.EditorTabs=f={}));var p={imageURL:"",editorTab:f.ImageSelection,imageEditorLastState:{},editorMode:c.Modify,image:{},modifySelectedAll:!1};t.diviAIImageEditorSlice=(0,d.createSlice)({name:"diviAIImageEditor",initialState:p,reducers:{setEditorImageURL:function(e,t){e.imageURL=t.payload},setEditorImage:function(e,t){e.image=t.payload},addEditorState:function(e,t){var r,n,o,i=t.payload.editorState,u=t.payload.imageURL,s=e.editorTab,c=null!==(r=e.imageEditorLastState[u])&&void 0!==r?r:{},f=null!==(n=null===(o=e.imageEditorLastState[u])||void 0===o?void 0:o[s])&&void 0!==n?n:{};c.Extend=function(e,t){var r;return e=null!==(r=e)&&void 0!==r?r:{},t.extendCanvasData&&(e.extendCanvasData=a(a(a({},e.extendCanvasData),t.extendCanvasData),{},{actionOrigin:t.extendCanvasData.actionOrigin||"canvas"})),(""===t.activeExtendRatio||t.activeExtendRatio)&&(e.activeExtendRatio=t.activeExtendRatio),e}(c.Extend,i);var d=a(a({},f),i);e.imageEditorLastState=a(a({},e.imageEditorLastState),{},l({},u,a(a({},c),{},l({},s,d))))},setEditorMode:function(e,t){e.editorMode=t.payload},setEditorTab:function(e,t){e.editorTab=t.payload},clearImageEditorHistory:function(e,t){var r,n=null!==(r=t.payload)&&void 0!==r?r:null;if(n){var i=e.imageEditorLastState,a=(i[n],o(i,[n].map(u)));e.imageEditorLastState=a}},setModifySelectedAll:function(e,t){e.modifySelectedAll=t.payload}}}),s=t.diviAIImageEditorSlice.actions,t.setEditorImageURL=s.setEditorImageURL,t.setEditorImage=s.setEditorImage,t.setEditorMode=s.setEditorMode,t.addEditorState=s.addEditorState,t.setEditorTab=s.setEditorTab,t.clearImageEditorHistory=s.clearImageEditorHistory,t.setModifySelectedAll=s.setModifySelectedAll,t.default=t.diviAIImageEditorSlice.reducer},14587:(e,t,r)=>{"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.selectDefaultHeadingFontColor=t.selectDefaultBodyFontColor=t.selectDefaultSecondaryColor=t.selectDefaultPrimaryFontColor=t.selectSubmitAutoRequest=t.selectIsLocalImageEditorActive=t.selectLayoutModalTempData=t.selectIsLayoutGenerationInProgress=t.selectLayoutsImagesUpscaleCount=t.selectLayoutsImagesCount=t.selectLayoutGenerationStage=t.selectIsLayoutDefaultSettingsOpen=t.selectLastCodeRequestType=t.selectImageEditorModal=t.selectContextHTMLReceived=t.selectIsBackButtonVisible=t.selectAIMenuContext=t.selectProcessedKey=t.selectEditorCursor=t.selectEditorInsertMode=t.selectEditorName=t.selectEditorValue=t.selectImageReference=t.selectUpgradeTip=t.selectUpgradeModal=t.selectError=t.selectModuleFields=t.selectImageQuery=t.selectImageETA=t.selectAiMode=t.selectPrefilledContentType=t.selectAdditionalInfo=t.selectLoadingState=t.selectCodeQuery=t.selectTextQuery=t.selectModuleQuery=t.selectControlLabel=t.selectOpenPromptType=t.selectContext=t.selectSkipAutoAction=t.selectSelectedOption=t.selectDownloadedImages=t.selectPromptHistories=t.selectImagePrompt=t.selectImageProperties=t.selectImagesHistoryUrls=t.selectImagesHistory=t.selectHistory=t.selectCurrent=void 0;var i=r(24268),a=r(8035);t.selectCurrent=function(e){return e.promptModal.current};t.selectHistory=function(e){return e.promptModal.history};t.selectImagesHistory=function(e){return e.promptModal.imagesHistory},t.selectImagesHistoryUrls=(0,i.createSelector)(t.selectImagesHistory,Object.keys);t.selectImageProperties=function(e){return(0,i.createSelector)(t.selectImagesHistory,(function(t){var r;return null!==(r=t[e])&&void 0!==r?r:{}}))};t.selectImagePrompt=function(e){return e.promptModal.imagePrompt};t.selectPromptHistories=function(e){return e.promptModal.promptHistories};t.selectDownloadedImages=function(e){return e.promptModal.downloadedImages};t.selectSelectedOption=function(e){return e.promptModal.selectedOption};t.selectSkipAutoAction=function(e){return e.promptModal.skipAutoAction};t.selectContext=function(e){return e.promptModal.context},t.selectOpenPromptType=(0,i.createSelector)(t.selectSelectedOption,(function(e){return[a.TextOption.WRITE_AUTOMATICALLY,a.TextOption.WRITE_WITH_AI,a.TextOption.WRITE_AND_REPLACE,a.CodeOption.CODE_WITH_AI,a.ImageOption.GENERATE_WITH_AI,a.ImageOption.IMPROVE_WITH_AI,a.LayoutOption.LAYOUT_WITH_AI].includes(e)?a.PromptType.Generate:a.PromptType.Refine}));t.selectControlLabel=function(e){return e.promptModal.controlLabel};t.selectModuleQuery=function(e){return e.promptModal.moduleQuery};t.selectTextQuery=function(e){return e.promptModal.textQuery};t.selectCodeQuery=function(e){return e.promptModal.codeQuery};t.selectLoadingState=function(e){return e.promptModal.isLoading};t.selectAdditionalInfo=function(e){return e.promptModal.additionalInfo};t.selectPrefilledContentType=function(e){return e.promptModal.prefilledContentType};t.selectAiMode=function(e){return e.promptModal.aiMode};t.selectImageETA=function(e){return e.promptModal.imageETA};t.selectImageQuery=function(e){return e.promptModal.imageQuery},t.selectModuleFields=(0,i.createSelector)(t.selectAdditionalInfo,(function(e){var t,r={},o=n(e.fields);try{for(o.s();!(t=o.n()).done;){var i=t.value,a=i.defaultValue,l=i.name,u=i.selectedText;(a=a||"")&&u&&(a=u),r[l]=a}}catch(e){o.e(e)}finally{o.f()}return r}));t.selectError=function(e){return e.promptModal.errorObject};t.selectUpgradeModal=function(e){return e.promptModal.upgradeModal};t.selectUpgradeTip=function(e){return e.promptModal.upgradeTip};t.selectImageReference=function(e){return e.promptModal.imageReference};t.selectEditorValue=function(e){var t,r;return null===(t=e.promptModal)||void 0===t||null===(r=t.code)||void 0===r?void 0:r.editorValue};t.selectEditorName=function(e){var t,r;return null===(t=e.promptModal)||void 0===t||null===(r=t.code)||void 0===r?void 0:r.editorName};t.selectEditorInsertMode=function(e){var t,r;return null===(t=e.promptModal)||void 0===t||null===(r=t.code)||void 0===r?void 0:r.insertMode};t.selectEditorCursor=function(e){var t,r;return null===(t=e.promptModal)||void 0===t||null===(r=t.code)||void 0===r?void 0:r.cursor};t.selectProcessedKey=function(e){var t,r;return null===(t=e.promptModal)||void 0===t||null===(r=t.code)||void 0===r?void 0:r.processedKey},t.selectAIMenuContext=(0,i.createSelector)(t.selectAiMode,t.selectPrefilledContentType,(function(e,t){return"code"===e?t:e}));t.selectIsBackButtonVisible=function(e){return e.promptModal.isBackButtonVisible};t.selectContextHTMLReceived=function(e){return e.promptModal.contextHTMLReceived};t.selectImageEditorModal=function(e){return e.promptModal.isImageEditorActive};t.selectLastCodeRequestType=function(e){return e.promptModal.lastCodeRequestType};t.selectIsLayoutDefaultSettingsOpen=function(e){return e.promptModal.isLayoutDefaultSettingsOpen};t.selectLayoutGenerationStage=function(e){return e.promptModal.layoutGenerationStage};t.selectLayoutsImagesCount=function(e){return e.promptModal.layoutsImagesCount};t.selectLayoutsImagesUpscaleCount=function(e){return e.promptModal.layoutsImagesUpscaleCount};t.selectIsLayoutGenerationInProgress=function(e){return e.promptModal.isLayoutGenerationInProgress};t.selectLayoutModalTempData=function(e){return e.promptModal.layoutModalTempData};t.selectIsLocalImageEditorActive=function(e){return e.promptModal.isLocalImageEditorActive};t.selectSubmitAutoRequest=function(e){return e.promptModal.authorization.submitAutoRequest};t.selectDefaultPrimaryFontColor=function(e){return e.promptModal.layoutDefaultSettings.primaryColor};t.selectDefaultSecondaryColor=function(e){return e.promptModal.layoutDefaultSettings.secondaryColor};t.selectDefaultBodyFontColor=function(e){return e.promptModal.layoutDefaultSettings.bodyFontColor};t.selectDefaultHeadingFontColor=function(e){return e.promptModal.layoutDefaultSettings.headingFontColor}},98136:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s;Object.defineProperty(t,"__esModule",{value:!0}),t.promptModalListenerMiddleware=t.setIsLayoutGenerationInProgress=t.setLayoutsImagesUpscaleCount=t.setDefaultHeadingFontColor=t.setDefaultBodyFontColor=t.setDefaultSecondaryColor=t.setDefaultPrimaryColor=t.toggleSubmitAutoRequest=t.setSkipAutoAction=t.setIsLocalImageEditorActive=t.setImageEditor=t.closeLayoutDefaultSettings=t.openLayoutDefaultSettings=t.setLayoutModalTempData=t.setLayoutsImagesCount=t.setLayoutGenerationStage=t.setLastCodeRequestType=t.setModalDisplay=t.setContextModule=t.setContextHTMLReceived=t.setBackButtonVisibility=t.setCodeEditorInsertMode=t.setImageETA=t.updateTextQuery=t.updateSelectedOption=t.updateModuleQuery=t.updateLoading=t.updateImagesHistory=t.updateImageQuery=t.updateHistoryAtIndex=t.updateHistory=t.updateDownloadedImages=t.updateCurrent=t.showUpgradeTip=t.showUpgradeModal=t.showModal=t.showError=t.setSelectedPrompt=t.setPromptHistories=t.setImageReference=t.initUserPromptModal=t.hideModal=t.promptModalSlice=void 0;var c=r(24268),f=r(8035),d=r(89861),p=r(96486),h={aiMode:"text",display:!0,isLoading:!1,errorObject:{show:!1,status:"",data:{error:"",ai_error_message:""}},current:0,history:[],imagesHistory:{},downloadedImages:[],imagePrompt:"",promptHistories:{},openPromptType:f.PromptType.Generate,prefilledContentType:f.ContentType.paragraph,controlLabel:"",selectedOption:f.TextOption.WRITE_WITH_AI,upgradeModal:!1,upgradeTip:!1,additionalInfo:{intent:"",module:"",fields:[],excludeStep:!1},moduleQuery:{site_name:"",site_description:"",module_name:"",module_fields:{},page_content:"",tone:""},context:{page:"",section:"",module:""},contextHTMLReceived:!0,textQuery:{module_name:""},codeQuery:{content:""},imageQuery:{prompt:"",width:f.DefaultImageReferenceSize.width,height:f.DefaultImageReferenceSize.height,scale:1},imageReference:{url:"",base64:"",influence:30},imageETA:0,skipAutoAction:!1,code:{editorName:"",editorValue:"",insertMode:null,cursor:{line:0,ch:0},processedKey:""},isBackButtonVisible:!1,isImageEditorActive:!1,lastCodeRequestType:"",isLayoutDefaultSettingsOpen:!1,layoutGenerationStage:"",isLayoutGenerationInProgress:!1,layoutsImagesCount:0,layoutsImagesUpscaleCount:0,layoutModalTempData:{pageDescription:"",additionalSiteDescription:"",headingFont:"",bodyFont:"",headingFontColor:"",headingFontColorSelect:"",bodyFontColor:"",bodyFontColorSelect:"",primaryColor:"",secondaryColor:"",primaryColorSelect:"",secondaryColorSelect:""},layoutDefaultSettings:{primaryColor:"",secondaryColor:"",bodyFontColor:"",headingFontColor:""},isLocalImageEditorActive:!1,authorization:{submitAutoRequest:!1}};t.promptModalSlice=(0,c.createSlice)({name:"promptModal",initialState:h,reducers:{showModal:function(e){e.display=!0},hideModal:function(e){e.aiMode="text",e.display=!1,e.upgradeModal=!1,e.upgradeTip=!1,e.history.length=0,e.current=0,e.controlLabel="",e.selectedOption=f.TextOption.WRITE_WITH_AI,e.skipAutoAction=!1,e.imagesHistory={},e.imageQuery={prompt:"",width:f.DefaultImageReferenceSize.width,height:f.DefaultImageReferenceSize.height},e.imageReference={url:"",base64:"",influence:30},e.promptHistories={},e.moduleQuery={site_name:"",site_description:"",module_name:"",module_fields:{},page_content:"",tone:""},e.textQuery={content:"",module_name:""},e.codeQuery={content:""},e.contextHTMLReceived=!0,e.isLocalImageEditorActive=!1,e.layoutGenerationStage="",e.isLayoutGenerationInProgress=!1,e.layoutsImagesUpscaleCount=0,e.layoutsImagesCount=0},updateCurrent:function(e,t){e.current=t.payload},setImageETA:function(e,t){e.imageETA=t.payload},updateLoading:function(e,t){e.isLoading=t.payload},updateHistory:function(e,t){e.current=e.history.length,e.history.push(t.payload)},updateHistoryAtIndex:function(e,t){var r=t.payload,n=r.index,o=r.value,i=r.merge;e.history[n]=i?l(l({},e.history[n]),o):o},updateImagesHistory:function(e,t){e.imagesHistory=l(l({},e.imagesHistory),t.payload)},updateDownloadedImages:function(e,t){e.downloadedImages=[].concat(o(e.downloadedImages),o(t.payload))},updateSelectedOption:function(e,t){e.selectedOption=t.payload},updateModuleQuery:function(e,t){e.moduleQuery=t.payload},updateTextQuery:function(e,t){e.textQuery=t.payload},updateImageQuery:function(e,t){e.imageQuery=t.payload},setSelectedPrompt:function(e,t){e.imagePrompt=t.payload},setPromptHistories:function(e,t){e.promptHistories=t.payload},setBackButtonVisibility:function(e,t){e.isBackButtonVisible=t.payload},initUserPromptModal:function(e,t){var r=t.payload;for(var n in e.selectedOption=r.selectedOption,e.controlLabel=r.controlLabel,e.prefilledContentType=r.prefilledContentType,e.aiMode=r.aiMode||"text",e.isBackButtonVisible=!1,e.layoutDefaultSettings.primaryColor=window.et_ai_data.primary_color,e.layoutDefaultSettings.secondaryColor=window.et_ai_data.secondary_color,e.layoutDefaultSettings.bodyFontColor=window.et_ai_data.body_font_color,e.layoutDefaultSettings.headingFontColor=window.et_ai_data.heading_font_color,r.errorObject&&(e.errorObject=r.errorObject),r.context){var o=r.context[n].replaceAll(/\n|\t/g,"");r.context[n]=(0,d.removeLoremIpsum)(o)}e.context=r.context;var i=r.content;r.content&&(i="text"===r.aiMode&&(0,d.isLoremIpsum)(i)?"":i,[f.TextOption.IMPROVE_WITH_AI,f.CodeOption.IMPROVE_CODE_WITH_AI].includes(r.selectedOption)&&(e.history[0]=i));var a=r.additionalInfo.fields.map((function(e){return(0,p.isArray)(e)?e.map((function(e){return(0,d.getFieldCleanValue)(e)})):(0,d.getFieldCleanValue)(e)}));e.textQuery={content:i,module_name:r.additionalInfo.module,field_name:r.controlLabel,content_type:r.prefilledContentType,page_content:r.context.page,site_name:window.et_ai_data.site_name,site_description:window.et_ai_data.site_description},e.codeQuery={content:i},e.additionalInfo=l(l({},r.additionalInfo),{},{fields:a}),r.code&&(e.code=r.code),e.contextHTMLReceived=r.contextHTMLReceived},showError:function(e,t){var r=!1!==t.payload.show;e.errorObject=l(l({},t.payload),{},{show:r})},showUpgradeModal:function(e,t){!t.payload&&(e.skipAutoAction=!0),e.upgradeModal=t.payload},showUpgradeTip:function(e,t){e.upgradeTip=t.payload},setImageReference:function(e,t){e.imageReference=t.payload},setCodeEditorInsertMode:function(e,t){e.code&&(e.code.insertMode=t.payload)},setContextHTMLReceived:function(e,t){e.contextHTMLReceived=t.payload},setContextModule:function(e,t){e.context.module=t.payload},setModalDisplay:function(e,t){e.display=t.payload},setImageEditor:function(e,t){e.isImageEditorActive=t.payload},setLastCodeRequestType:function(e,t){e.lastCodeRequestType=t.payload},setLayoutGenerationStage:function(e,t){e.layoutGenerationStage=t.payload},setLayoutsImagesCount:function(e,t){e.layoutsImagesCount=t.payload},setLayoutsImagesUpscaleCount:function(e,t){e.layoutsImagesUpscaleCount=t.payload},setIsLayoutGenerationInProgress:function(e,t){e.isLayoutGenerationInProgress=t.payload},setLayoutModalTempData:function(e,t){e.layoutModalTempData=t.payload},openLayoutDefaultSettings:function(e){e.isLayoutDefaultSettingsOpen=!0},closeLayoutDefaultSettings:function(e){e.isLayoutDefaultSettingsOpen=!1},setIsLocalImageEditorActive:function(e,t){e.isLocalImageEditorActive=t.payload},setSkipAutoAction:function(e,t){e.skipAutoAction=t.payload},toggleSubmitAutoRequest:function(e,t){e.authorization.submitAutoRequest=t.payload},setDefaultPrimaryColor:function(e,t){e.layoutDefaultSettings.primaryColor=t.payload},setDefaultSecondaryColor:function(e,t){e.layoutDefaultSettings.secondaryColor=t.payload},setDefaultBodyFontColor:function(e,t){e.layoutDefaultSettings.bodyFontColor=t.payload},setDefaultHeadingFontColor:function(e,t){e.layoutDefaultSettings.headingFontColor=t.payload}}}),s=t.promptModalSlice.actions,t.hideModal=s.hideModal,t.initUserPromptModal=s.initUserPromptModal,t.setImageReference=s.setImageReference,t.setPromptHistories=s.setPromptHistories,t.setSelectedPrompt=s.setSelectedPrompt,t.showError=s.showError,t.showModal=s.showModal,t.showUpgradeModal=s.showUpgradeModal,t.showUpgradeTip=s.showUpgradeTip,t.updateCurrent=s.updateCurrent,t.updateDownloadedImages=s.updateDownloadedImages,t.updateHistory=s.updateHistory,t.updateHistoryAtIndex=s.updateHistoryAtIndex,t.updateImageQuery=s.updateImageQuery,t.updateImagesHistory=s.updateImagesHistory,t.updateLoading=s.updateLoading,t.updateModuleQuery=s.updateModuleQuery,t.updateSelectedOption=s.updateSelectedOption,t.updateTextQuery=s.updateTextQuery,t.setImageETA=s.setImageETA,t.setCodeEditorInsertMode=s.setCodeEditorInsertMode,t.setBackButtonVisibility=s.setBackButtonVisibility,t.setContextHTMLReceived=s.setContextHTMLReceived,t.setContextModule=s.setContextModule,t.setModalDisplay=s.setModalDisplay,t.setLastCodeRequestType=s.setLastCodeRequestType,t.setLayoutGenerationStage=s.setLayoutGenerationStage,t.setLayoutsImagesCount=s.setLayoutsImagesCount,t.setLayoutModalTempData=s.setLayoutModalTempData,t.openLayoutDefaultSettings=s.openLayoutDefaultSettings,t.closeLayoutDefaultSettings=s.closeLayoutDefaultSettings,t.setImageEditor=s.setImageEditor,t.setIsLocalImageEditorActive=s.setIsLocalImageEditorActive,t.setSkipAutoAction=s.setSkipAutoAction,t.toggleSubmitAutoRequest=s.toggleSubmitAutoRequest,t.setDefaultPrimaryColor=s.setDefaultPrimaryColor,t.setDefaultSecondaryColor=s.setDefaultSecondaryColor,t.setDefaultBodyFontColor=s.setDefaultBodyFontColor,t.setDefaultHeadingFontColor=s.setDefaultHeadingFontColor,t.setLayoutsImagesUpscaleCount=s.setLayoutsImagesUpscaleCount,t.setIsLayoutGenerationInProgress=s.setIsLayoutGenerationInProgress,t.promptModalListenerMiddleware=(0,c.createListenerMiddleware)(),t.promptModalListenerMiddleware.startListening({matcher:(0,c.isAnyOf)(t.showModal,t.initUserPromptModal),effect:function(){window.dispatchEvent(new CustomEvent("ai_prompt_show_modal"))}}),t.promptModalListenerMiddleware.startListening({matcher:(0,c.isAnyOf)(t.hideModal),effect:function(){window.dispatchEvent(new CustomEvent("ai_prompt_hide_modal"))}}),t.default=t.promptModalSlice.reducer},39590:function(e,t,r){"use strict";var n;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),l=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return l(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.store=t.setupStore=void 0;var c=r(24268),f=s(r(50013)),d=s(r(74968)),p=s(r(29548)),h=s(r(91021)),m=u(r(98136)),v=s(r(69275)),g=(0,c.combineReducers)((i(n={},f.default.reducerPath,f.default.reducer),i(n,d.default.reducerPath,d.default.reducer),i(n,"promptModal",m.default),i(n,"diviAIOptions",p.default),i(n,"diviAIImageEditor",h.default),n));t.setupStore=function(e){return(0,c.configureStore)({reducer:g,middleware:function(e){return e().concat(f.default.middleware,d.default.middleware,m.promptModalListenerMiddleware.middleware,v.default.middleware)},preloadedState:e})},t.store=(0,t.setupStore)()},63572:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(85893),a=r(61533),l=r(36113),u=o(r(65311)),s=r(96486),c=r(39590),f=r(98136),d=o(r(80483)),p=r(29548),h=r(91021),m=r(89861),v=r(8035),g=r(88712);(0,u.default)(window).on("et_ai_container_ready",(function(e,t,r){var o,y,b,w,_=window.parent?window.parent.document.querySelector("body"):document.querySelector("body"),x="#".concat(r);if(null!==(o=""!==(null==t?void 0:t.type))&&void 0!==o&&o){if(t.imageReference&&t.imageReference.url){var S=t.imageReference;c.store.dispatch((0,f.setImageReference)(S))}if(t.imageReferenceSizes){var k={prompt:"",width:(0,g.getDivisibleByEight)(null==t?void 0:t.imageReferenceSizes.sizes.full.width)||v.DefaultImageReferenceSize.width,height:(0,g.getDivisibleByEight)(null==t?void 0:t.imageReferenceSizes.sizes.full.height)||v.DefaultImageReferenceSize.height,scale:(null==t?void 0:t.imageReferenceSizes.sizes.full.scale)||v.DefaultImageReferenceSize.scale};c.store.dispatch((0,f.updateImageQuery)(k))}}if(_){var O=(0,m.getValidPrefilledContentType)(null!==(y=null==t?void 0:t.prefilledContentType)&&void 0!==y?y:"");c.store.dispatch((0,f.initUserPromptModal)({controlLabel:null==t?void 0:t.label,selectedOption:null==t?void 0:t.type,content:null!==(b=null==t?void 0:t.content)&&void 0!==b?b:null,context:null==t?void 0:t.contextData,additionalInfo:null==t?void 0:t.additionalInfo,aiMode:null==t?void 0:t.aiMode,errorObject:null==t?void 0:t.errorObject,prefilledContentType:O,code:null==t?void 0:t.code,contextHTMLReceived:null===(w=null==t?void 0:t.contextHTMLReceived)||void 0===w||w}));var E="object"===n(t.type)&&Array.isArray(t.type.tag)?t.type.tag[1]:"";if(["modify","extend","upscale","enhance"].includes(E)){var C,j=(0,s.upperFirst)(E);if(c.store.dispatch((0,h.setEditorMode)(j)),c.store.dispatch((0,f.setImageEditor)(!0)),c.store.dispatch((0,f.setIsLocalImageEditorActive)(!0)),null!=t&&null!==(C=t.imageReference)&&void 0!==C&&C.url){var P,L,M=t.imageReference.url,A=(null===(P=t.imageReferenceSizes)||void 0===P||null===(L=P.sizes)||void 0===L?void 0:L.full)||{width:512,height:512,scale:1},T=A.width,I=void 0===T?512:T,R=A.height,N=void 0===R?512:R,D=A.scale,z=void 0===D?1:D;c.store.dispatch((0,h.setEditorImageURL)(M)),c.store.dispatch((0,h.setEditorImage)({url:M,width:I,height:N,scale:z}))}}_.querySelector(x)?c.store.dispatch((0,f.showModal)()):(t.etAccount&&c.store.dispatch((0,p.setETAccount)(t.etAccount)),(0,u.default)(_).append('<div id="'.concat(r,'"></div>')),(0,u.default)(x).css({width:"auto",height:"auto"}),(0,a.render)((0,i.jsx)(l.Provider,{store:c.store,children:(0,i.jsx)(d.default,{})}),_.querySelector(x)))}}))},36789:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i),l=r(58618),u=r.n(l),s=r(22211),c=r.n(s);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===f(i)?i:String(i)),n)}var o,i}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m(e);if(t){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,r,n,i=h(l);function l(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.apply(this,arguments)}return t=l,(r=[{key:"_renderGraphics",value:function(){var e,t=null!==(e=this.props.svgId)&&void 0!==e?e:"";switch(this.props.icon){case"delete":return o().createElement("g",null,o().createElement("path",{d:"M19 9h-3V8a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v1H9a1 1 0 1 0 0 2h10a1 1 0 0 0 .004-2H19zM9 20c.021.543.457.979 1 1h8c.55-.004.996-.45 1-1v-7H9v7zm2.02-4.985h2v4h-2v-4zm4 0h2v4h-2v-4z",fillRule:"evenodd"}));case"close":return o().createElement("g",null,o().createElement("path",{d:"M15.59 14l4.08-4.082a1.124 1.124 0 0 0-1.587-1.588L14 12.411 9.918 8.329A1.124 1.124 0 0 0 8.33 9.92L12.411 14l-4.082 4.082a1.124 1.124 0 0 0 1.59 1.589L14 15.589l4.082 4.082a1.124 1.124 0 0 0 1.589-1.59L15.589 14h.001z",fillRule:"evenodd"}));case"exit":return o().createElement("g",null,o().createElement("path",{d:"M19.71 16.857l-2.85-2.854 2.85-2.854c.39-.395.39-1.03 0-1.426l-1.43-1.427a1 1 0 0 0-1.42 0L14 11.15l-2.85-2.854a1.013 1.013 0 0 0-1.43 0L8.3 9.723a1 1 0 0 0 0 1.426l2.85 2.854-2.85 2.853a1 1 0 0 0 0 1.427l1.42 1.427a1.011 1.011 0 0 0 1.43 0L14 16.856l2.86 2.854a1 1 0 0 0 1.42 0l1.43-1.427c.39-.395.39-1.03 0-1.426z",fillRule:"evenodd"}));case"check":return o().createElement("g",null,o().createElement("path",{d:"M19.203 9.21a.677.677 0 0 0-.98 0l-5.71 5.9-2.85-2.95a.675.675 0 0 0-.98 0l-1.48 1.523a.737.737 0 0 0 0 1.015l4.82 4.979a.677.677 0 0 0 .98 0l7.68-7.927a.737.737 0 0 0 0-1.015l-1.48-1.525z",fillRule:"evenodd"}));case"three-dots":return o().createElement("g",null,o().createElement("path",{d:"M2.001 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"}));case"tag":return o().createElement("g",null,o().createElement("path",{d:"M14.83,5h6.6A1.57,1.57,0,0,1,23,6.57v6.59a1.45,1.45,0,0,1-.35.66l-8.83,8.83a1.2,1.2,0,0,1-1.69,0L5.35,15.87a1.2,1.2,0,0,1,0-1.7l8.82-8.82A2,2,0,0,1,14.83,5Zm4.67,5A1.5,1.5,0,1,0,18,8.5,1.5,1.5,0,0,0,19.5,10Z"}));case"pack":return o().createElement("g",null,o().createElement("rect",{x:"6",y:"12",width:"16",height:"10",rx:"1",ry:"1"}),o().createElement("path",{d:"M21 6a1 1 0 0 1 1 1v3H6V9a1 1 0 0 1 1-1h5.66C13.31 7.13 14 6 15 6z"}));case"list":return o().createElement("g",null,o().createElement("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"6",y:"12",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"6",y:"18",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"6",width:"10",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"12",width:"10",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"18",width:"10",height:"4",rx:"1",ry:"1"}));case"grid":return o().createElement("g",null,o().createElement("rect",{x:"6",y:"6",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"6",y:"12",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"6",y:"18",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"18",y:"6",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"18",y:"12",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"18",y:"18",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"6",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"12",width:"4",height:"4",rx:"1",ry:"1"}),o().createElement("rect",{x:"12",y:"18",width:"4",height:"4",rx:"1",ry:"1"}));case"back":return o().createElement("g",null,o().createElement("path",{d:"M14.988 10.963h-3v-2.52a.393.393 0 0 0-.63-.361l-5.2 4.5a.491.491 0 0 0 0 .72l5.2 4.5a.393.393 0 0 0 .63-.36v-2.52h2.99a2.992 2.992 0 0 1 2.99 2.972v1.287a.7.7 0 0 0 .7.694h2.59a.7.7 0 0 0 .7-.694v-1.3a6.948 6.948 0 0 0-6.97-6.918z",fillRule:"evenodd"}));case"placeholder":return o().createElement("g",null,o().createElement("path",{d:"M1 24h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM25 0h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zM1 12h30a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zm12 12h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H13a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1zM1 0h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1z",fill:"#e7eef5"}));case"cloud":return o().createElement("g",null,o().createElement("path",{d:"M5.48,23a5.5,5.5,0,0,1-.26-11A9,9,0,0,1,23,14h.5a4.5,4.5,0,0,1,0,9Z"}));case"menu-expand":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M14 20l-3-5h6zM14 8l3 5h-6z",fillRule:"evenodd"}));case"arrow-down-dense":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M3.44987 3.77347L5.90448 0.672666C6.00166 0.555503 6.0272 0.385363 5.96951 0.239402C5.91182 0.0934417 5.78188 -0.000569066 5.63861 2.59252e-06H0.359701C0.217594 0.000439083 0.0889622 0.0937073 0.0311752 0.238209C-0.0266118 0.382711 -0.00278329 0.551512 0.092034 0.669326L2.54904 3.77347C2.66298 3.91748 2.82706 4 2.99946 4C3.17186 4 3.33593 3.91748 3.44987 3.77347Z"}));case"caret-solid-right":return o().createElement("g",null,o().createElement("path",{d:"M6.65873 4.25043L2.00753 0.160427C1.83179 -0.00150394 1.57658 -0.0440559 1.35764 0.0520706C1.1387 0.148197 0.997682 0.364711 0.998539 0.603427L0.998539 9.39943C0.999194 9.63621 1.1391 9.85055 1.35585 9.94683C1.5726 10.0431 1.8258 10.0034 2.00252 9.84543L6.65873 5.75143C6.87475 5.56158 6.99854 5.28819 6.99854 5.00093C6.99854 4.71366 6.87475 4.44027 6.65873 4.25043Z"}));case"heart":return o().createElement("g",null,o().createElement("path",{d:"M4,10.66A5.67,5.67,0,0,1,9.51,5Q12.92,5,14,7.37C14.72,5.79,16.21,5,18.49,5A5.67,5.67,0,0,1,24,10.65C24,14,22.87,17.31,14,23,5.13,17.31,4,14,4,10.66Z"}));case"globe":return o().createElement("g",null,o().createElement("path",{d:"M14 4C8.477 4 4 8.477 4 14s4.477 10 10 10 10-4.477 10-10S19.523 4 14 4zm.01 18c-4.411 0-8-3.589-8-8 0-.783.118-1.539.329-2.255.258.507.628.965.995 1.38.958 1.083.883 1.267.883 1.267.577 1.658 3.275.854 3.627 2.076s1.328.859.906 2.437c-.438 1.636.683 2.553 1.491 3.083-.077.003-.153.012-.231.012zm6.406-3.228c-.025-.011-.047-.027-.072-.037-1.754-.721-2.514-2.467-3.884-2.467s-2.113.532-2.882.436-.723-.917-1.276-1.373c-.553-.457-.457-.312-1.49-.697-1.033-.385-.24-2.307.481-1.971.721.336 1.304-.324 1.52.229.216.553.695 1.298.647.577-.048-.721.189-1.431.79-1.984s.096-.649.216-1.538 2.211.505 2.211-.312.361-.721.961-1.394c.528-.591.368-.882-.217-1.465a8.04 8.04 0 0 1 3.317 2.914c-1.041.174-1.418.809-1.953 1.92-.951 1.975 1.465 3.142 2.808 3.96.08.049.157.08.234.118a7.963 7.963 0 0 1-1.411 3.084z"}));case"help":return o().createElement("g",null,o().createElement("path",{d:"M14 22a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm0-3.6a.8.8 0 1 0 0-1.6.8.8 0 0 0 0 1.6zm-.8-3.2a.744.744 0 0 0 .8.8.744.744 0 0 0 .8-.8c.08-.343.305-.634.616-.8a2.976 2.976 0 0 0 1.784-2.8A2.944 2.944 0 0 0 14 8.8a3.112 3.112 0 0 0-3.2 2.4c-.096.48.264.8.8.8s.704-.32.8-.8c0-.04.216-.8 1.6-.8 1.24 0 1.6.8 1.6 1.2 0 .816-.536 1.088-1.128 1.456A2.536 2.536 0 0 0 13.2 15.2z"}));case"layout-placeholder":return o().createElement("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd"},o().createElement("path",{d:"M102,188 C107.522847,188 112,192.477153 112,198 L112,234 C112,239.522847 107.522847,244 102,244 L50,244 C44.4771525,244 40,239.522847 40,234 L40,198 C40,192.477153 44.4771525,188 50,188 L102,188 Z M350,188 C355.522847,188 360,192.477153 360,198 L360,234 C360,239.522847 355.522847,244 350,244 L140,244 C134.477153,244 130,239.522847 130,234 L130,198 C130,192.477153 134.477153,188 140,188 L350,188 Z M350,114 C355.522847,114 360,118.477153 360,124 L360,160 C360,165.522847 355.522847,170 350,170 L50,170 C44.4771525,170 40,165.522847 40,160 L40,124 C40,118.477153 44.4771525,114 50,114 L350,114 Z M211,40 C216.522847,40 221,44.4771525 221,50 L221,86 C221,91.5228475 216.522847,96 211,96 L50,96 C44.4771525,96 40,91.5228475 40,86 L40,50 C40,44.4771525 44.4771525,40 50,40 L211,40 Z M350,40 C355.522847,40 360,44.4771525 360,50 L360,86 C360,91.5228475 355.522847,96 350,96 L249,96 C243.477153,96 239,91.5228475 239,86 L239,50 C239,44.4771525 243.477153,40 249,40 L350,40 Z"}));case"background-image":return o().createElement("g",null,o().createElement("path",{d:"M309,78V206H91V78H309m8-16H83a8,8,0,0,0-8,8V214a8,8,0,0,0,8,8H317a8,8,0,0,0,8-8V70a8,8,0,0,0-8-8Z",fill:"#e7eef5"}),o().createElement("circle",{cx:"160",cy:"111",r:"12",fill:"#e7eef5"}),o().createElement("path",{d:"M105.37,190.83H295.63V151.08l-47.77-47.77a8,8,0,0,0-11.32,0l-65.2,65.2-15.75-15.74a8,8,0,0,0-11.24-.06Z",fill:"#e7eef5"}));case"folder-open":return o().createElement("g",null,o().createElement("path",{d:"M3.72076 6H17.6126L15.2792 13L1.38743 13L3.72076 6Z",fill:"#2B87DA",stroke:"#2B87DA",strokeWidth:"2"}),o().createElement("path",{d:"M7.00087 1.00001L7.00293 1C7.17604 0.999623 7.29258 1.04456 7.40366 1.12166C7.53485 1.21271 7.67711 1.36286 7.85596 1.60786L7.93916 1.72478L8.39713 2.40217L8.40492 2.4137L8.41303 2.425L8.52694 2.58378L8.82621 3.00095L9.33962 3.00087L15 3.00003V13H1V3.02273L1.00097 3.00138L1.0028 2.96112L1.00138 2.92084L1.00073 2.90238V1.02984L1.00233 1.0024L1.02999 1.00082L7.00087 1.00001Z",stroke:"#2B87DA",strokeWidth:"2"}));case"folder-close":return o().createElement("g",null,o().createElement("mask",{id:"path-1-inside-1_0_3891",fill:"white"},o().createElement("rect",{y:"2",width:"16",height:"12",rx:"1"})),o().createElement("rect",{y:"2",width:"16",height:"12",rx:"1",fill:"#737E89",stroke:"#737E89",strokeWidth:"4",mask:"url(#path-1-inside-1_0_3891)"}),o().createElement("path",{d:"M7.00184 0.500018C5.56659 0.503188 2.56668 0.501792 1.00092 0.500763C0.724748 0.500582 0.500739 0.724357 0.500739 1.0009V2.92021C0.500739 3.21507 0.746868 3.44071 1.03311 3.41833C2.56852 3.29832 5.46237 3.06926 7.76508 2.87025C8.32065 2.82224 8.84065 2.77608 9.29826 2.73369C9.0211 2.44434 8.80329 2.11638 8.61409 1.83149C8.60153 1.81259 8.58911 1.79387 8.5768 1.77537C8.04592 0.977625 7.68891 0.4985 7.00184 0.500018Z",fill:"#737E89",stroke:"#737E89"}));case"portability":return o().createElement("g",null,o().createElement("path",{d:"M9.6 20.8c0.2 0.3 0.7 0.3 0.9 0l2.1-3.5c0.2-0.3 0-0.8-0.4-0.8H11V8c0-0.6-0.4-1-1-1C9.4 7 9 7.4 9 8v8.5H7.9c-0.4 0-0.6 0.4-0.4 0.8L9.6 20.8z",fillRule:"evenodd"}),o().createElement("path",{d:"M18.4 7.2c-0.2-0.3-0.7-0.3-0.9 0l-2.1 3.5c-0.2 0.3 0 0.8 0.4 0.8H17V20c0 0.6 0.4 1 1 1 0.6 0 1-0.4 1-1v-8.5h1.1c0.4 0 0.6-0.4 0.4-0.8L18.4 7.2z",fillRule:"evenodd"}));case"right-arrow":return o().createElement("g",null,o().createElement("rect",{width:"2.5",height:"9",rx:"1.25",transform:"matrix(-0.707107 0.707107 0.707107 0.707107 6.5 0.135986)",fill:"#737E89"}),o().createElement("rect",{width:"2.5",height:"9",rx:"1.25",transform:"matrix(0.707107 0.707107 0.707107 -0.707107 4.73218 11.0962)",fill:"#737E89"}));case"left-arrow":return o().createElement("g",null,o().createElement("rect",{x:"6.5",y:"0.135986",width:"2.5",height:"9",rx:"1.25",transform:"rotate(45 6.5 0.135986)",fill:"#737E89"}),o().createElement("rect",{x:"8.26782",y:"11.0962",width:"2.5",height:"9",rx:"1.25",transform:"rotate(135 8.26782 11.0962)",fill:"#737E89"}));case"magnifying-glass":return o().createElement("g",null,o().createElement("rect",{width:"28",height:"28",rx:"14",fill:"white"}),o().createElement("circle",{cx:"14",cy:"14",r:"5",stroke:"#32373C",strokeWidth:"2",fill:"white"}),o().createElement("rect",{x:"10.1992",y:"16.3867",width:"2",height:"3.66819",rx:"1",transform:"rotate(45 10.1992 16.3867)"}),o().createElement("rect",{x:"17",y:"13",width:"2",height:"6",rx:"1",transform:"rotate(90 17 13)"}),o().createElement("rect",{x:"15",y:"17",width:"2",height:"6",rx:"1",transform:"rotate(-180 15 17)"}));case"divi-ai-light":return o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("linearGradient",{id:"divi-ai-light-linear-gradient",x1:"10.77",y1:"10.73",x2:"17.1",y2:"18.31",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{offset:"0",stopColor:"aqua"}),o().createElement("stop",{offset:"1",stopColor:"#5200ff"}))),o().createElement("g",null,o().createElement("path",{className:"cls-2",d:"M5,11c0-2.83,0-4.24,.88-5.12,.88-.88,2.29-.88,5.12-.88h6c2.83,0,4.24,0,5.12,.88,.88,.88,.88,2.29,.88,5.12v6c0,2.83,0,4.24-.88,5.12s-2.29,.88-5.12,.88h-6c-2.83,0-4.24,0-5.12-.88-.88-.88-.88-2.29-.88-5.12v-6Z"})),o().createElement("g",null,o().createElement("path",{className:"cls-1",d:"M16,11c0-.55,.45-1,1-1s1,.45,1,1v6c0,.55-.45,1-1,1s-1-.45-1-1v-6Zm-1.05,5.68l-2-6c-.14-.41-.52-.68-.95-.68s-.81,.28-.95,.68l-2,6c-.17,.52,.11,1.09,.63,1.26,.52,.17,1.09-.11,1.26-.63l.44-1.32h1.23l.44,1.32c.17,.52,.74,.81,1.26,.63,.52-.17,.81-.74,.63-1.26Z"})));case"divi-ai":return o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("linearGradient",{id:"divi-ai-linear-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%"},o().createElement("stop",{offset:"0%",stopColor:"aqua"}),o().createElement("stop",{offset:"100%",stopColor:"#5200ff"}))),o().createElement("g",null,o().createElement("path",{d:"M22.12,5.88c-.88-.88-2.29-.88-5.12-.88h-6c-2.83,0-4.24,0-5.12,.88-.88,.88-.88,2.29-.88,5.12v6c0,2.83,0,4.24,.88,5.12s2.29,.88,5.12,.88h6c2.83,0,4.24,0,5.12-.88,.88-.88,.88-2.29,.88-5.12v-6c0-2.83,0-4.24-.88-5.12Zm-7.8,12.07c-.52,.17-1.09-.11-1.26-.63l-.44-1.32h-1.23l-.44,1.32c-.17,.52-.74,.81-1.26,.63-.52-.17-.81-.74-.63-1.26l2-6c.14-.41,.52-.68,.95-.68s.81,.28,.95,.68l2,6c.17,.52-.11,1.09-.63,1.26Zm3.68-.95c0,.55-.45,1-1,1s-1-.45-1-1v-6c0-.55,.45-1,1-1s1,.45,1,1v6Z"})));case"divi-ai-code":return o().createElement(o().Fragment,null,o().createElement("rect",{x:"5",y:"5",width:"18",height:"18",rx:"3",fill:"white"}),o().createElement("path",{d:"M16 11C16 10.4477 16.4477 10 17 10C17.5523 10 18 10.4477 18 11V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V11Z",fill:"url(#paint0_linear_654_6159_".concat(t,")")}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 10C12.4305 10 12.8126 10.2754 12.9487 10.6838L14.9487 16.6838C15.1234 17.2077 14.8402 17.774 14.3163 17.9487C13.7923 18.1233 13.226 17.8402 13.0513 17.3162L12 14.1623L10.9487 17.3162C10.7741 17.8402 10.2077 18.1233 9.6838 17.9487C9.15986 17.774 8.8767 17.2077 9.05134 16.6838L11.0513 10.6838C11.1875 10.2754 11.5696 10 12 10Z",fill:"url(#paint1_linear_654_6159_".concat(t,")")}),o().createElement("path",{d:"M11 14H13V16H11V14Z",fill:"url(#paint2_linear_654_6159_".concat(t,")")}),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear_654_6159_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#4C5563"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"})),o().createElement("linearGradient",{id:"paint1_linear_654_6159_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#4C5563"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"})),o().createElement("linearGradient",{id:"paint2_linear_654_6159_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#4C5563"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"}))));case"divi-ai-code-hover":return o().createElement(o().Fragment,null,o().createElement("rect",{width:"28",height:"28",rx:"3",fill:"white",fillOpacity:"0.16"}),o().createElement("rect",{x:"5",y:"5",width:"18",height:"18",rx:"3",fill:"white"}),o().createElement("path",{d:"M16 11C16 10.4477 16.4477 10 17 10C17.5523 10 18 10.4477 18 11V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V11Z",fill:"url(#paint0_linear_655_5811_".concat(t,")")}),o().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 10C12.4305 10 12.8126 10.2754 12.9487 10.6838L14.9487 16.6838C15.1234 17.2077 14.8402 17.774 14.3163 17.9487C13.7923 18.1233 13.226 17.8402 13.0513 17.3162L12 14.1623L10.9487 17.3162C10.7741 17.8402 10.2077 18.1233 9.6838 17.9487C9.15986 17.774 8.8767 17.2077 9.05134 16.6838L11.0513 10.6838C11.1875 10.2754 11.5696 10 12 10Z",fill:"url(#paint1_linear_655_5811_".concat(t,")")}),o().createElement("path",{d:"M11 14H13V16H11V14Z",fill:"url(#paint2_linear_655_5811_".concat(t,")")}),o().createElement("defs",null,o().createElement("linearGradient",{id:"paint0_linear_655_5811_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#00FFFF"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"})),o().createElement("linearGradient",{id:"paint1_linear_655_5811_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#00FFFF"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"})),o().createElement("linearGradient",{id:"paint2_linear_655_5811_".concat(t),x1:"8.99976",y1:"10",x2:"16.9449",y2:"18.9382",gradientUnits:"userSpaceOnUse"},o().createElement("stop",{stopColor:"#00FFFF"}),o().createElement("stop",{offset:"1",stopColor:"#5200FF"}))));case"save":return o().createElement("g",null,o().createElement("path",{d:"M18.95 9.051a1 1 0 1 0-1.414 1.414 5 5 0 1 1-7.07 0A1 1 0 0 0 9.05 9.051a7 7 0 1 0 9.9.001v-.001zm-5.378 8.235a.5.5 0 0 0 .857 0l2.117-3.528a.5.5 0 0 0-.429-.758H15V8a1 1 0 0 0-2 0v5h-1.117a.5.5 0 0 0-.428.758l2.117 3.528z",fillRule:"evenodd"}));case"setting":return o().createElement("g",null,o().createElement("path",{d:"M20.426 13.088l-1.383-.362a.874.874 0 0 1-.589-.514l-.043-.107a.871.871 0 0 1 .053-.779l.721-1.234a.766.766 0 0 0-.116-.917 6.682 6.682 0 0 0-.252-.253.768.768 0 0 0-.917-.116l-1.234.722a.877.877 0 0 1-.779.053l-.107-.044a.87.87 0 0 1-.513-.587l-.362-1.383a.767.767 0 0 0-.73-.567h-.358a.768.768 0 0 0-.73.567l-.362 1.383a.878.878 0 0 1-.513.589l-.107.044a.875.875 0 0 1-.778-.054l-1.234-.722a.769.769 0 0 0-.918.117c-.086.082-.17.166-.253.253a.766.766 0 0 0-.115.916l.721 1.234a.87.87 0 0 1 .053.779l-.043.106a.874.874 0 0 1-.589.514l-1.382.362a.766.766 0 0 0-.567.731v.357a.766.766 0 0 0 .567.731l1.383.362c.266.07.483.26.588.513l.043.107a.87.87 0 0 1-.053.779l-.721 1.233a.767.767 0 0 0 .115.917c.083.087.167.171.253.253a.77.77 0 0 0 .918.116l1.234-.721a.87.87 0 0 1 .779-.054l.107.044a.878.878 0 0 1 .513.589l.362 1.383a.77.77 0 0 0 .731.567h.356a.766.766 0 0 0 .73-.567l.362-1.383a.878.878 0 0 1 .515-.589l.107-.044a.875.875 0 0 1 .778.054l1.234.721c.297.17.672.123.917-.117.087-.082.171-.166.253-.253a.766.766 0 0 0 .116-.917l-.721-1.234a.874.874 0 0 1-.054-.779l.044-.107a.88.88 0 0 1 .589-.513l1.383-.362a.77.77 0 0 0 .567-.731v-.357a.772.772 0 0 0-.569-.724v-.005zm-6.43 3.9a2.986 2.986 0 1 1 2.985-2.986 3 3 0 0 1-2.985 2.987v-.001z",fillRule:"evenodd"}));case"modify":return o().createElement(o().Fragment,null,o().createElement("path",{style:{opacity:.5},d:"M7,10c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2C7.9,12,7,11.1,7,10z M16,12l-4.1,6.8L10,16l-4,6h16 L16,12z"}),o().createElement("path",{d:"M25,0.5c0.7-0.7,1.8-0.7,2.5,0c0.7,0.7,0.7,1.8,0,2.5l-1.2,1.3l-2.5-2.5L25,0.5z M21.9,3.6l2.4,2.4l-5.7,5.7 L16,12l0.2-2.6L21.9,3.6z M26,24V11.6c0-0.6-0.4-1-1-1s-1,0.4-1,1V24H4V4h12.4c0.6,0,1-0.4,1-1s-0.4-1-1-1H4C2.9,2,2,2.9,2,4v20 c0,1.1,0.9,2,2,2h20C25.1,26,26,25.1,26,24z"}));case"extend":return o().createElement(o().Fragment,null,o().createElement("path",{style:{opacity:.5},d:"M26,0H2C0.9,0,0,0.9,0,2v24c0,1.1,0.9,2,2,2h24c1.1,0,2-0.9,2-2V2C28,0.9,27.1,0,26,0z M2,2L2,2h3.3L2,5.3V2z M2,6.7L2,6.7L6.7,2h3.6L2,10.3V6.7z M26,26h-3.3l3.3-3.3V26z M26,21.3L21.3,26h-3.6l8.3-8.3V21.3z M26,6.3l-4,4v1.4l4-4v3.6l-4,4 v1.4l4-4v3.6l-4,4V21c0,0.6-0.4,1-1,1h-0.7l-4,4h-3.6l4-4h-1.4l-4,4H7.7l4-4h-1.4l-4,4H2.7l4-4c-0.4-0.1-0.6-0.4-0.7-0.7l-4,4v-3.6 l0,0l4-4v-1.4l-4,4v-3.6l0,0l4-4v-1.4l-4,4v-3.6l0,0l4-4V7c0-0.6,0.4-1,1-1h0.7l4-4h3.6l-4,4h1.4l4-4h3.6l-4,4h1.4l4-4h3.6l-4,4 c0.4,0.1,0.6,0.4,0.7,0.7l4-4V6.3z"}),o().createElement("path",{d:"M10.5,9c0.8,0,1.5,0.7,1.5,1.5S11.3,12,10.5,12S9,11.3,9,10.5S9.7,9,10.5,9z M20,19l-4.5-7l-3.1,4.8L11,15l-3,4 H20z M21,5H7C5.9,5,5,5.9,5,7v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7C23,5.9,22.1,5,21,5z M21,21H7V7l0,0h14V21z"}));case"upscale":return o().createElement(o().Fragment,null,o().createElement("path",{style:{opacity:.5},d:"M24,26H4c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2h12.4c0.6,0,1,0.4,1,1s-0.4,1-1,1H4v20h20V11.6c0-0.6,0.4-1,1-1s1,0.4,1,1V24 C26,25.1,25.1,26,24,26z"}),o().createElement("path",{d:"M25.7,2.3C25.5,2.1,25.3,2,25,2h-4c-0.6,0-1,0.4-1,1s0.4,1,1,1h1.6l-4.1,4.1C18.3,8,18.2,8,18,8H4c-1.1,0-2,0.9-2,2v14 c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V10c0-0.2,0-0.3-0.1-0.5L24,5.4V7c0,0.6,0.4,1,1,1s1-0.4,1-1V3C26,2.7,25.9,2.5,25.7,2.3z M18,24H4V10l0,0h14V24z M7.5,12C8.3,12,9,12.7,9,13.5S8.3,15,7.5,15S6,14.3,6,13.5S6.7,12,7.5,12z M11,22h6l-4.5-7l-3.1,4.8L8,18 l-3,4h3H11z"}));case"enhance":return o().createElement(o().Fragment,null,o().createElement("path",{style:{opacity:.5},d:"M7,10c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2C7.9,12,7,11.1,7,10z M16,12l-4.1,6.8L10,16l-4,6h16 L16,12z"}),o().createElement("path",{d:"M24,26H4c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2h8.3c0.6,0,1,0.4,1,1s-0.4,1-1,1H4v20h20v-8.1c0-0.6,0.4-1,1-1 s1,0.4,1,1V24C26,25.1,25.1,26,24,26z M15.6,5.6L13,6.5l2.6,0.9l0.9,2.6l0.9-2.6L20,6.5l-2.6-0.9L16.5,3L15.6,5.6z M22.6,3.6L20,4.5 l2.6,0.9L23.5,8l0.9-2.6L27,4.5l-2.6-0.9L23.5,1L22.6,3.6z M20.6,10.6L18,11.5l2.6,0.9l0.9,2.6l0.9-2.6l2.6-0.9l-2.6-0.9L21.5,8 L20.6,10.6z"}));case"undo":return o().createElement("g",null,o().createElement("path",{d:"M14.355 7.253c-1.74.026-3.321.559-4.576 1.528L7.999 7A1 1 0 0 0 7 8v4.998c0 .552.447.999.999.999h4.995a1 1 0 0 0 .999-.999l-2.014-2.016a4.51 4.51 0 0 1 2.44-.733c2.235-.032 4.261 1.58 4.534 3.799.338 2.751-1.789 5.009-4.46 5.009-1.149 0-2.186-.462-2.978-1.182a.654.654 0 0 0-.902.026l-1.184 1.175a.674.674 0 0 0 .032.979A7.443 7.443 0 0 0 14.493 22c4.401 0 7.915-3.8 7.452-8.297-.395-3.826-3.745-6.507-7.59-6.45z",fillRule:"evenodd"}));case"redo":return o().createElement("g",null,o().createElement("path",{d:"M13.645 6.253C15.385 6.279 16.966 6.812 18.221 7.781L20.001 6C20.5529 6.00055 21 6.44811 21 7V11.998C21 12.55 20.553 12.997 20.001 12.997H15.006C14.4545 12.9964 14.0076 12.5495 14.007 11.998L16.021 9.982C15.295 9.50824 14.4479 9.25375 13.581 9.249C11.346 9.217 9.32 10.829 9.047 13.048C8.709 15.799 10.836 18.057 13.507 18.057C14.656 18.057 15.693 17.595 16.485 16.875C16.7445 16.6416 17.1414 16.6531 17.387 16.901L18.571 18.076C18.7014 18.2076 18.7719 18.3872 18.7658 18.5724C18.7598 18.7576 18.6777 18.9322 18.539 19.055C17.1639 20.3098 15.3685 21.0037 13.507 21C9.106 21 5.592 17.2 6.055 12.703C6.45 8.877 9.8 6.196 13.645 6.253Z",fillRule:"evenodd"}));case"image-edit":return o().createElement("g",null,o().createElement("rect",{width:"28",height:"28",rx:"14",fill:"white"}),o().createElement("path",{d:"M17.1348 9.45117C17.6018 8.9841 18.3591 8.9841 18.8262 9.45117C19.2932 9.91824 19.2932 10.6755 18.8262 11.1426L14.3692 15.5996C14.1739 15.7948 13.8573 15.7948 13.6621 15.5996L12.6778 14.6153C12.4825 14.42 12.4825 14.1034 12.6778 13.9082L17.1348 9.45117Z"}),o().createElement("path",{d:"M10.5408 17.5892C10.4987 17.7696 10.6606 17.9315 10.8411 17.8895L12.8749 17.4152C13.0659 17.3707 13.1336 17.1336 12.9949 16.9949L11.4353 15.4354C11.2967 15.2967 11.0596 15.3644 11.0151 15.5554L10.5408 17.5892Z"}),o().createElement("rect",{x:"19",y:"19",width:"2",height:"10",rx:"1",transform:"rotate(90 19 19)"}))}}},{key:"render",value:function(){var e=this.props,t=e.className,r=e.color,n=e.icon,i=e.size,l=e.viewBox,s=e.margin,f=e.onClick,d=e.elementType;if(!n)return!1;var p={fill:r,width:2*i,minWidth:2*i,height:2*i,margin:c()(s)||!1===s?-(i-8):s},h="et-common-icon--".concat(n),m=a()({"et-common-icon":!0},h,t),v=this._renderGraphics();return v||(p={}),o().createElement(d,{className:m,style:u()(p,this.props.style),onClick:f,"data-testid":this.props["data-for"]},o().createElement("svg",{viewBox:l,preserveAspectRatio:"xMidYMid meet",shapeRendering:"geometricPrecision"},v))}}])&&d(t.prototype,r),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(n.PureComponent);v.defaultProps={color:"#4c5866",size:14,viewBox:"0 0 28 28",elementType:"div"};const g=v},33477:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(87363),o=r(25425),i=r(88712);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e){var t=c((0,n.useState)({}),2),r=t[0],a=t[1],l=(0,n.useRef)();(0,n.useEffect)((function(){return l.current=!0,(0,i.getDataOptionsByContext)(e.context).then((function(e){l.current&&a(e.refine)})),function(){l.current=!1}}),[]);var s=(0,n.useMemo)((function(){return"text"!==e.context?r:u(u({},r),(0,i.getAvailableLanguages)())}),[e.context,r]);return React.createElement(o.default,{button:e.button,value:e.value,options:s,onSelect:e.onSelect})}},6721:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(58618),c=r.n(s);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===f(i)?i:String(i)),n)}var o,i}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m(e);if(t){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(a,e);var t,r,n,i=h(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"_renderGraphics",value:function(){switch(this.props.icon){case"add":return o().createElement("g",null,o().createElement("path",{d:"M18 13h-3v-3a1 1 0 0 0-2 0v3h-3a1 1 0 0 0 0 2h3v3a1 1 0 0 0 2 0v-3h3a1 1 0 0 0 0-2z",fillRule:"evenodd"}));case"back":return o().createElement("g",null,o().createElement("path",{d:"M14.988 10.963h-3v-2.52a.393.393 0 0 0-.63-.361l-5.2 4.5a.491.491 0 0 0 0 .72l5.2 4.5a.393.393 0 0 0 .63-.36v-2.52h2.99a2.992 2.992 0 0 1 2.99 2.972v1.287a.7.7 0 0 0 .7.694h2.59a.7.7 0 0 0 .7-.694v-1.3a6.948 6.948 0 0 0-6.97-6.918z",fillRule:"evenodd"}));case"check":return o().createElement("g",null,o().createElement("path",{d:"M19.203 9.21a.677.677 0 0 0-.98 0l-5.71 5.9-2.85-2.95a.675.675 0 0 0-.98 0l-1.48 1.523a.737.737 0 0 0 0 1.015l4.82 4.979a.677.677 0 0 0 .98 0l7.68-7.927a.737.737 0 0 0 0-1.015l-1.48-1.525z",fillRule:"evenodd"}));case"close":case"close-small":case"multiply-by":return o().createElement("g",null,o().createElement("path",{d:"M15.59 14l4.08-4.082a1.124 1.124 0 0 0-1.587-1.588L14 12.411 9.918 8.329A1.124 1.124 0 0 0 8.33 9.92L12.411 14l-4.082 4.082a1.124 1.124 0 0 0 1.59 1.589L14 15.589l4.082 4.082a1.124 1.124 0 0 0 1.589-1.59L15.589 14h.001z",fillRule:"evenodd"}));case"column":return o().createElement("g",null,o().createElement("path",{d:"M20 8H8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9a1 1 0 0 0-1-.999V8zm-7 2h2v8h-2v-8zm-2 8H9v-8h2v8zm6-8h2v8h-2v-8z",fillRule:"evenodd"}));case"contract":return o().createElement("g",null,o().createElement("path",{d:"M20 19L20 9C20 8.5 19.5 8 19 8L9 8C8.5 8 8 8.5 8 9L8 19C8 19.5 8.5 20 9 20L19 20C19.5 20 20 19.5 20 19L20 19ZM18 18L10 18 10 10 18 10 18 18 18 18Z",fillRule:"evenodd"}),o().createElement("path",{d:"M11.5 13.5C11.8 13.5 12 13.3 12 13L12 12 13 12C13.3 12 13.5 11.8 13.5 11.5 13.5 11.2 13.3 11 13 11L11.5 11C11.2 11 11 11.2 11 11.5L11 13C11 13.3 11.2 13.5 11.5 13.5L11.5 13.5Z",fillRule:"evenodd"}),o().createElement("path",{d:"M16.5 11L15 11C14.7 11 14.5 11.2 14.5 11.5 14.5 11.8 14.7 12 15 12L16 12 16 13C16 13.3 16.2 13.5 16.5 13.5 16.8 13.5 17 13.3 17 13L17 11.5C17 11.2 16.8 11 16.5 11L16.5 11Z",fillRule:"evenodd"}),o().createElement("path",{d:"M13 16L12 16 12 15C12 14.7 11.8 14.5 11.5 14.5 11.2 14.5 11 14.7 11 15L11 16.5C11 16.8 11.2 17 11.5 17L13 17C13.3 17 13.5 16.8 13.5 16.5 13.5 16.2 13.3 16 13 16L13 16Z",fillRule:"evenodd"}),o().createElement("path",{d:"M16.5 14.5C16.2 14.5 16 14.7 16 15L16 16 15 16C14.7 16 14.5 16.2 14.5 16.5 14.5 16.8 14.7 17 15 17L16.5 17C16.8 17 17 16.8 17 16.5L17 15C17 14.7 16.8 14.5 16.5 14.5L16.5 14.5Z",fillRule:"evenodd"}));case"copy":return o().createElement("g",null,o().createElement("path",{d:"M16.919 15.391c.05-.124.074-.257.072-.39v-6a1.02 1.02 0 0 0-.072-.389.969.969 0 0 0-.893-.612H7.969a.97.97 0 0 0-.893.611c-.05.124-.076.256-.076.39v6c0 .134.026.266.076.39.146.365.5.604.893.605h8.057a.968.968 0 0 0 .893-.605zm3.074-3.413a1 1 0 0 0-1 1v5.011h-7.008a1 1 0 1 0 0 2h8a1 1 0 0 0 1-1v-6.013a1 1 0 0 0-.992-.998zm-5.016 2.013H8.991v-3.988h5.986v3.993-.005z",fillRule:"evenodd"}));case"delete":return o().createElement("g",null,o().createElement("path",{d:"M19 9h-3V8a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v1H9a1 1 0 1 0 0 2h10a1 1 0 0 0 .004-2H19zM9 20c.021.543.457.979 1 1h8c.55-.004.996-.45 1-1v-7H9v7zm2.02-4.985h2v4h-2v-4zm4 0h2v4h-2v-4z",fillRule:"evenodd"}));case"desktop":return o().createElement("g",null,o().createElement("path",{d:"M20 7H8C7.5 7 7 7.5 7 8v10c0 0.5 0.5 1 1 1h5v1h-1c-0.5 0-1 0.5-1 1s0.5 1 1 1h4c0.5 0 1-0.5 1-1s-0.5-1-1-1h-1v-1h5c0.5 0 1-0.5 1-1V8C21 7.5 20.5 7 20 7zM15 18h-2v-1h2V18zM19 16H9V9h10V16z",fillRule:"evenodd"}));case"grid":return o().createElement("g",null,o().createElement("path",{d:"M20 7H8C7.5 7 7 7.5 7 8v12c0 0.5 0.5 1 1 1h12c0.5 0 1-0.5 1-1V8C21 7.5 20.5 7 20 7zM15 9v2h-2V9H15zM15 13v2h-2v-2H15zM9 9h2v2H9V9zM9 13h2v2H9V13zM9 19v-2h2v2H9zM13 19v-2h2v2H13zM19 19h-2v-2h2V19zM19 15h-2v-2h2V15zM19 11h-2V9h2V11z",fillRule:"evenodd"}));case"wireframe":return o().createElement("g",null,o().createElement("path",{d:"M20 7H8C7.5 7 7 7.5 7 8v4c0 0.5 0.5 1 1 1h12c0.5 0 1-0.5 1-1V8C21 7.5 20.5 7 20 7zM19 11H9V9h10V11z",fillRule:"evenodd"}),o().createElement("path",{d:"M12 15H8c-0.5 0-1 0.5-1 1v4c0 0.5 0.5 1 1 1h4c0.5 0 1-0.5 1-1v-4C13 15.5 12.5 15 12 15zM11 19H9v-2h2V19z",fillRule:"evenodd"}),o().createElement("path",{d:"M20 15h-4c-0.5 0-1 0.5-1 1v4c0 0.5 0.5 1 1 1h4c0.5 0 1-0.5 1-1v-4C21 15.5 20.5 15 20 15zM19 19h-2v-2h2V19z",fillRule:"evenodd"}));case"exit":return o().createElement("g",null,o().createElement("path",{d:"M19.71 16.857l-2.85-2.854 2.85-2.854c.39-.395.39-1.03 0-1.426l-1.43-1.427a1 1 0 0 0-1.42 0L14 11.15l-2.85-2.854a1.013 1.013 0 0 0-1.43 0L8.3 9.723a1 1 0 0 0 0 1.426l2.85 2.854-2.85 2.853a1 1 0 0 0 0 1.427l1.42 1.427a1.011 1.011 0 0 0 1.43 0L14 16.856l2.86 2.854a1 1 0 0 0 1.42 0l1.43-1.427c.39-.395.39-1.03 0-1.426z",fillRule:"evenodd"}));case"expand":return o().createElement("g",null,o().createElement("path",{d:"M17 16L17 12C17 11.5 16.5 11 16 11L12 11C11.5 11 11 11.5 11 12L11 16C11 16.5 11.5 17 12 17L16 17C16.5 17 17 16.5 17 16L17 16ZM15 15L13 15 13 13 15 13 15 15 15 15Z",fillRule:"evenodd"}),o().createElement("path",{d:"M8.5 12C8.8 12 9 11.8 9 11.5L9 9 11.5 9C11.8 9 12 8.8 12 8.5 12 8.2 11.8 8 11.5 8L8.5 8C8.2 8 8 8.2 8 8.5L8 11.5C8 11.8 8.2 12 8.5 12L8.5 12Z",fillRule:"evenodd"}),o().createElement("path",{d:"M19.5 8L16.5 8C16.2 8 16 8.2 16 8.5 16 8.8 16.2 9 16.5 9L19 9 19 11.5C19 11.8 19.2 12 19.5 12 19.8 12 20 11.8 20 11.5L20 8.5C20 8.2 19.8 8 19.5 8L19.5 8Z",fillRule:"evenodd"}),o().createElement("path",{d:"M11.5 19L9 19 9 16.5C9 16.2 8.8 16 8.5 16 8.2 16 8 16.2 8 16.5L8 19.5C8 19.8 8.2 20 8.5 20L11.5 20C11.8 20 12 19.8 12 19.5 12 19.2 11.8 19 11.5 19L11.5 19Z",fillRule:"evenodd"}),o().createElement("path",{d:"M19.5 16C19.2 16 19 16.2 19 16.5L19 19 16.5 19C16.2 19 16 19.2 16 19.5 16 19.8 16.2 20 16.5 20L19.5 20C19.8 20 20 19.8 20 19.5L20 16.5C20 16.2 19.8 16 19.5 16L19.5 16Z",fillRule:"evenodd"}));case"heading-four":return o().createElement("g",null,o().createElement("path",{d:"M8 12.983h5V9a1 1 0 0 1 2 0v9.956a1 1 0 0 1-2 0v-3.973H8v3.973a1 1 0 0 1-2 0V9a1 1 0 1 1 2 0v3.983zm14 5.66h-.75v1.288h-1.29v-1.288h-2.67v-.914l2.74-4.013h1.22v3.907H22v1.02zm-2.04-1.02v-1.055c0-.175.01-.431.02-.764s.03-.529.03-.584h-.03a5.039 5.039 0 0 1-.38.681l-1.14 1.722h1.5z",fillRule:"evenodd"}));case"heading-one":return o().createElement("g",null,o().createElement("path",{d:"M13 14.983H8v3.973a1 1 0 0 1-2 0V9a1 1 0 1 1 2 0v3.983h5V9a1 1 0 0 1 2 0v9.956a1 1 0 0 1-2 0v-3.973zm8.1 4.951h-1.32v-3.6l.01-.591.02-.645c-.146.15-.3.294-.46.428l-.71.574-.64-.79 2.01-1.594h1.09v6.218z",fillRule:"evenodd"}));case"heading-three":return o().createElement("g",null,o().createElement("path",{d:"M13 14.983H8v3.973a1 1 0 0 1-2 0V9a1 1 0 1 1 2 0v3.983h5V9a1 1 0 0 1 2 0v9.956a1 1 0 0 1-2 0v-3.973zm8.65.125c.01.364-.12.718-.36.991-.26.29-.608.487-.99.561v.026a1.97 1.97 0 0 1 1.14.456c.265.256.407.613.39.981.03.546-.214 1.07-.65 1.4a3.04 3.04 0 0 1-1.87.5 4.6 4.6 0 0 1-1.8-.336v-1.118c.256.127.524.228.8.3.28.075.57.114.86.115a1.7 1.7 0 0 0 .97-.221.8.8 0 0 0 .31-.709.642.642 0 0 0-.36-.622 2.669 2.669 0 0 0-1.14-.183h-.48v-1.007h.49c.363.023.727-.042 1.06-.189a.687.687 0 0 0 .33-.648.714.714 0 0 0-.89-.706c-.21 0-.42.035-.62.1-.25.087-.49.206-.71.353l-.61-.906a3.419 3.419 0 0 1 2.04-.612 2.652 2.652 0 0 1 1.53.392c.36.24.572.649.56 1.082z",fillRule:"evenodd"}));case"heading-two":return o().createElement("g",null,o().createElement("path",{d:"M13 14.983H8v3.973a1 1 0 0 1-2 0V9a1 1 0 1 1 2 0v3.983h5V9a1 1 0 0 1 2 0v9.956a1 1 0 0 1-2 0v-3.973zm8.99 4.951h-4.36v-.914l1.57-1.577c.46-.474.76-.8.91-.985a2.1 2.1 0 0 0 .3-.508c.063-.154.097-.318.1-.484a.7.7 0 0 0-.21-.557.8.8 0 0 0-.55-.183c-.246 0-.49.057-.71.166a3.6 3.6 0 0 0-.71.471l-.72-.845a4.47 4.47 0 0 1 .77-.553c.209-.11.43-.194.66-.249.262-.06.53-.09.8-.087.355-.008.707.065 1.03.213.285.13.527.339.7.6.165.262.252.566.25.876.002.275-.049.549-.15.805-.122.277-.28.536-.47.772-.35.398-.725.774-1.12 1.127l-.81.752v.059h2.72v1.106-.005z",fillRule:"evenodd"}));case"help":return o().createElement("g",null,o().createElement("circle",{cx:"14",cy:"19",r:"1"}),o().createElement("path",{d:"M13 16a3.17 3.17 0 0 1 1.59-2.68c.74-.46 1.41-.8 1.41-1.82 0-.5-.45-1.5-2-1.5-1.73 0-2 .95-2 1-.12.6-.33 1-1 1-.67 0-1.12-.4-1-1a3.89 3.89 0 0 1 4-3 3.68 3.68 0 0 1 4 3.5 3.72 3.72 0 0 1-2.23 3.5 1.53 1.53 0 0 0-.77 1 .93.93 0 0 1-1 1 .93.93 0 0 1-1-1z"}));case"help-circle":return o().createElement("g",null,o().createElement("path",{d:"M14 22a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm0-3.6a.8.8 0 1 0 0-1.6.8.8 0 0 0 0 1.6zm-.8-3.2a.744.744 0 0 0 .8.8.744.744 0 0 0 .8-.8c.08-.343.305-.634.616-.8a2.976 2.976 0 0 0 1.784-2.8A2.944 2.944 0 0 0 14 8.8a3.112 3.112 0 0 0-3.2 2.4c-.096.48.264.8.8.8s.704-.32.8-.8c0-.04.216-.8 1.6-.8 1.24 0 1.6.8 1.6 1.2 0 .816-.536 1.088-1.128 1.456A2.536 2.536 0 0 0 13.2 15.2z"}));case"history":return o().createElement("g",null,o().createElement("path",{d:"M14 6.5C9.9 6.5 6.5 9.9 6.5 14 6.5 18.1 9.9 21.5 14 21.5 18.1 21.5 21.5 18.1 21.5 14 21.5 9.9 18.1 6.5 14 6.5L14 6.5ZM14 19.5C11 19.5 8.5 17 8.5 14 8.5 11 11 8.5 14 8.5 17 8.5 19.5 11 19.5 14 19.5 17 17 19.5 14 19.5L14 19.5Z",fillRule:"evenodd"}),o().createElement("path",{d:"M17 13L15 13 15 11C15 10.5 14.5 10 14 10 13.5 10 13 10.5 13 11L13 14C13 14.5 13.5 15 14 15L17 15C17.5 15 18 14.5 18 14 18 13.5 17.5 13 17 13L17 13Z",fillRule:"evenodd"}));case"indent":return o().createElement("g",null,o().createElement("path",{d:"M20 10H8a1 1 0 1 1 0-2h12a1 1 0 1 1 0 2zm0 10H8a1 1 0 0 1 0-2h12a1 1 0 1 1 0 2zm0-5h-7a1 1 0 0 1 0-2h7a1 1 0 1 1 0 2zM7.77 11.978l2.55 1.6a.5.5 0 0 1 0 .848l-2.55 1.6a.5.5 0 0 1-.77-.424v-3.2a.5.5 0 0 1 .77-.424z",fillRule:"evenodd"}));case"letter-spacing-small":return o().createElement("g",null,o().createElement("path",{d:"M15 19V9a1 1 0 0 1 2 0v10a1 1 0 0 1-2 0zm-4 0V9a1 1 0 0 1 2 0v10a1 1 0 0 1-2 0z",fillRule:"evenodd"}));case"letter-spacing":return o().createElement("g",null,o().createElement("path",{d:"M18 19V9a1 1 0 0 1 2 0v10a1 1 0 0 1-2 0zM8 19V9a1 1 0 1 1 2 0v10a1 1 0 0 1-2 0z",fillRule:"evenodd"}));case"line-height-small":return o().createElement("g",null,o().createElement("path",{d:"M19 13H9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2zm0 4H9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"line-height":return o().createElement("g",null,o().createElement("path",{d:"M19 10H9a1 1 0 1 1 0-2h10a1 1 0 0 1 0 2zm0 10H9a1 1 0 0 1 0-2h10a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"list":return o().createElement("g",null,o().createElement("path",{d:"M7 10a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm11-10h-7a1 1 0 0 1 0-2h7a1 1 0 0 1 0 2zm2 5h-9a1 1 0 0 1 0-2h9a1 1 0 0 1 0 2zm-2 5h-7a1 1 0 0 1 0-2h7a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"loading":return o().createElement("g",null,o().createElement("circle",{className:"et-fb-icon__circle et-fb-icon__circle--1",cx:"2",cy:"2",r:"2",transform:"translate(4 12)"}),o().createElement("circle",{className:"et-fb-icon__circle et-fb-icon__circle--2",cx:"2.3",cy:"2.7",r:"2",transform:"rotate(72 4.397 10.865)"}),o().createElement("circle",{className:"et-fb-icon__circle et-fb-icon__circle--3",cx:"2.3",cy:"2.2",r:"2",transform:"rotate(144 10.216 8.724)"}),o().createElement("circle",{className:"et-fb-icon__circle et-fb-icon__circle--4",cx:"2.6",cy:"2",r:"2",transform:"rotate(-144 14.235 7.453)"}),o().createElement("circle",{className:"et-fb-icon__circle et-fb-icon__circle--5",cx:"2.8",cy:"2.1",r:"2",transform:"rotate(-72 20.635 5.838)"}));case"move":return o().createElement("g",null,o().createElement("path",{d:"M20.91,13.78l-1.85-1.85c-0.14-0.14-0.33-0.22-0.53-0.22c-0.2,0-0.39,0.08-0.53,0.22c-0.14,0.14-0.22,0.33-0.22,0.53S17.86,12.86,18,13v0h-2.94v-2.96c0.13,0.11,0.3,0.19,0.48,0.19c0.2,0,0.39-0.08,0.53-0.22c0.14-0.14,0.22-0.33,0.22-0.53s-0.08-0.39-0.22-0.53l-1.85-1.85C14.17,7.03,14.09,7,14,7s-0.16,0.03-0.22,0.09l-1.85,1.85c-0.14,0.14-0.22,0.33-0.22,0.53s0.08,0.39,0.22,0.53c0.14,0.14,0.33,0.22,0.53,0.22S12.86,10.14,13,10h0.06v3H10v0c0.14-0.14,0.22-0.33,0.22-0.53s-0.08-0.39-0.22-0.53c-0.14-0.14-0.33-0.22-0.53-0.22c-0.2,0-0.39,0.08-0.53,0.22L7.1,13.78C7.04,13.84,7,13.92,7,14c0,0.08,0.03,0.16,0.09,0.22l1.85,1.85c0.14,0.14,0.33,0.22,0.53,0.22c0.2,0,0.39-0.08,0.53-0.22c0.14-0.14,0.22-0.33,0.22-0.53c0-0.2-0.08-0.39-0.22-0.53v0h3.06v3H13c-0.14-0.14-0.33-0.22-0.53-0.22s-0.39,0.08-0.53,0.22c-0.14,0.14-0.22,0.33-0.22,0.53c0,0.2,0.08,0.39,0.22,0.53l1.85,1.85C13.84,20.97,13.92,21,14,21s0.16-0.03,0.22-0.09l1.85-1.85c0.14-0.14,0.22-0.33,0.22-0.53c0-0.2-0.08-0.39-0.22-0.53c-0.14-0.14-0.33-0.22-0.53-0.22c-0.18,0-0.34,0.07-0.48,0.19V15H18v0c-0.14,0.14-0.22,0.33-0.22,0.53c0,0.2,0.08,0.39,0.22,0.53c0.14,0.14,0.33,0.22,0.53,0.22c0.2,0,0.39-0.08,0.53-0.22l1.85-1.85C20.97,14.16,21,14.08,21,14C21,13.92,20.97,13.84,20.91,13.78z"}));case"position-move":return o().createElement("g",null,o().createElement("path",{d:"M21,14a.31.31,0,0,1-.09.22l-1.85,1.85a.75.75,0,0,1-1.28-.53A.77.77,0,0,1,18,15h0a1.42,1.42,0,0,0,0-2h0a.77.77,0,0,1-.22-.54.75.75,0,0,1,1.28-.53l1.85,1.85A.31.31,0,0,1,21,14Zm-4.93,4a.75.75,0,0,0-.53-.22.77.77,0,0,0-.48.18L15,18a1.41,1.41,0,0,1-2,0l0,0a.75.75,0,0,0-1.06,0,.73.73,0,0,0,0,1.06l1.84,1.85A.31.31,0,0,0,14,21a.28.28,0,0,0,.22-.09l1.85-1.85a.75.75,0,0,0,0-1.06ZM10,15a1.42,1.42,0,0,1,0-2h0a.78.78,0,0,0,.23-.54.75.75,0,0,0-.22-.53.77.77,0,0,0-.54-.22.75.75,0,0,0-.53.22L7.1,13.78a.29.29,0,0,0,0,.44l1.84,1.85a.75.75,0,0,0,.53.22.77.77,0,0,0,.54-.22.75.75,0,0,0,.22-.53A.78.78,0,0,0,10,15Zm6.07-6.06L14.22,7.09A.28.28,0,0,0,14,7a.31.31,0,0,0-.22.09L11.94,8.94a.73.73,0,0,0,0,1.06A.75.75,0,0,0,13,10l0,0a1.41,1.41,0,0,1,2,0l.05.06a.77.77,0,0,0,.48.18.75.75,0,0,0,.53-1.28Zm0,5.06a2,2,0,1,0-2,2A2,2,0,0,0,16.06,14Z"}));case"position-horizontal":return o().createElement("g",null,o().createElement("path",{d:"M21,14a.31.31,0,0,1-.09.22l-1.85,1.85a.75.75,0,0,1-1.28-.53A.77.77,0,0,1,18,15h0a1.42,1.42,0,0,0,0-2h0a.77.77,0,0,1-.22-.54.75.75,0,0,1,1.28-.53l1.85,1.85A.31.31,0,0,1,21,14ZM10,15a1.42,1.42,0,0,1,0-2h0a.78.78,0,0,0,.23-.54.75.75,0,0,0-.22-.53.77.77,0,0,0-.54-.22.75.75,0,0,0-.53.22L7.1,13.78a.29.29,0,0,0,0,.44l1.84,1.85a.75.75,0,0,0,.53.22.77.77,0,0,0,.54-.22.75.75,0,0,0,.22-.53A.78.78,0,0,0,10,15Zm6.06-1a2,2,0,1,0-2,2A2,2,0,0,0,16.06,14Z"}),o().createElement("path",{style:{opacity:.2},d:"M16.29,18.53a.75.75,0,0,1-.22.53l-1.85,1.85A.28.28,0,0,1,14,21a.31.31,0,0,1-.22-.09l-1.84-1.85a.73.73,0,0,1,0-1.06A.75.75,0,0,1,13,18l0,0a1.41,1.41,0,0,0,2,0l.05-.06a.77.77,0,0,1,.48-.18.75.75,0,0,1,.75.75Zm-.22-9.59L14.22,7.09A.28.28,0,0,0,14,7a.31.31,0,0,0-.22.09L11.94,8.94a.73.73,0,0,0,0,1.06A.75.75,0,0,0,13,10l0,0a1.41,1.41,0,0,1,2,0l.05.06a.77.77,0,0,0,.48.18.75.75,0,0,0,.53-1.28Z"}));case"position-vertical":return o().createElement("g",null,o().createElement("path",{style:{opacity:.2},d:"M21,14a.31.31,0,0,1-.09.22l-1.85,1.85a.75.75,0,0,1-1.28-.53A.77.77,0,0,1,18,15h0a1.42,1.42,0,0,0,0-2h0a.77.77,0,0,1-.22-.54.75.75,0,0,1,1.28-.53l1.85,1.85A.31.31,0,0,1,21,14ZM10,15a1.42,1.42,0,0,1,0-2h0a.78.78,0,0,0,.23-.54.75.75,0,0,0-.22-.53.77.77,0,0,0-.54-.22.75.75,0,0,0-.53.22L7.1,13.78a.29.29,0,0,0,0,.44l1.84,1.85a.75.75,0,0,0,.53.22.77.77,0,0,0,.54-.22.75.75,0,0,0,.22-.53A.78.78,0,0,0,10,15Z"}),o().createElement("path",{d:"M14.06,16a2,2,0,1,1,2-2A2,2,0,0,1,14.06,16Zm2,2a.75.75,0,0,0-.53-.22.77.77,0,0,0-.48.18L15,18a1.41,1.41,0,0,1-2,0l0,0a.75.75,0,0,0-1.06,0,.73.73,0,0,0,0,1.06l1.84,1.85A.31.31,0,0,0,14,21a.28.28,0,0,0,.22-.09l1.85-1.85a.75.75,0,0,0,0-1.06Zm0-9.06L14.22,7.09A.28.28,0,0,0,14,7a.31.31,0,0,0-.22.09L11.94,8.94a.73.73,0,0,0,0,1.06A.75.75,0,0,0,13,10l0,0a1.41,1.41,0,0,1,2,0l.05.06a.77.77,0,0,0,.48.18.75.75,0,0,0,.53-1.28Z"}));case"numbered-list":return o().createElement("g",null,o().createElement("path",{d:"M9.08 20H7.5a.5.5 0 1 1 0-1h.78l-.14-.146a.492.492 0 0 1 0-.707L8.28 18H7.5a.5.5 0 1 1 0-1h1.58a.653.653 0 0 1 .61.412.672.672 0 0 1-.14.726l-.36.362.36.362a.672.672 0 0 1 .14.726.653.653 0 0 1-.61.412zm8.91-10h-5a1 1 0 1 1 0-2h5a1 1 0 0 1 0 2zm3 5h-8a1 1 0 1 1 0-2h8a1 1 0 0 1 0 2zm-3 5h-5a1 1 0 1 1 0-2h5a1 1 0 0 1 0 2zm-8.51-5H7.5a.482.482 0 0 1-.46-.309.5.5 0 0 1 .1-.544L8.28 13H7.5a.5.5 0 1 1 0-1h1.59a.661.661 0 0 1 .47 1.126L8.69 14h.79a.5.5 0 0 1 0 1zm-.99-4a.5.5 0 0 1-.5-.5V9a.5.5 0 1 1 0-1h.5a.5.5 0 0 1 .49.5v2a.5.5 0 0 1-.49.5z",fillRule:"evenodd"}));case"paint":return o().createElement("g",null,o().createElement("path",{d:"M14.489 8.364a.9.9 0 0 0-.641-.26c-.281.003-.55.117-.746.318l-1.611 1.615-1.8-1.8a1 1 0 0 0-1.408 1.41l1.8 1.8-2.767 2.776a.988.988 0 0 0-.057 1.39l4.56 4.573a.9.9 0 0 0 .64.26 1.06 1.06 0 0 0 .747-.317l6.052-6.068a.624.624 0 0 0 .036-.875l-4.805-4.822zm1.07 6.583a4.34 4.34 0 0 1-6.15 0l2.082-2.087 1.017 1.019a1 1 0 1 0 1.408-1.411l-1.017-1.02.925-.928 3.075 3.084-1.34 1.343zm2.39 4.388a1.5 1.5 0 1 0 2.986 0c0-1.278-1.493-4.4-1.493-4.4s-1.493 3.067-1.493 4.4z",fillRule:"evenodd"}));case"phone":return o().createElement("g",null,o().createElement("path",{d:"M17 7h-6c-0.5 0-1 0.5-1 1v12c0 0.5 0.5 1 1 1h6c0.5 0 1-0.5 1-1V8C18 7.5 17.5 7 17 7zM15 20h-2v-1h2V20zM16 18h-4V9h4V18z",fillRule:"evenodd"}));case"preview-link":return o().createElement("g",null,o().createElement("path",{d:"M17.586 9l-4.536 4.535a1 1 0 1 0 1.414 1.415L19 10.415V12a1 1 0 0 0 2 0V8a.997.997 0 0 0-1-1h-4a1 1 0 0 0 0 2h1.586zm3.121 11.707A.997.997 0 0 1 20 21H8a.997.997 0 0 1-1-1V8a.997.997 0 0 1 1-1h4a1 1 0 0 1 0 2H9v10h10v-3a1 1 0 0 1 2 0v4a.997.997 0 0 1-.293.707z"}));case"redo":return o().createElement("g",null,o().createElement("path",{d:"M20.986 7l-1.78 1.78c-1.255-.967-2.835-1.501-4.575-1.527-3.845-.057-7.195 2.624-7.59 6.45C6.577 18.2 10.092 22 14.493 22c1.94 0 3.701-.736 5.031-1.945a.674.674 0 0 0 .032-.979l-1.184-1.175a.655.655 0 0 0-.901-.026c-.791.72-1.83 1.182-2.978 1.182-2.671 0-4.798-2.258-4.46-5.008.273-2.22 2.299-3.831 4.534-3.8a4.51 4.51 0 0 1 2.44.734l-2.014 2.014c0 .552.447.999.999.999h4.994a.998.998 0 0 0 1-1V8a1 1 0 0 0-1-1z",fillRule:"evenodd"}));case"reset":return o().createElement("g",null,o().createElement("path",{d:"M9.596 8.95a6.811 6.811 0 0 1 9.384-.15 6.661 6.661 0 0 1 .08 9.477 6.421 6.421 0 0 1-4.62 1.931c-.21 0-.42 0-.63-.017A6.084 6.084 0 0 1 9 17.151l5.45.005a3.274 3.274 0 0 0 3.26-3.3 3.418 3.418 0 0 0-3.41-3.314c-.83 0-1.626.321-2.224.89l1.764 1.755a.556.556 0 0 1-.4.948H7.56A.557.557 0 0 1 7 13.58V7.695a.557.557 0 0 1 .95-.393L9.596 8.95z",fillRule:"evenodd"}));case"resize":return o().createElement("g",null,o().createElement("path",{d:"M11.715 12.858l-2.292-2.291a1.885 1.885 0 0 1-1.381 1.524A1.041 1.041 0 0 1 7 11.049V7.431C7 7.193 7.193 7 7.431 7h3.618c.575 0 1.041.467 1.042 1.042a1.884 1.884 0 0 1-1.523 1.38l2.292 2.291 5.728 5.728a1.886 1.886 0 0 1 1.37-1.532c.575 0 1.041.467 1.042 1.042v3.618a.431.431 0 0 1-.431.431h-3.618a1.043 1.043 0 0 1-1.042-1.042 1.887 1.887 0 0 1 1.533-1.371l-5.728-5.728z",fillRule:"evenodd"}));case"save":return o().createElement("g",null,o().createElement("path",{d:"M18.95 9.051a1 1 0 1 0-1.414 1.414 5 5 0 1 1-7.07 0A1 1 0 0 0 9.05 9.051a7 7 0 1 0 9.9.001v-.001zm-5.378 8.235a.5.5 0 0 0 .857 0l2.117-3.528a.5.5 0 0 0-.429-.758H15V8a1 1 0 0 0-2 0v5h-1.117a.5.5 0 0 0-.428.758l2.117 3.528z",fillRule:"evenodd"}));case"setting":return o().createElement("g",null,o().createElement("path",{d:"M20.426 13.088l-1.383-.362a.874.874 0 0 1-.589-.514l-.043-.107a.871.871 0 0 1 .053-.779l.721-1.234a.766.766 0 0 0-.116-.917 6.682 6.682 0 0 0-.252-.253.768.768 0 0 0-.917-.116l-1.234.722a.877.877 0 0 1-.779.053l-.107-.044a.87.87 0 0 1-.513-.587l-.362-1.383a.767.767 0 0 0-.73-.567h-.358a.768.768 0 0 0-.73.567l-.362 1.383a.878.878 0 0 1-.513.589l-.107.044a.875.875 0 0 1-.778-.054l-1.234-.722a.769.769 0 0 0-.918.117c-.086.082-.17.166-.253.253a.766.766 0 0 0-.115.916l.721 1.234a.87.87 0 0 1 .053.779l-.043.106a.874.874 0 0 1-.589.514l-1.382.362a.766.766 0 0 0-.567.731v.357a.766.766 0 0 0 .567.731l1.383.362c.266.07.483.26.588.513l.043.107a.87.87 0 0 1-.053.779l-.721 1.233a.767.767 0 0 0 .115.917c.083.087.167.171.253.253a.77.77 0 0 0 .918.116l1.234-.721a.87.87 0 0 1 .779-.054l.107.044a.878.878 0 0 1 .513.589l.362 1.383a.77.77 0 0 0 .731.567h.356a.766.766 0 0 0 .73-.567l.362-1.383a.878.878 0 0 1 .515-.589l.107-.044a.875.875 0 0 1 .778.054l1.234.721c.297.17.672.123.917-.117.087-.082.171-.166.253-.253a.766.766 0 0 0 .116-.917l-.721-1.234a.874.874 0 0 1-.054-.779l.044-.107a.88.88 0 0 1 .589-.513l1.383-.362a.77.77 0 0 0 .567-.731v-.357a.772.772 0 0 0-.569-.724v-.005zm-6.43 3.9a2.986 2.986 0 1 1 2.985-2.986 3 3 0 0 1-2.985 2.987v-.001z",fillRule:"evenodd"}));case"sidebar":return o().createElement("g",null,o().createElement("path",{d:"M19 8L9 8C8.5 8 8 8.5 8 9L8 19C8 19.5 8.5 20 9 20L19 20C19.5 20 20 19.5 20 19L20 9C20 8.5 19.5 8 19 8L19 8ZM10 10L12 10 12 12 10 12 10 10 10 10ZM10 13L12 13 12 15 10 15 10 13 10 13ZM10 18L10 16 12 16 12 18 10 18 10 18ZM18 18L14 18 14 10 18 10 18 18 18 18Z",fillRule:"evenodd"}));case"tablet":return o().createElement("g",null,o().createElement("path",{d:"M19 7H9C8.5 7 8 7.5 8 8v12c0 0.5 0.5 1 1 1h10c0.5 0 1-0.5 1-1V8C20 7.5 19.5 7 19 7zM15 20h-2v-1h2V20zM18 18h-8V9h8V18z",fillRule:"evenodd"}));case"text-bold":return o().createElement("g",null,o().createElement("path",{d:"M17.337 13.535c.43-.591.662-1.304.663-2.035A3.51 3.51 0 0 0 14.5 8h-3c-.114 0-.221.023-.333.034A.933.933 0 0 0 11 8a.969.969 0 0 0-.53.174A.982.982 0 0 0 10 9v10c.005.338.182.65.47.827.156.108.34.168.53.173a.933.933 0 0 0 .167-.034c.112.011.219.034.333.034h4a3.51 3.51 0 0 0 3.5-3.5 3.494 3.494 0 0 0-1.667-2.965h.004zM16 11.5a1.5 1.5 0 0 1-1.5 1.5H12v-3h2.5a1.5 1.5 0 0 1 1.5 1.5zm1 5a1.5 1.5 0 0 1-1.5 1.5H12v-3h3.5a1.5 1.5 0 0 1 1.5 1.5z",fillRule:"evenodd"}));case"text-center":return o().createElement("g",null,o().createElement("path",{d:"M18 10h-8a1 1 0 1 1 0-2h8a1 1 0 0 1 0 2zm2 5H8a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2zm-2 5h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"text-italic":return o().createElement("g",null,o().createElement("path",{d:"M17 8h-5c-.6 0-1 .4-1 1s.4 1 1 1h1.3l-2.1 8H10c-.6 0-1 .4-1 1s.4 1 1 1h5c.6 0 1-.4 1-1s-.4-1-1-1h-1.7l2.1-8H17c.6 0 1-.4 1-1s-.4-1-1-1z",fillRule:"evenodd"}));case"text-justify":return o().createElement("g",null,o().createElement("path",{d:"M20 20H8a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2zm0-10H8a1 1 0 1 1 0-2h12a1 1 0 0 1 0 2zM8 15a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2H8z",fillRule:"evenodd"}));case"text-large":return o().createElement("g",null,o().createElement("path",{d:"M15.38 8.96a1.006 1.006 0 0 0-.65-.9.942.942 0 0 0-.28-.046c-.03 0-.06-.013-.09-.014-.03 0-.06.011-.09.014a.942.942 0 0 0-.28.045.991.991 0 0 0-.65.9l-4.28 9.622c-.187.52.075 1.093.59 1.291a.992.992 0 0 0 1.28-.592l1.19-2.272h4.47l1.2 2.272a.994.994 0 1 0 1.86-.7l-4.27-9.62zm-2.52 6.042l1.5-3.039 1.5 3.04h-3z",fillRule:"evenodd"}));case"text-left":return o().createElement("g",null,o().createElement("path",{d:"M16 20H8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-10H8a1 1 0 1 1 0-2h8a1 1 0 0 1 0 2zm4 5H8a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"text-link":return o().createElement("g",null,o().createElement("path",{d:"M20.726 7.274a.935.935 0 0 0-1.322 0l-1.849 1.85-.67-.67a3.06 3.06 0 0 0-4.226 0l-4.225 4.225a2.998 2.998 0 0 0 0 4.227l.669.67-1.85 1.85a.935.935 0 0 0 1.322 1.321l1.85-1.85.668.67a2.99 2.99 0 0 0 4.228 0l4.224-4.225a2.998 2.998 0 0 0 0-4.227l-.67-.67 1.85-1.85a.935.935 0 0 0 .001-1.321zm-2.498 5.162a1.123 1.123 0 0 1 0 1.584l-4.223 4.225a1.146 1.146 0 0 1-1.583 0l-.669-.67 1.581-1.582a.937.937 0 1 0-1.328-1.321l-1.582 1.581-.669-.669a1.122 1.122 0 0 1 0-1.584l4.225-4.224a1.12 1.12 0 0 1 1.583 0l.67.67-1.582 1.58a.935.935 0 0 0 1.322 1.322l1.581-1.582.674.67z",fillRule:"evenodd"}));case"text-quote":return o().createElement("g",null,o().createElement("path",{d:"M9.437 9.049a2 2 0 1 0 1.186 3.116c.264.574.394 1.2.381 1.833 0 2.116-1.118 3.998-1.999 3.998a1 1 0 1 0 0 2c2.392 0 3.999-3.1 3.999-5.998 0-2.709-1.48-4.698-3.567-4.949zm7.997 0a2 2 0 1 0 1.186 3.116c.263.574.393 1.2.38 1.833 0 2.116-1.117 3.998-1.998 3.998a1 1 0 1 0 0 2c2.392 0 3.998-3.1 3.998-5.998 0-2.709-1.48-4.698-3.566-4.949z",fillRule:"evenodd"}));case"text-right":return o().createElement("g",null,o().createElement("path",{d:"M20 15H8a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2zm0-5h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0 10h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"text-small":return o().createElement("g",null,o().createElement("path",{d:"M14.168 10.639a.672.672 0 0 0-.424-.6.6.6 0 0 0-.186-.03c-.02 0-.038-.009-.057-.009a.521.521 0 0 0-.057.009.6.6 0 0 0-.186.03.672.672 0 0 0-.424.6l-2.792 6.448a.681.681 0 0 0 .384.865.645.645 0 0 0 .836-.4L12 15.997h3l.738 1.558a.646.646 0 0 0 .837.4.68.68 0 0 0 .383-.865l-2.791-6.451zm-1.645 4.315l.978-2.3.978 2.3h-1.956z",fillRule:"evenodd"}));case"text-underline":return o().createElement("g",null,o().createElement("path",{d:"M8 21h12c.6 0 1 .4 1 1s-.4 1-1 1H8c-.6 0-1-.4-1-1s.4-1 1-1zM10 8c.6 0 1 .4 1 1v6c0 1.7 1.3 3 3 3s3-1.3 3-3V9c0-.6.4-1 1-1s1 .4 1 1v6c0 2.8-2.2 5-5 5s-5-2.2-5-5V9c0-.6.4-1 1-1z",fillRule:"evenodd"}));case"text-underline-double":return o().createElement("g",null,o().createElement("path",{d:"M8.5 23h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1 0-1zM8.5 21h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1 0-1zM10 8a1 1 0 0 1 1 1v6a3 3 0 1 0 6 0V9a1 1 0 0 1 2 0v6a5 5 0 0 1-10 0V9a1 1 0 0 1 1-1z",fillRule:"evenodd"}));case"text-strikethrough":return o().createElement("g",null,o().createElement("path",{d:"M14.8 13c-.1 0-.2-.1-.3-.1C11.6 11.7 11 10 12.1 9c.9-.9 3.4-.4 3.7.5.2.5.7.8 1.3.6.5-.2.8-.7.6-1.3-.8-2.4-5.1-3.3-7-1.3-1.6 1.6-1.4 3.8.3 5.5H7c-.6 0-1 .4-1 1s.4 1 1 1h7.3c2.3 1.1 2.7 2.5 1.7 3.7-1.1 1.3-3.4 1.2-4.7-.8-.3-.5-.9-.6-1.4-.3-.5.3-.6.9-.3 1.4 2 3.2 5.9 3.3 7.9 1 1.3-1.5 1.3-3.4 0-5H21c.6 0 1-.4 1-1s-.4-1-1-1h-6.2z",fillRule:"evenodd"}));case"text-smallcaps":return o().createElement("g",null,o().createElement("path",{d:"M11 10h2c.6 0 1-.4 1-1s-.4-1-1-1H7c-.6 0-1 .4-1 1s.4 1 1 1h2v9c0 .6.4 1 1 1s1-.4 1-1v-9zm8 4v5c0 .6-.4 1-1 1s-1-.4-1-1v-5h-2c-.6 0-1-.4-1-1s.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-2z",fillRule:"evenodd"}));case"text-uppercase":return o().createElement("g",null,o().createElement("path",{d:"M10 10h2c.6 0 1-.4 1-1s-.4-1-1-1H6c-.6 0-1 .4-1 1s.4 1 1 1h2v9c0 .6.4 1 1 1s1-.4 1-1v-9zm10 0v9c0 .6-.4 1-1 1s-1-.4-1-1v-9h-2c-.6 0-1-.4-1-1s.4-1 1-1h6c.6 0 1 .4 1 1s-.4 1-1 1h-2z",fillRule:"evenodd"}));case"text-h1":return o().createElement("g",null,o().createElement("path",{d:"M21 19.934h-1.32v-3.6l.01-.591.02-.645c-.146.15-.3.294-.46.428l-.71.574-.64-.79 2.01-1.594H21v6.218zM13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text-h2":return o().createElement("g",null,o().createElement("path",{d:"M21.99 19.934h-4.36v-.914l1.57-1.577c.46-.474.76-.8.91-.985.123-.154.224-.325.3-.508.063-.154.097-.318.1-.484a.702.702 0 0 0-.21-.557.797.797 0 0 0-.55-.183c-.246 0-.49.057-.71.166a3.574 3.574 0 0 0-.71.471l-.72-.845a4.47 4.47 0 0 1 .77-.553c.209-.11.43-.194.66-.249.262-.06.53-.09.8-.087.355-.008.707.065 1.03.213.285.13.527.339.7.6.165.262.252.566.25.876.002.275-.049.549-.15.805-.122.277-.28.536-.47.772-.35.398-.725.774-1.12 1.127l-.81.752v.059h2.72v1.106-.005zM13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text-h3":return o().createElement("g",null,o().createElement("path",{d:"M21.65 15.108c.01.364-.12.718-.36.991-.26.29-.608.487-.99.561v.026a1.97 1.97 0 0 1 1.14.456c.265.256.407.613.39.981.03.546-.214 1.07-.65 1.4a3.037 3.037 0 0 1-1.87.5 4.587 4.587 0 0 1-1.8-.336v-1.118c.256.127.524.228.8.3.28.075.57.114.86.115.338.025.676-.052.97-.221a.802.802 0 0 0 .31-.709.642.642 0 0 0-.36-.622 2.674 2.674 0 0 0-1.14-.183h-.48v-1.007h.49c.363.023.727-.042 1.06-.189a.686.686 0 0 0 .33-.648.715.715 0 0 0-.89-.706c-.21 0-.42.035-.62.1-.25.087-.49.206-.71.353l-.61-.906a3.42 3.42 0 0 1 2.04-.612 2.65 2.65 0 0 1 1.53.392c.36.24.572.649.56 1.082zM13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text-h4":return o().createElement("g",null,o().createElement("path",{d:"M21.25 17.623v-3.907h-1.22l-2.74 4.013v.914h2.67v1.288h1.29v-1.288H22v-1.02h-.75zm-1.27-1.819c-.01.333-.02.589-.02.764v1.055h-1.5l1.14-1.722c.144-.217.271-.445.38-.681h.03c0 .055-.02.251-.03.584zM13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text-h5":return o().createElement("g",null,o().createElement("path",{d:"M20.259 15.73c.621 0 1.115.174 1.483.523.368.349.552.826.552 1.433 0 .718-.221 1.27-.664 1.657-.442.387-1.075.58-1.898.58-.715 0-1.292-.116-1.731-.347v-1.173c.231.123.501.223.809.301.308.078.599.117.875.117.829 0 1.244-.34 1.244-1.02 0-.647-.429-.971-1.288-.971-.155 0-.327.015-.514.046-.188.031-.34.064-.457.099l-.541-.29.242-3.274h3.485v1.151H19.56l-.119 1.261.154-.031c.179-.041.4-.062.664-.062z",fillRule:"evenodd"}),o().createElement("path",{d:"M13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text-h6":return o().createElement("g",null,o().createElement("path",{d:"M22.047 16.275c-.325-.36-.775-.541-1.349-.541-.639 0-1.103.249-1.393.747h-.057c.026-.507.113-.898.259-1.173s.367-.483.661-.624.675-.211 1.14-.211c.255 0 .513.029.773.088v-1.085a4.374 4.374 0 0 0-.861-.066c-1.072 0-1.877.311-2.415.932S18 15.909 18 17.18c0 .595.096 1.103.288 1.525s.464.743.817.962.767.33 1.241.33c.686 0 1.222-.2 1.608-.6s.58-.943.58-1.628c.001-.635-.161-1.133-.487-1.494zm-1.059 2.345c-.155.195-.378.292-.668.292-.281 0-.513-.12-.697-.36s-.275-.535-.275-.883c0-.237.097-.445.292-.624s.43-.268.705-.268c.293 0 .512.09.657.27s.218.427.218.74c.001.36-.076.638-.232.833z",fillRule:"evenodd"}),o().createElement("path",{d:"M13 9v4H8V9a1 1 0 0 0-2 0v10a1 1 0 0 0 2 0v-4h5v4a1 1 0 0 0 2 0V9a1 1 0 0 0-2 0z",fillRule:"evenodd"}));case"text":return o().createElement("g",null,o().createElement("path",{d:"M9.4 8h-.3c-.4.2-.5.5-.6 1l-4.4 9.7c-.2.5.1 1.1.6 1.3.5.2 1.1-.1 1.3-.6L7 17h5l1 2.3c.2.5.8.8 1.3.6.5-.2.8-.8.6-1.3L10.5 9c-.1-.5-.2-.8-.6-.9-.1-.1-.2-.1-.3-.1h-.2zM8 15l1.5-3 1.5 3H8zm15.5 0v-1c0-1.7-1.3-3-3-3h-3c-.5 0-1.2.4-1.2 1s.6 1 1.2 1h3c.6 0 1 .4 1 1h-3c-1.6 0-3 1.3-3 3 0 1.6 1.3 3 3 3h2c.8 0 1.4-.3 2-.9.1.5.5.9 1 .9s1-.5 1-1-.4-1-1-1v-3zm-2 2c0 .6-.4 1-1 1h-2c-.6 0-1-.5-1-1s.5-1 1-1h3v1z",fillRule:"evenodd"}));case"undent":return o().createElement("g",null,o().createElement("path",{d:"M10.24 16.022l-2.56-1.6a.5.5 0 0 1 0-.848l2.56-1.6a.5.5 0 0 1 .76.424v3.2a.5.5 0 0 1-.76.424zM20 10H8a1 1 0 1 1 0-2h12a1 1 0 0 1 0 2zm0 5h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2zm0 5H8a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2z",fillRule:"evenodd"}));case"undo":case"rotate-90-degree":return o().createElement("g",null,o().createElement("path",{d:"M14.355 7.253c-1.74.026-3.321.559-4.576 1.528L7.999 7A1 1 0 0 0 7 8v4.998c0 .552.447.999.999.999h4.995a1 1 0 0 0 .999-.999l-2.014-2.016a4.51 4.51 0 0 1 2.44-.733c2.235-.032 4.261 1.58 4.534 3.799.338 2.751-1.789 5.009-4.46 5.009-1.149 0-2.186-.462-2.978-1.182a.654.654 0 0 0-.902.026l-1.184 1.175a.674.674 0 0 0 .032.979A7.443 7.443 0 0 0 14.493 22c4.401 0 7.915-3.8 7.452-8.297-.395-3.826-3.745-6.507-7.59-6.45z",fillRule:"evenodd"}));case"zoom-in":return o().createElement("g",null,o().createElement("path",{d:"M15.508 7a5.511 5.511 0 0 0-5.505 5.5 5.426 5.426 0 0 0 .847 2.92l-3.737 2.67c-.389.39.32 1.74.708 2.13.39.39 1.764 1.06 2.153.67l2.646-3.71A5.5 5.5 0 1 0 15.508 7zm0 9.01a3.505 3.505 0 1 1 3.5-3.51 3.514 3.514 0 0 1-3.5 3.51zm.5-5.01h-1v1h-1v1h1v1h1v-1h1v-1h-1v-1z",fillRule:"evenodd"}));case"zoom-out":return o().createElement("g",null,o().createElement("path",{d:"M15.508 7a5.5 5.5 0 0 0-4.658 8.43L7.113 18.1c-.389.39.32 1.73.708 2.12.39.39 1.764 1.07 2.153.68l2.646-3.71A5.5 5.5 0 1 0 15.508 7zm0 9.01a3.505 3.505 0 1 1-.01-7.01 3.505 3.505 0 0 1 .01 7.01zm-1.5-3h3v-1h-3v1z",fillRule:"evenodd"}));case"lock":return o().createElement("g",null,o().createElement("path",{d:"M20 12C19.9 11.7 19.3 11 19 11L18 11C18 8.1 16.2 6 14 6 11.8 6 10 8.1 10 11L9 11C8.6 11 8.1 11.6 8 12L8 13 8 19 8 20C8.1 20.3 8.7 20.9 9 21L19 21C19.4 21 19.9 20.4 20 20L20 19 20 14 20 12 20 12ZM14 8C15.1 8 16 9.4 16 11.1L12 11.1C12 9.4 12.9 8 14 8L14 8ZM18 19L10 19 10 13 18 13 18 19 18 19Z",fillRule:"evenodd"}),o().createElement("path",{d:"M14 18C14.6 18 15 17.6 15 17L15 15C15 14.4 14.6 14 14 14 13.4 14 13 14.4 13 15L13 15 13 17C13 17.6 13.4 18 14 18L14 18Z",fillRule:"evenodd"}));case"previous":return o().createElement("g",null,o().createElement("path",{d:"M15.2 14L18.7 10C19.1 9.6 19.1 9 18.7 8.6 18.3 8.2 17.7 8.2 17.3 8.6L13.3 13.1C13.1 13.3 13 13.7 13 14 12.9 14.3 13 14.6 13.3 14.9L17.3 19.4C17.7 19.8 18.3 19.8 18.7 19.4 19.1 19 19.1 18.4 18.7 18L15.2 14 15.2 14Z",fillRule:"evenodd"}));case"next":return o().createElement("g",null,o().createElement("path",{d:"M15.8 14L12.3 18C11.9 18.4 11.9 19 12.3 19.4 12.7 19.8 13.3 19.8 13.7 19.4L17.7 14.9C17.9 14.7 18 14.3 18 14 18.1 13.7 18 13.4 17.7 13.1L13.7 8.6C13.3 8.2 12.7 8.2 12.3 8.6 11.9 9 11.9 9.6 12.3 10L15.8 14 15.8 14Z",fillRule:"evenodd"}));case"sync":return o().createElement("g",null,o().createElement("path",{d:"M19.1 11.7L19.1 11.7c-0.3 0.3-0.4 0.6-0.3 0.9 0.1 0.4 0.2 0.9 0.2 1.3 0 2.8-2.2 5-5 5v2c3.9 0 7-3.1 7-7 0-0.6-0.1-1.3-0.2-1.8C20.6 11.4 19.6 11.2 19.1 11.7z",fillRule:"evenodd"}),o().createElement("path",{d:"M14 9V7c-3.9 0-7 3.1-7 7 0 0.6 0.1 1.2 0.2 1.8 0.2 0.7 1.1 1 1.7 0.4l0 0c0.2-0.2 0.4-0.6 0.3-0.9C9.1 14.9 9 14.5 9 14 9 11.2 11.2 9 14 9z",fillRule:"evenodd"}),o().createElement("path",{d:"M18.2 8.6c0.4-0.3 0.4-0.9 0-1.2l-3.4-2.8C14.4 4.3 14 4.4 14 5v6c0 0.6 0.4 0.7 0.8 0.4L18.2 8.6z",fillRule:"evenodd"}),o().createElement("path",{d:"M9.8 19.4c-0.4 0.3-0.4 0.9 0 1.2l3.4 2.8c0.4 0.3 0.8 0.2 0.8-0.4v-6c0-0.5-0.4-0.7-0.8-0.4L9.8 19.4z",fillRule:"evenodd"}));case"portability":return o().createElement("g",null,o().createElement("path",{d:"M9.6 20.8c0.2 0.3 0.7 0.3 0.9 0l2.1-3.5c0.2-0.3 0-0.8-0.4-0.8H11V8c0-0.6-0.4-1-1-1C9.4 7 9 7.4 9 8v8.5H7.9c-0.4 0-0.6 0.4-0.4 0.8L9.6 20.8z",fillRule:"evenodd"}),o().createElement("path",{d:"M18.4 7.2c-0.2-0.3-0.7-0.3-0.9 0l-2.1 3.5c-0.2 0.3 0 0.8 0.4 0.8H17V20c0 0.6 0.4 1 1 1 0.6 0 1-0.4 1-1v-8.5h1.1c0.4 0 0.6-0.4 0.4-0.8L18.4 7.2z",fillRule:"evenodd"}));case"background-color":return o().createElement("g",null,o().createElement("path",{d:"M19.4 14.6c0 0-1.5 3.1-1.5 4.4 0 0.9 0.7 1.6 1.5 1.6 0.8 0 1.5-0.7 1.5-1.6C20.9 17.6 19.4 14.6 19.4 14.6zM19.3 12.8l-4.8-4.8c-0.2-0.2-0.4-0.3-0.6-0.3 -0.3 0-0.5 0.1-0.7 0.3l-1.6 1.6L9.8 7.8c-0.4-0.4-1-0.4-1.4 0C8 8.1 8 8.8 8.4 9.1l1.8 1.8 -2.8 2.8c-0.4 0.4-0.4 1-0.1 1.4l4.6 4.6c0.2 0.2 0.4 0.3 0.6 0.3 0.3 0 0.5-0.1 0.7-0.3l6.1-6.1C19.5 13.4 19.5 13.1 19.3 12.8zM15.6 14.6c-1.7 1.7-4.5 1.7-6.2 0l2.1-2.1 1 1c0.4 0.4 1 0.4 1.4 0 0.4-0.4 0.4-1 0-1.4l-1-1 0.9-0.9 3.1 3.1L15.6 14.6z",fillRule:"evenodd"}));case"background-image":return o().createElement("g",null,o().createElement("path",{d:"M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9H7v-10h14V18.9z",fillRule:"evenodd"}),o().createElement("circle",{cx:"10.5",cy:"12.4",r:"1.5"}),o().createElement("polygon",{points:"15 16.9 13 13.9 11 16.9 "}),o().createElement("polygon",{points:"17 10.9 15 16.9 19 16.9 "}));case"background-video":return o().createElement("g",null,o().createElement("path",{d:"M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9H7v-10h14V18.9z",fillRule:"evenodd"}),o().createElement("polygon",{points:"13 10.9 13 16.9 17 13.9 "}));case"background-gradient":return o().createElement("g",null,o().createElement("path",{d:"M22.9 7.5c-0.1-0.3-0.5-0.6-0.8-0.6H5.9c-0.4 0-0.7 0.2-0.8 0.6C5.1 7.6 5 7.7 5 7.9v12.2c0 0.1 0 0.2 0.1 0.4 0.1 0.3 0.5 0.5 0.8 0.6h16.2c0.4 0 0.7-0.2 0.8-0.6 0-0.1 0.1-0.2 0.1-0.4V7.9C23 7.7 23 7.6 22.9 7.5zM21 18.9L7 8.9h14V18.9z",fillRule:"evenodd"}));case"background-pattern":return o().createElement("g",null,o().createElement("path",{d:"M22,7H6A1,1,0,0,0,5,8V20a1,1,0,0,0,1,1H22a1,1,0,0,0,1-1V8A1,1,0,0,0,22,7ZM19.71,19l-2-2L20,14.71l1,1v2.58l-.71.71Zm-6,0-2-2L14,14.71,16.29,17l-2,2Zm-6,0L7,18.29V15.71l1-1L10.29,17l-2,2ZM7,9.71,7.71,9h.58l2,2L8,13.29l-1-1ZM8.71,14,11,11.71,13.29,14,11,16.29Zm5.58-5,2,2L14,13.29,11.71,11l2-2Zm.42,5L17,11.71,19.29,14,17,16.29Zm5.58-5,.71.71v2.58l-1,1L17.71,11l2-2ZM21,14.29,20.71,14l.29-.29ZM18.29,9,17,10.29,15.71,9Zm-6,0L11,10.29,9.71,9ZM7,13.71l.29.29L7,14.29ZM9.71,19,11,17.71,12.29,19Zm6,0L17,17.71,18.29,19Z"}));case"background-mask":return o().createElement("g",null,o().createElement("path",{d:"M22,7H6A1,1,0,0,0,5,8V20a1,1,0,0,0,1,1H22a1,1,0,0,0,1-1V8A1,1,0,0,0,22,7ZM21,19H7V16.77A8.76,8.76,0,0,0,9,17a9,9,0,0,0,8.94-8H21Z"}));case"swap":return o().createElement("g",null,o().createElement("path",{d:"M19 12h-3V9c0-0.5-0.5-1-1-1H8C7.5 8 7 8.5 7 9v7c0 0.5 0.5 1 1 1h3v3c0 0.5 0.5 1 1 1h7c0.5 0 1-0.5 1-1v-7C20 12.5 19.5 12 19 12zM18 19h-5v-2h2c0.5 0 1-0.5 1-1v-2h2V19z",fillRule:"evenodd"}));case"none":return o().createElement("g",null,o().createElement("path",{d:"M14 24c5.5 0 10-4.5 10-10S19.5 4 14 4 4 8.5 4 14s4.5 10 10 10zm0-17.5c4.1 0 7.5 3.4 7.5 7.5 0 1.5-.5 2.9-1.2 4.1L9.9 7.7c1.2-.7 2.6-1.2 4.1-1.2zM7.7 9.9l10.4 10.4c-1.2.8-2.6 1.2-4.1 1.2-4.1 0-7.5-3.4-7.5-7.5 0-1.5.5-2.9 1.2-4.1z"}));case"animation-bounce":return o().createElement("g",{fillRule:"evenodd"},o().createElement("circle",{cx:"21.5",cy:"8.5",r:"3.5"}),o().createElement("circle",{cx:"16",cy:"12",r:"1.7"}),o().createElement("circle",{cx:"13",cy:"15",r:"1.2"}),o().createElement("circle",{cx:"11",cy:"18",r:"1"}),o().createElement("circle",{cx:"9",cy:"22",r:"1"}),o().createElement("circle",{cx:"7",cy:"19",r:"1"}),o().createElement("circle",{cx:"4",cy:"17",r:"1"}));case"animation-fade":return o().createElement("g",{fillRule:"evenodd"},o().createElement("circle",{cx:"8.5",cy:"19.5",r:"1.5"}),o().createElement("circle",{cx:"8.5",cy:"14.5",r:"1.5"}),o().createElement("circle",{cx:"5",cy:"12",r:"1"}),o().createElement("circle",{cx:"5",cy:"17",r:"1"}),o().createElement("circle",{cx:"8.5",cy:"9.5",r:"1.5"}),o().createElement("path",{d:"M15.7 4c-.4 0-.8.1-1.2.3-.6.3-.5.7-1.5.7-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c.3 0 .5.2.5.5s-.2.5-.5.5c-1.1 0-2 .9-2 2s.9 2 2 2c1 0 .9.4 1.4.7.4.2.8.3 1.2.3 4.3-.4 8.3-5.3 8.3-10.5s-4-10-8.2-10.5z"}));case"animation-flip":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M22 2.4l-7 2.9V7h-2v-.8L7.6 8.7c-.4.2-.6.5-.6.9v8.7c0 .4.2.7.6.9l5.4 2.5V21h2v1.7l7 2.9c.5.2 1-.2 1-.7V3.1c0-.5-.5-.9-1-.7zM15 19h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zM13 2h2v2.5h-2zM13 23.5h2V26h-2z"}));case"animation-fold":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M24 7h-4V3.4c0-.8-.6-1.4-1.3-1.4-.2 0-.5.1-.7.2l-6.5 3.9c-.9.6-1.5 1.6-1.5 2.6V23c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-6 10.5c0 .2-.1.4-.3.5L12 21.5V8.7c0-.4.2-.7.5-.9L18 4.5v13zM6 7h2v2H6zM6 23h2v2H6zM2.6 7.1c-.1 0-.1.1-.2.1v.1l-.1.1-.1.1c-.1.1-.2.3-.2.5v1h2V7H3c-.1 0-.2 0-.4.1zM2 23v1c0 .4.3.8.7.9.1.1.2.1.3.1h1v-2H2zM2 11h2v2H2zM2 19h2v2H2zM2 15h2v2H2z"}));case"animation-none":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M14 24c5.5 0 10-4.5 10-10S19.5 4 14 4 4 8.5 4 14s4.5 10 10 10zm0-17.5c4.1 0 7.5 3.4 7.5 7.5 0 1.5-.5 2.9-1.2 4.1L9.9 7.7c1.2-.7 2.6-1.2 4.1-1.2zM7.7 9.9l10.4 10.4c-1.2.8-2.6 1.2-4.1 1.2-4.1 0-7.5-3.4-7.5-7.5 0-1.5.5-2.9 1.2-4.1z"}));case"animation-roll":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M18.8 5c-5.3-2.7-11.8.2-14 5.6-1.1 2.8-1 6 .2 8.8.4 1 3.9 6.5 5 3.6.5-1.2-1.3-2.2-1.9-3-.8-1.2-1.4-2.5-1.6-3.9-.4-2.7.5-5.5 2.4-7.4 4-4 11.6-2.5 12.6 3.4.4 2.7-.9 5.5-3.4 6.6-2.6 1.1-6 0-6.8-2.8-.7-2.4 1.2-5.7 4-4.8 1.1.3 2 1.5 1.5 2.7-.3.7-1.7 1.2-1.6.1 0-.3.2-.4.2-.8-.1-.4-.5-.6-.9-.6-1.1.1-1.6 1.6-1.3 2.5.3 1.2 1.5 1.9 2.7 1.9 2.9 0 4.2-3.4 3.1-5.7-1.2-2.6-4.6-3.4-7-2.2-2.6 1.3-3.8 4.4-3.1 7.2 1.6 5.9 9.3 6.8 13.1 2.5 3.8-4.2 1.9-11.1-3.2-13.7z"}));case"animation-zoom":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M23.7 4.3c-.1-.1-.2-.2-.3-.2-.1-.1-.3-.1-.4-.1h-5c-.6 0-1 .4-1 1s.4 1 1 1h2.6l-3.1 3.1c-.2-.1-.3-.1-.5-.1h-6c-.2 0-.3 0-.5.1L7.4 6H10c.6 0 1-.4 1-1s-.4-1-1-1H5c-.1 0-.3 0-.4.1-.2.1-.4.3-.5.5-.1.1-.1.3-.1.4v5c0 .6.4 1 1 1s1-.4 1-1V7.4l3.1 3.1c-.1.2-.1.3-.1.5v6c0 .2 0 .3.1.5L6 20.6V18c0-.6-.4-1-1-1s-1 .4-1 1v5c0 .1 0 .3.1.4.1.2.3.4.5.5.1.1.3.1.4.1h5c.6 0 1-.4 1-1s-.4-1-1-1H7.4l3.1-3.1c.2 0 .3.1.5.1h6c.2 0 .3 0 .5-.1l3.1 3.1H18c-.6 0-1 .4-1 1s.4 1 1 1h5c.1 0 .3 0 .4-.1.2-.1.4-.3.5-.5.1-.1.1-.3.1-.4v-5c0-.6-.4-1-1-1s-1 .4-1 1v2.6l-3.1-3.1c0-.2.1-.3.1-.5v-6c0-.2 0-.3-.1-.5L22 7.4V10c0 .6.4 1 1 1s1-.4 1-1V5c0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3z"}));case"animation-slide":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M22 4h-5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h5c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM10 14c0 .6.4 1 1 1h.6L10 16.6c-.4.4-.4 1 0 1.4.4.4 1 .4 1.4 0l3.3-3.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7L11.4 10c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l1.6 1.6H11c-.6 0-1 .4-1 1z"}),o().createElement("circle",{cx:"7",cy:"14",r:"1.5"}),o().createElement("circle",{cx:"3",cy:"14",r:"1"}));case"align-left":return o().createElement("g",null,o().createElement("path",{d:"M5 13h2v2H5zM5 21h2v2H5zM5 17h2v2H5zM5 9h2v2H5zM5 5h2v2H5z"}),o().createElement("path",{d:"M7.339 13.25a1 1 0 0 0 0 1.501l4.642 4.09a.6.6 0 0 0 1.007-.442V16h9a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-9V9.602a.601.601 0 0 0-1.002-.446L7.339 13.25z"}));case"align-center":return o().createElement("g",null,o().createElement("path",{d:"M5 13h2v2H5zM5 9h2v2H5zM5 17h2v2H5zM5 5h2v2H5zM5 21h2v2H5zM21 9h2v2h-2zM21 5h2v2h-2zM21 13h2v2h-2zM15 8h-2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zM21 17h2v2h-2zM21 21h2v2h-2z"}));case"align-right":return o().createElement("g",null,o().createElement("path",{d:"M21 21h2v2h-2zM21 17h2v2h-2zM21 9h2v2h-2zM21 5h2v2h-2zM21 13h2v2h-2z"}),o().createElement("path",{d:"M20.649 13.249l-4.642-4.09A.6.6 0 0 0 15 9.602V12H6a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9v2.398a.601.601 0 0 0 1.002.446l4.647-4.094a1 1 0 0 0 0-1.501z"}));case"click":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M15 10V8c0-.6-.4-1-1-1s-1 .4-1 1v2c0 .3.2.6.4.8.2 0 .5.1.7.2.5-.1.9-.5.9-1zM20 15c.6 0 1-.4 1-1s-.4-1-1-1h-2c-.4 0-.7.2-.9.6l1.6 1.4H20zM10 13H8c-.6 0-1 .4-1 1s.4 1 1 1h2c.6 0 1-.4 1-1s-.4-1-1-1zM9.8 11.2c.2.2.5.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-1-1c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l1 1zM9.8 16.8l-1.1 1.1c-.4.4-.4 1 0 1.4.2.2.5.3.7.3s.5-.1.7-.3l.9-.9v-1.8c-.4-.2-.9-.1-1.2.2zM17.5 11.5c.3 0 .5-.1.7-.3l1-1c.4-.4.4-1 0-1.4s-1-.4-1.4 0l-1 1c-.4.4-.4 1 0 1.4.2.2.4.3.7.3zM13.4 12.9s-.1-.1-.2-.1-.3.1-.3.3v7.4c0 .3.3.6.6.6h.2l1.4-.6.8 2c.2.4.5.6.9.6.1 0 .3 0 .4-.1.5-.2.7-.8.5-1.3l-.8-2 1.9-.8c.3-.1.3-.5.1-.7l-5.5-5.3z",fillRule:"evenodd"}));case"hover":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M17.1 18.1l-5.7-5.2c-.2-.1-.4 0-.4.2v7.4c0 .4.4.7.8.6l1.4-.6.8 2c.2.5.8.7 1.3.5.5-.2.7-.8.5-1.3l-.8-2 1.9-.8c.3-.3.4-.6.2-.8zM20 10c-.6 0-1-.4-1-1-.6 0-1-.4-1-1s.4-1 1-1c1.1 0 2 .9 2 2 0 .6-.4 1-1 1zM8 10c-.6 0-1-.4-1-1 0-1.1.9-2 2-2 .6 0 1 .4 1 1s-.4 1-1 1c0 .6-.4 1-1 1zM9 20c-1.1 0-2-.9-2-2 0-.6.4-1 1-1s1 .4 1 1c.6 0 1 .4 1 1s-.4 1-1 1zM19 20c-.6 0-1-.4-1-1s.4-1 1-1c0-.6.4-1 1-1s1 .4 1 1c0 1.1-.9 2-2 2zM14.8 9h-1.5c-.6 0-1-.4-1-1s.4-1 1-1h1.5c.6 0 1 .4 1 1s-.5 1-1 1zM20 15c-.6 0-1-.4-1-1v-1c0-.6.4-1 1-1s1 .4 1 1v1c0 .6-.4 1-1 1zM8 15c-.6 0-1-.4-1-1v-1c0-.6.4-1 1-1s1 .4 1 1v1c0 .6-.4 1-1 1z",fillRule:"evenodd"}));case"menu-expand":return o().createElement("g",{fillRule:"evenodd"},o().createElement("path",{d:"M14 20l-3-5h6zM14 8l3 5h-6z",fillRule:"evenodd"}));case"border-all":return o().createElement("g",null,o().createElement("path",{d:"M22 5H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zm-2 15H8V8h12z"}));case"border-top":return o().createElement("g",null,o().createElement("path",{d:"M17 21h2v2h-2zM5 9h2v2H5zM21 17h2v2h-2zM21 9h2v2h-2zM21 13h2v2h-2zM21 23h1a1 1 0 0 0 1-1v-1h-2zM5 17h2v2H5zM5 13h2v2H5zM13 21h2v2h-2zM9 21h2v2H9zM5 21v1a1 1 0 0 0 1 1h1v-2zM22 5H6a1 1 0 0 0-1 1v2h18V6a1 1 0 0 0-1-1z"}));case"border-right":return o().createElement("g",null,o().createElement("path",{d:"M13 5h2v2h-2zM5 9h2v2H5zM9 5h2v2H9zM7 5H6a1 1 0 0 0-1 1v1h2zM5 13h2v2H5zM13 21h2v2h-2zM5 17h2v2H5zM9 21h2v2H9zM17 5h2v2h-2zM5 21v1a1 1 0 0 0 1 1h1v-2zM22 5h-2v18h2a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zM17 21h2v2h-2z"}));case"border-bottom":return o().createElement("g",null,o().createElement("path",{d:"M9 5h2v2H9zM7 20H5v2a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-2H7zM17 5h2v2h-2zM5 13h2v2H5zM5 9h2v2H5zM13 5h2v2h-2zM5 17h2v2H5zM21 9h2v2h-2zM21 17h2v2h-2zM22 5h-1v2h2V6a1 1 0 0 0-1-1zM21 13h2v2h-2zM7 5H6a1 1 0 0 0-1 1v1h2z"}));case"border-left":return o().createElement("g",null,o().createElement("path",{d:"M22 5h-1v2h2V6a1 1 0 0 0-1-1zM9 21h2v2H9zM21 17h2v2h-2zM13 21h2v2h-2zM21 13h2v2h-2zM9 5h2v2H9zM17 21h2v2h-2zM17 5h2v2h-2zM21 9h2v2h-2zM8 7V5H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h2V7zM21 23h1a1 1 0 0 0 1-1v-1h-2zM13 5h2v2h-2z"}));case"border-link":return o().createElement("g",null,o().createElement("path",{d:"M14.71 17.71a3 3 0 0 1-2.12-.88l-.71-.71a1 1 0 0 1 1.41-1.41l.71.71a1 1 0 0 0 1.41 0l5-4.95a1 1 0 0 0 0-1.41l-1.46-1.42a1 1 0 0 0-1.41 0L16.1 9.07a1 1 0 0 1-1.41-1.41l1.43-1.43a3.07 3.07 0 0 1 4.24 0l1.41 1.41a3 3 0 0 1 0 4.24l-5 4.95a3 3 0 0 1-2.06.88z"}),o().createElement("path",{d:"M9.76 22.66a3 3 0 0 1-2.12-.88l-1.42-1.42a3 3 0 0 1 0-4.24l5-4.95a3.07 3.07 0 0 1 4.24 0l.71.71a1 1 0 0 1-1.41 1.41l-.76-.7a1 1 0 0 0-1.41 0l-5 4.95a1 1 0 0 0 0 1.41L9 20.36a1 1 0 0 0 1.41 0L11.82 19a1 1 0 0 1 1.41 1.41l-1.36 1.36a3 3 0 0 1-2.11.89z"}));case"window-undock":return o().createElement("g",null,o().createElement("path",{d:"M9 10H8a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0 1 1 0 0 0 0-2zM13 19h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2zM9 19a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1h1a1 1 0 0 0 0-2zM20 7h-8a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zm-1 2v6h-6V9zM17 18a1 1 0 0 0-1 1 1 1 0 0 0 0 2h1a1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1zM8 17a1 1 0 0 0 1-1v-1a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1z"}));case"chevron-right":return o().createElement("g",null,o().createElement("path",{d:"M13.38 19.48l4.6-4.6a1.25 1.25 0 0 0 0-1.77l-4.6-4.6a1.25 1.25 0 1 0-1.77 1.77L15.32 14l-3.71 3.71a1.25 1.25 0 1 0 1.77 1.77z",fillRule:"evenodd"}));case"chevron-left":return o().createElement("g",null,o().createElement("path",{d:"M14.62 8.52L10 13.12a1.25 1.25 0 0 0 0 1.77l4.6 4.6a1.25 1.25 0 0 0 1.77-1.77L12.68 14l3.71-3.71a1.25 1.25 0 1 0-1.77-1.77z",fillRule:"evenodd"}));case"chevron-up":return o().createElement("g",null,o().createElement("path",{d:"M20 14.62L15.38 10a1.25 1.25 0 0 0-1.77 0L9 14.62a1.25 1.25 0 0 0 1.77 1.77l3.71-3.71 3.71 3.71A1.25 1.25 0 1 0 20 14.62z",fillRule:"evenodd"}));case"chevron-down":return o().createElement("g",null,o().createElement("path",{d:"M19.98 11.616a1.25 1.25 0 0 0-1.768 0L14.5 15.328l-3.712-3.712a1.25 1.25 0 0 0-1.768 1.768l4.596 4.596a1.25 1.25 0 0 0 1.768 0l4.596-4.596a1.25 1.25 0 0 0 0-1.768z",fillRule:"evenodd"}));case"flip-horizontally":return o().createElement("g",null,o().createElement("path",{d:"M22 8.229a.995.995 0 0 0-.665.253L15 14.122l6.348 5.458A1 1 0 0 0 23 18.822V9.229a1 1 0 0 0-1-1zM7 11.458l2.963 2.638L7 16.643v-5.185M6 8.229a.996.996 0 0 0-1 1v9.592a1 1 0 0 0 1.652.758L13 14.122l-6.335-5.64A1 1 0 0 0 6 8.229zM13 5h2v2h-2zM13 9h2v2h-2zM13 13h2v2h-2zM13 17h2v2h-2zM13 21h2v2h-2z",fillRule:"evenodd"}));case"flip-vertically":return o().createElement("g",null,o().createElement("path",{d:"M13.878 15L8.42 21.348A1 1 0 0 0 9.178 23h9.592a1 1 0 0 0 .747-1.665L13.878 15zM16.542 7l-2.638 2.963L11.357 7h5.185m2.229-2H9.178a1 1 0 0 0-.758 1.652L13.878 13l5.64-6.335A1 1 0 0 0 18.771 5zM5 13h2v2H5zM9 13h2v2H9zM13 13h2v2h-2zM17 13h2v2h-2zM21 13h2v2h-2z",fillRule:"evenodd"}));case"invert":return o().createElement("g",null,o().createElement("path",{d:"m19.469855,14c0,-3.063118 -2.406736,-5.469854 -5.469854,-5.469854l0,10.939709c3.063118,0 5.469854,-2.406736 5.469854,-5.469854zm2.187942,-9.845738l-15.315592,0c-1.203368,0 -2.187942,0.984574 -2.187942,2.187942l0,15.315592c0,1.203368 0.984574,2.187942 2.187942,2.187942l15.315592,0c1.203368,0 2.187942,-0.984574 2.187942,-2.187942l0,-15.315592c0,-1.203368 -0.984574,-2.187942 -2.187942,-2.187942zm0,17.503534l-7.657796,0l0,-2.187942c-3.063118,0 -5.469854,-2.406736 -5.469854,-5.469854c0,-3.063118 2.406736,-5.469854 5.469854,-5.469854l0,-2.187942l7.657796,0l0,15.315592z"}));case"aspect-ratio-landscape":return o().createElement("g",null,o().createElement("rect",{x:"2",y:"6",width:"24",height:"16",rx:"2"}));case"aspect-ratio-square":return o().createElement("g",null,o().createElement("rect",{x:"6",y:"6",width:"16",height:"16",rx:"2"}));case"aspect-ratio-portrait":return o().createElement("g",null,o().createElement("rect",{x:"6",y:"2",width:"16",height:"24",rx:"2"}));case"eye":return o().createElement("g",null,o().createElement("path",{d:"M14,16a2,2,0,1,1,2-2A2,2,0,0,1,14,16Zm0,2a6.24,6.24,0,0,0,5.91-4A6.35,6.35,0,0,0,8.09,14,6.24,6.24,0,0,0,14,18ZM14,8a8.22,8.22,0,0,1,8,6A8.33,8.33,0,0,1,6,14,8.22,8.22,0,0,1,14,8Z"}));case"closed-eye":return o().createElement("g",null,o().createElement("path",{d:"M9.89,16.69l2.18-2.17A1.81,1.81,0,0,1,12,14a2,2,0,0,1,2-2,1.81,1.81,0,0,1,.52.07l1.67-1.68A6.43,6.43,0,0,0,14,10a6.3,6.3,0,0,0-5.91,4.1A6.28,6.28,0,0,0,9.89,16.69ZM12.37,20l1.85-1.84a6.24,6.24,0,0,0,5.69-4.1A6.24,6.24,0,0,0,19.39,13l1.45-1.45A8.41,8.41,0,0,1,22,14.1a8.3,8.3,0,0,1-8,6.1A8.83,8.83,0,0,1,12.37,20Zm-2.1-.73-.11,0L8.34,21.07,6.93,19.66,8.48,18.1A8.36,8.36,0,0,1,6,14.1,8.24,8.24,0,0,1,14,8a8.11,8.11,0,0,1,3.72.87l1.94-1.94,1.41,1.41L19.42,10l.09.08L18.08,11.5,18,11.42l-2.06,2.06a.7.7,0,0,1,0,.14L13.62,16a.7.7,0,0,1-.14,0l-1.83,1.83.13,0Z"}));case"linked":return o().createElement("g",null,o().createElement("path",{d:"M8 14a1 1 0 0 1 0 2h-.5A2.5 2.5 0 0 1 5 13.5v-2A2.5 2.5 0 0 1 7.5 9h8a2.5 2.5 0 0 1 2.5 2.5v2a2.5 2.5 0 0 1-2.5 2.5H15a1 1 0 0 1 0-2h.5a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5z",fillRule:"evenodd"}),o().createElement("path",{d:"M20 14a1 1 0 0 1 0-2h.5a2.5 2.5 0 0 1 2.5 2.5v2a2.5 2.5 0 0 1-2.5 2.5h-8a2.5 2.5 0 0 1-2.5-2.5v-2a2.5 2.5 0 0 1 2.5-2.5h.5a1 1 0 0 1 0 2h-.5a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5z",fillRule:"evenodd"}));case"unlinked":return o().createElement("g",null,o().createElement("path",{d:"M16.75 9.14a1 1 0 0 1 .37 1.39l-4.5 8a1 1 0 0 1-1.37.37 1 1 0 0 1-.37-1.39l4.5-8a1 1 0 0 1 1.37-.37zM19.71 10H20a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3h-4.81l1.13-2H20a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1.42zM12.81 10l-1.13 2H8a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h1.42l-1.13 2H8a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3z",fillRule:"evenodd"}));case"app-setting":return o().createElement("g",null,o().createElement("path",{d:"M2.001 4.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"}));case"expand-palette":return o().createElement("g",null,o().createElement("circle",{cx:"14",cy:"20",r:"2"}),o().createElement("circle",{cx:"14",cy:"13",r:"2"}),o().createElement("circle",{cx:"14",cy:"6",r:"2"}));case"paint-brush":return o().createElement("g",null,o().createElement("path",{d:"M12.635 16.21c-.907-.787.159-3.439 2.38-5.92 2.22-2.482 4.756-3.855 5.663-3.068s-.16 3.44-2.38 5.922c-2.223 2.482-4.757 3.854-5.663 3.066zm.254 2.022a2.133 2.133 0 0 1-.7 1.718c-1.458 1.446-3.712 1.274-4.9.242a.84.84 0 0 1-.287-.576.844.844 0 0 1 .796-.89h.01c.077.001.553-.008.716-.513.009-.123.026-.242.054-.36a2.182 2.182 0 0 1 1.988-1.639c1.208-.073 2.247.83 2.323 2.018z",fillRule:"evenodd"}));case"dynamic":return o().createElement("g",null,o().createElement("path",{d:"M14 13c3.87 0 7-1.34 7-3s-3.13-3-7-3-7 1.34-7 3 3.13 3 7 3zM9.72 9.44A11.35 11.35 0 0 1 14 8.7a11.35 11.35 0 0 1 4.28.74 3.26 3.26 0 0 1 .93.56 3.26 3.26 0 0 1-.93.56 11.35 11.35 0 0 1-4.28.74 11.35 11.35 0 0 1-4.28-.74 3.26 3.26 0 0 1-.93-.56 3.26 3.26 0 0 1 .93-.56zM14 19a11.06 11.06 0 0 1-4.16-.72l-.16-.08a9.17 9.17 0 0 1-2.41-1A1.48 1.48 0 0 0 7 18c0 1.66 3.13 3 7 3a15.86 15.86 0 0 0 1.9-.11 5 5 0 0 1-.81-1.89H14zM9.84 14.28l-.16-.08a9.17 9.17 0 0 1-2.41-1A1.48 1.48 0 0 0 7 14c0 1.66 3.13 3 7 3h1.14a4.22 4.22 0 0 1 1-2 3.29 3.29 0 0 1 .26-.23A13.27 13.27 0 0 1 14 15a11.06 11.06 0 0 1-4.16-.72zM21 17v-2h-2v2h-2v2h2v2h2v-2h2v-2h-2z",fillRule:"evenodd"}));case"search":return o().createElement("g",null,o().createElement("path",{d:"M12.13,5a4.88,4.88,0,0,0-4.18,7.39L5.23,15.11a.78.78,0,0,0,0,1.11l.55.55a.78.78,0,0,0,1.11,0l2.72-2.72A4.88,4.88,0,1,0,12.13,5Zm0,7.75A2.88,2.88,0,1,1,15,9.88,2.87,2.87,0,0,1,12.13,12.75Z"}));case"skew":return o().createElement("g",null,o().createElement("path",{d:"M23.28 7H12.16a2 2 0 0 0-1.74 1L3.85 19.5a1 1 0 0 0 .87 1.5h11.12a2 2 0 0 0 1.74-1l6.57-11.5a1 1 0 0 0-.87-1.5zm-7.69 12H6.7l5.71-10h8.89z",fillRule:"evenodd"}));case"rotate":return o().createElement("g",null,o().createElement("path",{d:"M19.66 10.73a1.15 1.15 0 0 0-.48 1.55A5.85 5.85 0 1 1 14 9.15v2.54a.5.5 0 0 0 .85.35l3.36-3.37a1 1 0 0 0 0-1.41L14.85 3.9a.5.5 0 0 0-.85.35v2.6a8.15 8.15 0 1 0 7.22 4.36 1.15 1.15 0 0 0-1.56-.48z",fillRule:"evenodd"}));case"transform-origin":return o().createElement("g",null,o().createElement("path",{d:"M24 7V5a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1h-4a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1H8a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v4a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1h4a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1h4a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1v-4a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1V8a1 1 0 0 0 1-1zm-3 5a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1v4a1 1 0 0 0-1 1h-4a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1H8a1 1 0 0 0-1-1v-4a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1V8a1 1 0 0 0 1-1h4a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1h4a1 1 0 0 0 1 1z",fillRule:"evenodd"}),o().createElement("path",{d:"M16 13v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1z",fillRule:"evenodd"}));case"divi-logo":return o().createElement("g",null,o().createElement("path",{d:"M15.764 10c0.864 0 1.624 0.142 2.258 0.42 0.626 0.276 1.156 0.664 1.578 1.152 0.444 0.514 0.788 1.14 1.024 1.86 0.25 0.758 0.376 1.614 0.376 2.542 0 0.916-0.124 1.766-0.366 2.528-0.232 0.724-0.57 1.354-1.006 1.874-0.418 0.498-0.952 0.896-1.584 1.186-0.638 0.29-1.404 0.438-2.28 0.438h-2.764v-12h2.764zM15.764 8h-3.764c-0.552 0-1 0.448-1 1v14c0 0.55 0.45 1 1 1h3.764c1.162 0 2.208-0.208 3.11-0.62 0.904-0.414 1.672-0.99 2.284-1.718 0.606-0.72 1.070-1.58 1.38-2.552 0.306-0.96 0.462-2.014 0.462-3.136 0-1.142-0.16-2.206-0.476-3.166-0.32-0.972-0.794-1.826-1.41-2.542-0.62-0.716-1.388-1.28-2.284-1.676-0.89-0.39-1.922-0.59-3.066-0.59v0z",fillRule:"evenodd"}),o().createElement("path",{d:"M16 2c7.72 0 14 6.28 14 14s-6.28 14-14 14-14-6.28-14-14 6.28-14 14-14zM16 0c-8.836 0-16 7.164-16 16s7.164 16 16 16 16-7.164 16-16-7.164-16-16-16v0z",fillRule:"evenodd"}));case"global-presets-open":return o().createElement("g",null,o().createElement("path",{d:"M20.42 18.77h-.08c-1.75-.73-2.51-2.47-3.88-2.47s-2.11.53-2.88.43-.73-.91-1.28-1.37-.46-.31-1.49-.7-.24-2.3.48-2 1.31-.32 1.52.23.7 1.3.65.58a2.4 2.4 0 0 1 .79-2c.6-.56.1-.65.22-1.54s2.21.5 2.21-.32.36-.72 1-1.39.37-.88-.22-1.46a8 8 0 0 1 3.32 2.91c-1 .17-1.42.81-2 1.92-1 2 1.47 3.14 2.81 4l.24.12a8.08 8.08 0 0 1-1.41 3.06zM14 22a8 8 0 0 1-7.66-10.26 6.92 6.92 0 0 0 1 1.38c1 1.09.89 1.27.89 1.27.57 1.66 3.27.86 3.62 2.08s1.33.86.91 2.43a2.72 2.72 0 0 0 1.48 3.1zm0-18a10 10 0 1 0 10 10A10 10 0 0 0 14 4z"}));case"global-presets-return":return o().createElement("g",null,o().createElement("path",{d:"M17.69 16a7.15 7.15 0 0 0 .6-4.46l2.22-.77a.93.93 0 0 0-.43-1.24l-3.71-1.86a.93.93 0 0 0-1.25.42l-1.87 3.83a1 1 0 0 0 .43 1.25l1.86-.74a4.23 4.23 0 0 1-.38 2.35c-.89 1.89-3.16 3.16-5.05 2.22-1.23-.6-4.89 1.2-.93 2.65A6.85 6.85 0 0 0 17.69 16z"}));case"responsive-orientation-portrait":return o().createElement("g",null,o().createElement("path",{className:"opacity-half",d:"M21,14H7a2,2,0,0,0-2,2v5a2,2,0,0,0,2,2H21a2,2,0,0,0,2-2V16A2,2,0,0,0,21,14Zm0,7H7V16H21Z"}),o().createElement("path",{d:"M12,5H7A2,2,0,0,0,5,7V21a2,2,0,0,0,2,2h5a2,2,0,0,0,2-2V7A2,2,0,0,0,12,5Zm0,16H7V7h5ZM22.94,9.75a.75.75,0,0,1-.22.53l-2.19,2.19a.75.75,0,0,1-1.06,0l-2.19-2.19A.75.75,0,0,1,17.81,9H19a2,2,0,0,0-2-2,1,1,0,0,1,0-2,4,4,0,0,1,4,4h1.19A.76.76,0,0,1,22.94,9.75Z"}));case"responsive-orientation-landscape":return o().createElement("g",null,o().createElement("path",{className:"opacity-half",d:"M7,7V21h5V7ZM7,5h5a2,2,0,0,1,2,2V21a2,2,0,0,1-2,2H7a2,2,0,0,1-2-2V7A2,2,0,0,1,7,5Z"}),o().createElement("path",{d:"M7,16v5H21V16Zm0-2H21a2,2,0,0,1,2,2v5a2,2,0,0,1-2,2H7a2,2,0,0,1-2-2V16A2,2,0,0,1,7,14Zm16-3a1,1,0,0,1-2,0,2,2,0,0,0-2-2v1.19a.75.75,0,0,1-1.28.53L15.53,8.53a.75.75,0,0,1,0-1.06l2.19-2.19A.75.75,0,0,1,19,5.81V7A4,4,0,0,1,23,11Z"}));case"pencil":return o().createElement("g",null,o().createElement("path",{transform:"scale(-1, 1) translate(-28, 0)",d:"M10.64,13.07l2.43-2.43,6.73,6.73L21,21l-3.63-1.2ZM7.52,7.52a1.78,1.78,0,0,1,2.51,0l1.21,1.26L8.73,11.29,7.52,10A1.78,1.78,0,0,1,7.52,7.52Z"}));case"blur":return o().createElement("g",null,o().createElement("path",{d:"M14.37,6.4a.51.51,0,0,0-.74,0Q8,12.64,8,15.9c0,3.37,2,6.1,6,6.1s6-2.73,6-6.1Q20,12.65,14.37,6.4ZM14,20c-3.61,0-4-2.86-4-4.1,0-.69.42-2.66,4-6.88,3.58,4.22,4,6.19,4,6.88C18,17.14,17.61,20,14,20Z"}));case"horizontal-motion":return o().createElement("g",null,o().createElement("path",{d:"M22.8,17.5a.56.56,0,0,1,0,.9l-3.5,2.1c-.4.2-.8,0-.8-.4V19H10a1,1,0,0,1,0-2h8.5V15.8a.52.52,0,0,1,.8-.4ZM19,10a.94.94,0,0,1-1,1H9.5v1.2a.52.52,0,0,1-.8.4L5.2,10.5a.56.56,0,0,1,0-.9L8.7,7.5c.4-.2.8,0,.8.4V9H18A.94.94,0,0,1,19,10Z"}));case"vertical-motion":return o().createElement("g",null,o().createElement("path",{d:"M17.5,5.2a.56.56,0,0,1,.9,0l2.1,3.5c.2.4,0,.8-.4.8H19V18a1,1,0,0,1-2,0V9.5H15.8a.52.52,0,0,1-.4-.8ZM10,9a.94.94,0,0,1,1,1v8.5h1.2a.52.52,0,0,1,.4.8l-2.1,3.5a.56.56,0,0,1-.9,0L7.5,19.3c-.2-.4,0-.8.4-.8H9V10A.94.94,0,0,1,10,9Z"}));case"cursor":return o().createElement("g",null,o().createElement("path",{d:"M11.8,7.1c0.2,0,0.5,0.1,0.6,0.3l6.4,7.8c0.2,0.2,0.2,0.6-0.1,0.8c0,0-0.1,0.1-0.1,0.1L16.4,17l1.5,3.6 c0.2,0.6,0,1.3-0.6,1.5c-0.5,0.2-1.2,0-1.5-0.5l-0.1-0.1l-1.5-3.6l-2.5,1c-0.3,0.1-0.6,0-0.8-0.3c0-0.1-0.1-0.2-0.1-0.2V7.9 C11,7.5,11.4,7.1,11.8,7.1z"}));case"pin":return o().createElement("g",null,o().createElement("path",{d:"M17,13.3c1.2,0.3,2,0.7,2,1.2c0,0.7-1.7,1.3-4,1.5v3l-1,2l-1-2v-3c-2.3-0.1-4-0.7-4-1.5c0-0.5,0.8-0.9,2-1.2V9.7 C9.8,9.4,9,9,9,8.5C9,7.7,11.2,7,14,7s5,0.7,5,1.5c0,0.5-0.8,0.9-2,1.2V13.3z"}));case"caret-down":case"caret-left":case"caret-right":case"caret-up":return o().createElement("g",null,o().createElement("path",{d:"M13.4,16.66,10.13,12a.71.71,0,0,1-.09-.65.49.49,0,0,1,.44-.36h7a.49.49,0,0,1,.44.36.72.72,0,0,1-.08.64L14.6,16.66a.7.7,0,0,1-1.2,0Z"}));case"overflow":return o().createElement("g",null,o().createElement("path",{d:"M6,9.5A1.5,1.5,0,1,1,7.5,11,1.5,1.5,0,0,1,6,9.5ZM7.5,16A1.5,1.5,0,1,0,6,14.5,1.5,1.5,0,0,0,7.5,16Zm0,5A1.5,1.5,0,1,0,6,19.5,1.5,1.5,0,0,0,7.5,21Z"}));case"layers-view":return o().createElement("g",null,o().createElement("path",{d:"M19.89,15.66,19,15.13l-4.48,2.69a1,1,0,0,1-1,0L9,15.13l-.88.53a.39.39,0,0,0,0,.68l5.37,3.23a1,1,0,0,0,1,0l5.37-3.23A.39.39,0,0,0,19.89,15.66Z"}),o().createElement("path",{d:"M13.49,15.57a1,1,0,0,0,1,0l5.37-3.23a.4.4,0,0,0,0-.68L14.51,8.43a1,1,0,0,0-1,0L8.11,11.66a.4.4,0,0,0,0,.68ZM14,9.87,17.54,12,14,14.13,10.46,12Z"}));case"update-with-current-styles":return o().createElement("g",null,o().createElement("path",{d:"M18.55,8a.93.93,0,0,1,.28.28L21,11.45a1,1,0,0,1-.27,1.38,1,1,0,0,1-.56.17H19v7a1,1,0,0,1-.88,1H10a1,1,0,0,1-1-.88V10a1,1,0,0,1,2-.12V19h6V13H15.87a1,1,0,0,1-1-1,1,1,0,0,1,.17-.55l2.13-3.2A1,1,0,0,1,18.55,8Z"}));case"star":return o().createElement("g",null,o().createElement("path",{d:"M20.46,12.07l-3.82-.56a.55.55,0,0,1-.42-.3l-1.71-3.4a.56.56,0,0,0-1,0l-1.74,3.4a.53.53,0,0,1-.42.3l-3.81.56a.56.56,0,0,0-.31,1L10,15.62a.56.56,0,0,1,.17.5L9.5,19.84a.56.56,0,0,0,.8.6L14,18.55h0l3.69,1.89a.55.55,0,0,0,.8-.59l-.63-3.73a.56.56,0,0,1,.17-.5L20.77,13A.56.56,0,0,0,20.46,12.07Z"}));default:return!1}}},{key:"render",value:function(){var e=this.props,t=e.block,r=e.children,n=e.className,i=e.color,a=e.icon,l=e.iconSvg,s=e.size,f=e.viewBox;if(!a&&!l)return!1;var d={fill:i,width:2*s,minWidth:2*s,height:2*s,margin:-(s-8)};switch(a){case"caret-left":d=c()(d,{transform:"rotate(90deg)"});break;case"caret-right":d=c()(d,{transform:"rotate(-90deg)"});break;case"caret-up":d=c()(d,{transform:"rotate(180deg)"})}var p=a?"et-fb-icon--".concat(a):"et-fb-icon--svg",h=u()({"et-fb-icon":!0,"et-fb-icon--block":t},p,n);if(l)return o().createElement("div",{className:h,style:c()(d,this.props.style),dangerouslySetInnerHTML:{__html:l}});var m=this._renderGraphics();return m||(d={}),o().createElement("div",{className:h,style:c()(d,this.props.style)},m?o().createElement("svg",{viewBox:f,preserveAspectRatio:"xMidYMid meet",shapeRendering:"geometricPrecision"},m):r)}}])&&d(t.prototype,r),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);v.defaultProps={color:"#4c5866",size:14,viewBox:"0 0 28 28"},v.propTypes={className:a().string,color:a().string,block:a().bool,icon:a().string,iconSvg:a().string,size:a().oneOfType([a().string,a().number]),style:a().object,viewBox:a().string};const g=v},2428:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i);function l(e){var t=e.className,r=void 0===t?"":t;return o().createElement("div",{className:a()("et-common-app-spinner-block",r),"data-testid":"Spinner"},o().createElement("div",{className:"et-common-app-spinner-block__spinner"}))}const u=o().memo(l)},52981:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={black:"#000000",white:"#FFFFFF",default:"#F1F5F9",checkMark:"#37C4AA",success:"#29C4A9",successAlt:"#70C3A9",primary:"#6C2EB9",primaryAlt:"#7D3BCF",info:"#2B87DA",infoAlt:"#00B9DC",danger:"#EF5555",dangerAlt:"#EB3D00",inverse:"#4C5866",warning:"#FF9232",warningAlt:"#F3CB57",globalitem:"#97d000",optionTabIcon:"#BEC9D5",activeTabIcon:"#2B96E1",abTestingTimeFilter:"#A1A9B2",disabledSubject:"#E1E4EA",inactiveGrey:"#BEC9D6",shuttleGrey:"#5C6978",fiord:"#3E5062",uploadImagePreview:"#333B44",bfbPreviewActive:"#5C6979",bfbPreview:"#9FA5AC",enabledDeviceIcon:"#42E1A7",disabledDeviceIcon:"#EF5555",coreModalButtonBlue:"#008BDA",historyActiveButton:"#99CF02",uiActiveIcon:"#4191DE",uiInactiveIcon:"#bec9d6",moduleItemControlIcons:"#737e89",selectPositionGray:"#E6ECF2",cadetBlue:"#A2B0C1",layerBackground:"#f0f5f9",activeCloud:"#0088E1",activeFav:"#FF454E",button:"#a3b0c2"}},42057:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===s(i)?i:String(i)),n)}var o,i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p(e);if(t){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(a,e);var t,r,n,i=d(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.alt,r=e.block,n=e.children,i=e.className,a=e.danger,l=e.elevate,s=e.info,c=e.inverse,f=e.onClick,d=e.primary,p=e.style,h=e.success,m=e.vertical,v=e.warning,g=u()({"et-common-button-group":!0,"et-common-button-group--block":r,"et-common-button-group--danger":a,"et-common-button-group--elevate":l,"et-common-button-group--info":s,"et-common-button-group--inverse":c,"et-common-button-group--primary":d,"et-common-button-group--primary-alt":d&&t,"et-common-button-group--success":h,"et-common-button-group--vertical":m,"et-common-button-group--warning":v},i);return o().createElement("div",{className:g,style:p,onClick:f},n)}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);h.propTypes={alt:a().bool,block:a().bool,children:a().node,className:a().string,danger:a().bool,elevate:a().bool,info:a().bool,inverse:a().bool,onClick:a().func,primary:a().bool,style:a().object,success:a().bool,vertical:a().bool,warning:a().bool};const m=h},30911:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(24911),u=r.n(l),s=r(6057),c=r.n(s);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===f(i)?i:String(i)),n)}var o,i}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m(e);if(t){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var v={width:"200%",height:"200%",top:"-50%",left:"-50%"};const g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(a,e);var t,r,n,i=h(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){return o().createElement(c(),{radius:150,duration:1200,background:!1,options:{background:!1},style:v})}}])&&d(t.prototype,r),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var b=["tip","ripple","className","children","forwardedRef"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w.apply(this,arguments)}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e,t,r){return(t=O(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O(n.key),n)}}function O(e){var t=function(e,t){if("object"!==y(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===y(t)?t:String(t)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(a,e);var t,r,n,i=C(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.ripple,n=e.className,i=e.children,a=e.forwardedRef,l=S(e,b),u=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({type:"button",className:"et-common-button ".concat(n)},l);return""!==t&&(u["data-tip"]=t),o().createElement("button",w({ref:a},u),i,r&&o().createElement(g,null))}}],r&&k(t.prototype,r),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);P.propTypes={tip:a().string,ripple:a().bool,className:a().string,forwardedRef:a().func},P.defaultProps={tip:"",ripple:!0,className:"",forwardedRef:u()};var L=o().forwardRef((function(e,t){return o().createElement(P,w({},e,{forwardedRef:t}))}));L.displayName="Button";const M=L},59353:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>he});var n=r(78743),o=r(87363),i=r.n(o),a=r(31193),l=r.n(a),u=r(90418),s=r.n(u),c=r(47606),f=r.n(c),d=r(22211),p=r.n(d),h=r(88546),m=r.n(h),v=r(33708),g=r.n(v),y=r(62952),b=r.n(y),w=r(45961),_=r.n(w),x=r(11587),S=r.n(x),k=r(38925),O=r.n(k),E=r(48232),C=r.n(E),j=r(26810),P=r.n(j),L=r(94480),M=r.n(L),A=(r(32384),r(77530),r(80372),r(86728),r(94491),r(45812),r(61413),r(69805),r(87437),r(35930),r(79546),r(41863),r(49427),r(31528),r(1691),r(36283),r(41347),r(47886)),T=r.n(A),I=r(8961),R=r.n(I),N=r(74436);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==D(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===D(i)?i:String(i)),n)}var o,i}var F={"known-properties":1,"duplicate-properties":1},B={coverGutter:!1,noHScroll:!0},H=function(e){var t=e.message,r=e.line,n=e.type;return{description:t.replace(/ \w+ \w+ \d+, \w+ \d+\.$/,"."),line:r,type:n}},U=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mode=t,this.editor=r,this.delay=n,this.timer=0,this.lineWidgets=[],this.doLint=this.doLint.bind(this),this.removeLineWidget=this.removeLineWidget.bind(this),this.showErrors=this.showErrors.bind(this),this.showError=this.showError.bind(this)}var t,r,n;return t=e,r=[{key:"lint",value:function(e){clearTimeout(this.timer);var t=p()(e)?this.delay:e;0===t?this.doLint():this.timer=setTimeout(this.doLint,t)}},{key:"doLint",value:function(){this.editor&&this.editor.operation(this.showErrors)}},{key:"getErrors",value:function(){var e,t=this.editor.getValue();if("css"===this.mode.name){var r=this.mode.inline?"p {".concat(t,"}"):t,n=N.u.verify(r,F).messages;e=T()(n,R()).map(H)}else e=[];return e}},{key:"removeLineWidget",value:function(e){this.editor.removeLineWidget(e)}},{key:"showError",value:function(e){var t=this.editor,r=e.description,n=e.line,o=e.type,i=document.createElement("div");return i.appendChild(document.createTextNode("".concat(r))),i.className="codemirror-lint-".concat(o),t.addLineWidget(n-1,i,B)}},{key:"showErrors",value:function(){s()(this.lineWidgets)||C()(this.lineWidgets,this.removeLineWidget);var e=this.getErrors();s()(e)?this.lineWidgets=[]:this.lineWidgets=e.map(this.showError)}},{key:"destroy",value:function(){clearTimeout(this.timer),this.editor=!1}}],r&&z(t.prototype,r),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const W=U;function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){G(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function G(e,t,r){return(t=te(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Q(e);if(t){var o=Q(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $(e)}(this,r)}}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,te(n.key),n)}}function ee(e,t,r){return t&&J(e.prototype,t),r&&J(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function te(e){var t=function(e,t){if("object"!==Z(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Z(t)?t:String(t)}var re=100,ne=500,oe=2e3,ie={common:{keyMap:"sublime",autofocus:!1,cursorBlinkRate:0,viewportMargin:1/0,theme:"et",styleActiveLine:!0,matchBrackets:!0,autoCloseBrackets:!0,autoCloseTags:!0,lineWrapping:!0,lineNumbers:!0,indentUnit:2,tabSize:2},modes:{css:{mode:{name:"css",inline:!0},colorpicker:{mode:"edit"},lineBreakPlaceholder:/\|\||<!-- \[et_pb_line_break_holder\] -->/},html:{mode:{name:"htmlmixed"},colorpicker:{mode:"edit"},matchTags:{bothTags:!0},lineBreakPlaceholder:/<!-- \[et_pb_line_break_holder\] -->/}}},ae={line:0,ch:0},le={ignoreKeys:[13,37,39],prefix:{css:/[A-z-]/,default:/[A-z]/},tokens:{xml:["attribute","tag"]}},ue=function(e){var t=b()(e,e.is_fb_content?"content":"value");return t===e.default?"":t},se=function(e){e.hideCompletion(),e.hideColorPicker()},ce=new(function(){function e(){X(this,e),this.instances=[],this.listener=!1,this.$window=jQuery(window),this.onScroll=this.onScroll.bind(this)}return ee(e,[{key:"add",value:function(e){this.instances.push(e),this.check()}},{key:"remove",value:function(e){P()(this.instances,e),this.check()}},{key:"onScroll",value:function(){C()(this.instances,se)}},{key:"check",value:function(){this.instances.length>0?this.listener||(this.$window.on("wheel scroll",this.onScroll),this.listener=!0):this.listener&&(this.$window.off("wheel scroll",this.onScroll),this.listener=!1)}}]),e}()),fe=0;function de(e){var t=this,r=e.lineNo,n=e.ch,o=e.nameColor,i=e.color;if(this.colorpicker){var a=i,l=this.cm.charCoords({line:r,ch:n},"window");this.colorpicker.show({left:l.left,top:l.bottom+fe,isShortCut:e.isShortCut||!1,hideDelay:this.opt.hideDelay||2e3},o||i,(function(e){t.cm.replaceRange(e,{line:r,ch:n},{line:r,ch:n+a.length},"*colorpicker"),a=e})),jQuery(this.colorpicker.$root.el).css({top:"".concat(l.bottom+fe,"px"),left:m()(l.left)?"".concat(l.left,"px"):l.left})}}var pe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(r,e);var t=K(r);function r(e){var n;X(this,r),(n=t.call(this,e)).editor=!1,n.dirty=!1,n.markers=[],n.mode=b()(e,"mode","css"),n.options=q(q(q({},ie.common),b()(ie.modes,n.mode,{})),{},{readOnly:b()(e,"readOnly",!1),cursorBlinkRate:b()(e,"cursorBlinkRate",ie.cursorBlinkRate),lint:b()(e,"lint",!0)}),S()(n.options,"mode.inline")&&S()(e,"inline")&&(n.options.mode.inline=e.inline),n.completion=b()(le.prefix,n.mode,le.prefix.default),n.onChange=n.onChange.bind($(n)),n.onClick=n.onClick.bind($(n)),n.onKeyUp=n.onKeyUp.bind($(n)),n.onKeyDown=n.onKeyDown.bind($(n)),n._onFocus=n._onFocus.bind($(n)),n._onBlur=n._onBlur.bind($(n)),n.onBeforeChange=n.onBeforeChange.bind($(n)),n.editorDidMount=n.editorDidMount.bind($(n)),n.activateEditor=n.activateEditor.bind($(n)),n.getEditor=n.getEditor.bind($(n)),n.debouncedShowCompletion=g()(n.showCompletion,ne),n.debouncedUpdateSettings=g()(n.updateSettings,re),n.incrementalKey=0;var o=n.addLineBreaks(ue(e)),i=n.addLineBreaks(n.props.default);return n.state={value:o,default:i,enabled:!s()(o)||!s()(i),focused:!1},n}return ee(r,[{key:"componentDidMount",value:function(){ce.add(this)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.addLineBreaks(ue(e));if(this.state.enabled||s()(t)&&s()(this.state.default)||this.enableEditor(),this.state.value!==t||e.activeTabMode!==this.props.activeTabMode){var r=this.addLineBreaks(e.default);this.setState({default:r}),this.dirty||(this.incrementalKey++,this.setValue(t))}}},{key:"componentDidUpdate",value:function(){if(this.editor){var e=this.editor;if(C()(this.markers,(function(e){e.clear()})),this.markers=[],s()(b()(this,"props.search")))return;for(var t=e.getSearchCursor(this.props.search);t.findNext();)this.markers.push(e.doc.markText(t.from(),t.to(),{className:"cm-searching",clearOnEnter:!0}))}}},{key:"componentWillUnmount",value:function(){this.hideCompletion(),this.hideColorPicker(),ce.remove(this),this.debouncedShowCompletion.cancel(),this.debouncedUpdateSettings.flush(),this.editor=!1,this.linter&&this.linter.destroy()}},{key:"onBeforeChange",value:function(e,t,r){this.dirty=!0,this.setValue(r)}},{key:"onChange",value:function(){re>0?this.debouncedUpdateSettings():this.updateSettings(),this.lint()}},{key:"onKeyUp",value:function(e,t){this.checkCompletion(e,t)}},{key:"onKeyDown",value:function(e,t){"Enter"!==t.key&&13!==t.keyCode||t.stopPropagation()}},{key:"onClick",value:function(){this.options.autofocus=!0,this.enableEditor()}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"addLineBreaks",value:function(e){if(p()(e)||!f()(e))return e;var t=this.options.lineBreakPlaceholder;return e.match(t)?e.split(t).join("\n"):e}},{key:"enableEditor",value:function(){this.setState({enabled:!0})}},{key:"lint",value:function(e){this.linter&&this.linter.lint(e)}},{key:"editorDidMount",value:function(e){this.editor=e;var t=e.state.colorpicker;t&&_()(t,"open_color_picker",de.bind(t)),this.props.lint&&(this.linter=new W(this.options.mode,e,oe),this.lint(0))}},{key:"updateSettings",value:function(){var e=this.props;e._onChange(e.name,this.state.value,e.type),this.dirty=!1}},{key:"hideCompletion",value:function(){this.debouncedShowCompletion.cancel(),this.editor&&this.editor.state.completionActive&&this.editor.state.completionActive.close()}},{key:"hideColorPicker",value:function(){this.editor&&this.editor.state.colorpicker&&this.editor.state.colorpicker.close_color_picker()}},{key:"checkCompletion",value:function(e,t){if(O()(le.ignoreKeys,t.keyCode))this.hideCompletion();else{var r=e.doc,n=r.getCursor(),o=n.line,i=n.ch,a=b()(e.getModeAt(n),"name"),l=r.getLine(o),u=l.substr(Math.max(i-1,0),1),s=l.substr(i,1);if(this.completion.test(u)&&!this.completion.test(s)){var c=b()(le,"tokens.".concat(a));if(c){var f=e.getTokenTypeAt(n);if(!O()(c,f))return void this.hideCompletion()}this.debouncedShowCompletion()}else this.hideCompletion()}}},{key:"showCompletion",value:function(){if(!this.editor.state.completionActive){var e=window.parent.body;this.editor.showHint({completeSingle:!1,container:e})}}},{key:"activateEditor",value:function(){this.enableEditor()}},{key:"getEditor",value:function(){return this.editor}},{key:"render",value:function(){var e,t=this.props,r=t.name,o=t.classList,a=q(q({},this.options),{},{lineNumbers:this.state.focused||!s()(this.state.value)||s()(this.state.default),placeholder:this.state.default});e=i().createElement(n.fk,{key:this.incrementalKey,value:this.state.value,options:a,cursor:this.options.autofocus?ae:null,autoFocus:this.options.autofocus,name:r,id:"et-common-".concat(r),onChange:this.onChange,onBeforeChange:this.onBeforeChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown,editorDidMount:this.editorDidMount,onFocus:this._onFocus,onBlur:this._onBlur});var l=q(q({},o),{},{"et-common-codemirror":!0});return i().createElement("div",{className:M()(l)},e)}},{key:"_onFocus",value:function(){this.setState({focused:!0})}},{key:"_onBlur",value:function(){this.setState({focused:!1})}}]),r}(i().PureComponent);pe.propTypes={className:l().string,inline:l().bool,lint:l().bool,name:l().string.isRequired,search:l().string,value:l().string},pe.defaultProps={className:"",inline:!0,lint:!0,search:"",value:""};const he=pe},33270:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>we});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(66459),c=r(10746),f=r(91596),d=r(94526),p=r(6721);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===h(i)?i:String(i)),n)}var o,i}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=b(e);if(t){var o=b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(l,e);var t,r,i,a=g(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e))._onSwatchClick=t._onSwatchClick.bind(y(t)),t}return t=l,(r=[{key:"_onSwatchClick",value:function(e){return(0,this.props.onSelectPalette)(e)}},{key:"_renderRegularSwatch",value:function(){var e=this.props,t=e.name,r=e.rowKey,i=e.colorId,a=e.swatchKey,l=e.swatchColor,s=e.swatchStyle,c=e.hidePickerOnPaletteSelect,f="".concat(t,"-color-tooltip-").concat(r,"-").concat(a),d=u()({"et-fb-settings-color-manager__swatches-swatch-overlay":!0});return o().createElement(n.Fragment,null,o().createElement("div",{style:s,className:d,"data-tip":!0,"data-for":f,"data-color":l,"data-color-id":i,onClick:this._onSwatchClick,"data-et-colorpicker-part":c?"false":"true"}))}},{key:"render",value:function(){var e=this.props.isEmptyColor,t=u()({"et-fb-settings-color-manager__swatches-swatch":!0,"et-fb-settings-color-manager__swatches-swatch--empty":e});return o().createElement("div",{className:t},this._renderRegularSwatch())}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),l}(n.PureComponent);w.propTypes={name:a().string,rowKey:a().number,colorId:a().oneOfType([a().number,a().string]),swatchKey:a().number,swatchStyle:a().object,swatchColor:a().string,isEmptyColor:a().bool,onSelectPalette:a().func,hidePickerOnPaletteSelect:a().bool};const _=w;var x=r(19830),S=r(22646);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function O(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==k(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===k(i)?i:String(i)),n)}var o,i}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=M(e);if(t){var o=M(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return L(e)}(this,r)}}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(a,e);var t,r,n,i=P(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e))._isCollapsed=!0,t._addCollapsedTimer=!1,t.state={isExpanded:e.isExpanded,transitionMode:"off"},t._forceRenderPalette=t._forceRenderPalette.bind(L(t)),t._onTogglePalette=t._onTogglePalette.bind(L(t)),t._onSelectPalette=t._onSelectPalette.bind(L(t)),t._onClickCurrentColor=t._onClickCurrentColor.bind(L(t)),t._onClickColorResetButton=t._onClickColorResetButton.bind(L(t)),t._onChangeCustomInput=(0,s.debounce)(t._onChangeCustomInput.bind(L(t)),400),t}return t=a,r=[{key:"componentWillUnmount",value:function(){this._onChangeCustomInput.cancel()}},{key:"_onTogglePalette",value:function(e){var t=this;e.preventDefault();var r=jQuery(this.refs.colorManager);this._isCollapsed=!1,this._addCollapsedTimer&&clearTimeout(this._addCollapsedTimer),this.state.isExpanded?this._addCollapsedTimer=setTimeout((function(){r.addClass("et-fb-settings-color-manager--collapsed"),t._addCollapsedTimer=!1,t._isCollapsed=!0}),750):r.removeClass("et-fb-settings-color-manager--collapsed");var n=!this.state.isExpanded;this.setState({isExpanded:n,transitionMode:"off"});var o=this.props,i=o.onTogglePalette,a=o.name;(0,s.isFunction)(i)&&i(n,a)}},{key:"_onSelectPalette",value:function(e){var t=e.currentTarget.getAttribute("data-color");t&&(this._isCollapsed=!0,this.setState({isExpanded:!1})),this._emitChangeColor(t)}},{key:"_onClickCurrentColor",value:function(){var e=this.props,t=e.name,r=e.onClickCurrentColor;(0,s.isFunction)(r)&&r(t)}},{key:"_onClickColorResetButton",value:function(){this.setState({isExpanded:!1}),this._emitChangeColor(f.Z.transparent)}},{key:"_onChangeCustomInput",value:function(e){var t=e.target.value,r=t&&!f.Z.isColorValid(t)?this._getCurrentColor():t;this._emitChangeColor(r)}},{key:"_forceRenderPalette",value:function(){this.forceUpdate()}},{key:"_emitChangeColor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.props,n=r.name,o=r.onSelectPalette;(0,s.isFunction)(o)&&o((0,s.toString)(e).toUpperCase(),n,t)}},{key:"_getCurrentColor",value:function(){return this.props.value||this.props.default||""}},{key:"_renderCurrentColorWrapper",value:function(){var e=this.props,t=e.name,r=e.showCustomInput,n=e.hideCurrentColorWrapper,i=e.hidePickerOnPaletteSelect;return!n&&!r&&o().createElement("div",{className:"et-fb-settings-color-manager__toggle-palette-wrapper","data-for":"".concat(t,"-color-tooltip-current-color"),"data-tip":!0},o().createElement("div",{className:u()({"et-fb-settings-color-manager__toggle-palette":!0}),onClick:this._onTogglePalette,"data-et-colorpicker-part":i?"false":"true"},o().createElement(p.Z,{icon:"expand-palette",color:"#a2b0c1"})))}},{key:"_renderHarmoniousPalette",value:function(){var e=this,t=this.props,r=t.name,n=t.hidePickerOnPaletteSelect;if(t.hideHarmoniusColors)return null;var i=["#000000","#ffffff","#e02b20","#e09900","#edf000","#7cda24","#0c71c3","#8300e9"],a=this.state.isExpanded,l=[this._getCurrentColor()].concat(i);return o().createElement("div",{className:u()({"et-fb-settings-color-manager__swatches":!0})},o().createElement("div",{className:"et-fb-settings-color-manager__swatches-rotator"},(0,s.map)(l,(function(t,i){var l=[],d=t&&(0,s.isString)(t)?t.toLowerCase():"";if(f.Z.isColorValid(d)){var p="hex"===f.Z.getColorType(d)?f.Z.hexToRgb(d):f.Z.rgbExtract(d),h=f.Z.rgbToHsl.apply(f.Z,O(p));l=f.Z.generateHarmoniousColors.apply(f.Z,O(h))}else l=(0,s.range)(8).map((function(){return""}));var m=[];return o().createElement("div",{className:u()({"et-fb-settings-color-manager__swatches-row":!0}),key:i},(0,s.map)(l,(function(t,a){var l=t,u={},c=""===t;if(!c){if(1===a)l=d;else{if(!(0,s.isArray)(l))return;var p=f.Z.hslToRgb.apply(f.Z,O(l));if(l=f.Z.rgbToHex.apply(f.Z,O(p)),!f.Z.isColorValid(l))return}u={backgroundColor:l},m.push(l)}return o().createElement(_,{key:a,name:r,rowKey:i,swatchKey:a,swatchStyle:u,swatchColor:l,isEmptyColor:c,onSelectPalette:e._onSelectPalette,hidePickerOnPaletteSelect:n})})),(0,s.map)(m,(function(t,r){return!!a&&o().createElement(c.Z,{id:"".concat(e.props.name,"-color-tooltip-").concat(i,"-").concat(r),key:"".concat(i,"-").concat(r),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},t)})))}))),(0,s.map)(i,(function(t,r){return!a&&""!==t&&o().createElement(c.Z,{id:"".concat(e.props.name,"-color-tooltip-").concat(r+1,"-1"),key:"".concat(r+1,"-1"),effect:"solid",className:"et-fb-settings-color-manager-swatches-container-swatch-tooltip"},t)})))}},{key:"_renderColorResetButton",value:function(){var e=this.props,t=e.name,r=e.showCustomInput,n=e.hidePickerOnPaletteSelect,i=e.hideHarmoniusColors;return!r&&(i?null:o().createElement("div",{className:"et-fb-settings-color-manager__reset-color",style:{backgroundImage:"url(".concat(x.Z.images_uri,"/no-color.png)")},onClick:this._onClickColorResetButton,"data-tip":!0,"data-for":"".concat(t,"-color-tooltip-no-color"),"data-et-colorpicker-part":n?"false":"true"},o().createElement(c.Z,{id:"".concat(t,"-color-tooltip-no-color"),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},"Transparent")))}},{key:"_renderCurrentColor",value:function(){var e=this.props,t=e.name,r=e.hidePickerOnPaletteSelect,n=this._getCurrentColor(),i=n||(0,S.Z)("common","Add Background Color"),a=u()({"et-fb-settings-color-manager__current-color-overlay":!0});return o().createElement("div",{className:u()({"et-fb-settings-color-manager__current-color":!0,"et-fb-settings-color-manager__current-color-empty":(0,s.isEmpty)(n)}),onClick:this._onClickCurrentColor,"data-for":"".concat(t,"-color-tooltip-current-color"),"data-tip":!0,"data-et-colorpicker-part":r?"false":"true"},o().createElement("div",{className:a,style:{backgroundColor:this._getCurrentColor()}}),o().createElement(c.Z,{id:"".concat(t,"-color-tooltip-current-color"),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},i))}},{key:"_renderCustomInput",value:function(){var e=this,t=this.props,r=t.showCustomInput,n=t.default,i=t.name,a=t.readonly;return!!r&&o().createElement(d.default,{type:"text",name:"".concat(i,"__custom"),value:this._getCurrentColor(),default:n||"",className:"et-fb-custom-color-input",readOnly:a,onChange:function(t){t.persist(),e._onChangeCustomInput(t)}})}},{key:"render",value:function(){var e=this.props,t=e.animate,r=e.isVisible,n=e.hideHarmoniusColors;if(!r)return!1;var i=this._getCurrentColor(),a=u()({"et-fb-settings-color-manager":!0,"et-fb-settings-color-manager--non-global":!0,"et-fb-settings-color-manager--animated":t,"et-fb-settings-color-manager--expanded":this.state.isExpanded,"et-fb-settings-color-manager--collapsed":this._isCollapsed,"et-fb-settings-color-manager--transition-in":(0,s.includes)(["in","out"],this.state.transitionMode),"et-fb-settings-color-manager--transition-out":"out"===this.state.transitionMode,"et-fb-settings-color-manager--simplified-color-picker":n,"no-color":(0,s.isEmpty)(i)});return o().createElement("div",{ref:"colorManager",className:a},o().createElement("div",{className:"et-fb-settings-color-manager__row"},o().createElement("div",{className:"et-fb-settings-color-manager__column"},o().createElement("div",{className:"et-fb-settings-color-manager__current-color-wrapper"},this._renderCurrentColor(),this._renderCurrentColorWrapper()),this._renderHarmoniousPalette(),this._renderCustomInput(),this._renderColorResetButton())))}}],r&&C(t.prototype,r),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);A.propTypes={name:a().string,value:a().string,default:a().string,transitionMode:a().string,isVisible:a().bool,isExpanded:a().bool,animate:a().bool,hideCurrentColorWrapper:a().bool,hideHarmoniousPalette:a().bool,showCustomInput:a().bool,readonly:a().bool,onClickCurrentColor:a().func,onChangeCustomInput:a().func,onSelectPalette:a().func,onTogglePalette:a().func,hidePickerOnPaletteSelect:a().bool,hideHarmoniusColors:a().bool},A.defaultProps={isVisible:!0,animate:!1,hideCurrentColorWrapper:!1,hideHarmoniousPalette:!1,showCustomInput:!1,readonly:!1,hidePickerOnPaletteSelect:!1,hideHarmoniusColors:!1};const T=A;var I=r(33708),R=r.n(I),N=r(62952),D=r.n(N),z=r(8961),F=r.n(z),B=r(21009),H=r.n(B),U=r(72773),W=r.n(U);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,G(n.key),n)}}function G(e){var t=function(e,t){if("object"!==V(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==V(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===V(t)?t:String(t)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Q(e);if(t){var o=Q(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $(e)}(this,r)}}function $(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(a,e);var t,r,n,i=K(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e);var r=f.Z.normalize(t.props.value);return t.state={colorType:f.Z.getColorType(r)},t._isInitialized=!1,t._isInteracting=!1,t._isTyping=!1,t._isOpened=!1,t._initTimer=null,t._draggingTimer=null,t._adjustElementPositionTimer=null,t._interactingTimer=null,t._validateInputDelayed=R()(t._validateInputDelayed.bind($(t)),2e3),t._onInput=t._onInput.bind($(t)),t._onFocus=t._onFocus.bind($(t)),t._onBlur=t._onBlur.bind($(t)),t._onChangeColorPicker=t._onChangeColorPicker.bind($(t)),t._onClearColorPicker=t._onClearColorPicker.bind($(t)),t._onCloseColorPicker=t._onCloseColorPicker.bind($(t)),t._onMouseDown=t._onMouseDown.bind($(t)),t._inputRef=o().createRef(),t._wrapperRef=o().createRef(),t}return t=a,(r=[{key:"componentDidMount",value:function(){var e=this,t=this.props,r=t.isOpen,n=t.value,o=t.autoFocus;clearTimeout(this._initTimer),this._initTimer=setTimeout((function(){var t=e._getInputNode();t&&"function"==typeof t.wpColorPicker&&t.wpColorPicker({diviColorpicker:!0,hide:!0,color:f.Z.normalize(n),change:e._onChangeColorPicker,clear:e._onClearColorPicker,onClose:e._onCloseColorPicker}),e._isInitialized=!0,o&&t.trigger("focus"),r?e._openColorPicker():"block"===e._getWrapperNode().find(".iris-picker").css("display")&&(e._isOpened=!0,e._closeColorPicker())}),200),window.top.document.addEventListener("mousedown",this._onMouseDown)}},{key:"shouldComponentUpdate",value:function(e,t){var r=this;return t.colorType!==this.state.colorType||!this._isInteracting&&!this._isTyping&&W()(["isOpen","value","showPalettes"],(function(t){return!F()(e[t],r.props[t])}))}},{key:"componentDidUpdate",value:function(e){if(this._isInitialized&&(e.isOpen!==this.props.isOpen&&(this.props.isOpen?this._openColorPicker():this._closeColorPicker()),this._isOpened&&!this._isInteracting&&!this._isTyping)){var t=f.Z.normalize(this._getInputNode().wpColorPicker("color")),r=f.Z.normalize(this.props.value);t!==r&&this._updateColorPicker(r)}}},{key:"componentWillUnmount",value:function(){this._isInitialized=!1,this._isOpened=!1,this._isInteracting=!1,this._isTyping=!1,clearTimeout(this._initTimer),clearTimeout(this._draggingTimer),clearTimeout(this._adjustElementPositionTimer),clearTimeout(this._interactingTimer),this._validateInputDelayed.cancel(),window.top.document.removeEventListener("mousedown",this._onMouseDown)}},{key:"_onInput",value:function(e){this._validateInputDelayed(e.target.value)}},{key:"_onFocus",value:function(){this._isTyping=!0}},{key:"_onBlur",value:function(){this._isTyping=!1}},{key:"_onChangeColorPicker",value:function(e,t){var r=this;if(this._isInitialized&&!D()(t,"color.error",!1)){var n=f.Z.normalize(t.color.toString()),o=D()(e,"originalEvent.type");clearTimeout(this._adjustElementPositionTimer),this._adjustElementPositionTimer=setTimeout((function(){r._adjustElementsPosition()}),100),"square"===o&&(this._getWrapperNode().addClass("is-dragging").find(".button-confirm").css("backgroundColor",n),clearTimeout(this._draggingTimer),this._draggingTimer=setTimeout((function(){r._getWrapperNode().removeClass("is-dragging").find(".button-confirm").css("backgroundColor","")}),500));var i=this.props,a=i.onChangeColorPicker,l=i.name,u=i.value;n!==f.Z.normalize(u)&&(this.setState({colorType:f.Z.getColorType(n)}),H()(a)&&a(n,l))}}},{key:"_onClearColorPicker",value:function(){if(this._isInitialized){var e=this.props,t=e.onClearColorPicker,r=e.name;H()(t)&&t(r)}}},{key:"_onCloseColorPicker",value:function(){if(this._isInitialized){this._isInteracting=!1,this._isOpened=!1;var e=this.props,t=e.onCloseColorPicker,r=e.name;f.Z.normalize(this._getInputNode().wpColorPicker("color")),H()(t)&&t(r)}}},{key:"_onMouseDown",value:function(e){var t=this;if(this._isOpened){var r=e.target;if(this._wrapperRef.current&&this._wrapperRef.current.contains(r))this._isInteracting=!0,clearTimeout(this._interactingTimer),this._interactingTimer=setTimeout((function(){t._isInteracting=!1}),100);else{this._isInteracting=!1;var n="data-et-colorpicker-part";"true"===r.getAttribute(n)||r.closest("[".concat(n,'="true"]'))||this._closeColorPicker()}}}},{key:"_openColorPicker",value:function(){if(this._isInitialized&&!this._isOpened){this._isOpened=!0,this._getInputNode().wpColorPicker("open",!0);var e=this.props.value;e&&this._updateColorPicker(e)}}},{key:"_closeColorPicker",value:function(){this._isInitialized&&this._isOpened&&(this._isOpened=!1,this._getInputNode().wpColorPicker("close",!0))}},{key:"_updateColorPicker",value:function(e){this._getInputNode().wpColorPicker("color",f.Z.normalize(e))}},{key:"_validateInputDelayed",value:function(e){if(""!==e&&"#"!==e){var t=f.Z.normalize(e);t&&!isNaN(t)||this._getInputNode().val(this._getInputNode().wpColorPicker("color"))}}},{key:"_adjustElementsPosition",value:function(){var e=this._getWrapperNode(),t=parseInt(e.find(".iris-square-value.ui-draggable").width()),r=parseInt(e.find(".iris-square-value.ui-draggable").css("left"))+t/2,n=parseInt(e.width());(this.props.value||!isNaN(this.props.value))&&r>n-50?e.addClass("on-right-corner"):e.removeClass("on-right-corner")}},{key:"_getInputNode",value:function(){return jQuery(this._inputRef.current)}},{key:"_getWrapperNode",value:function(){return jQuery(this._wrapperRef.current)}},{key:"render",value:function(){var e=this.props,t=e.value,r=e.isAlpha,n=e.showPalettes,i=e.hideResultButton,a=this.state.colorType,l={"et-common-settings-option-color-picker":!0,"show-palettes":n,"hide-result-button":i},s=function(e,t,r){return(t=G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({"wp-color-picker":!0,"et-common-settings-option-color":!0,"et-common-settings-option-color--alpha":r},"et-fb-color-type-".concat(a),!!a);return o().createElement("div",{ref:this._wrapperRef,className:u()(l)},o().createElement("input",{type:"text",ref:this._inputRef,className:u()(s),defaultValue:f.Z.normalize(t),"data-alpha":r,maxLength:25,onInput:this._onInput,onFocus:this._onFocus,onBlur:this._onBlur}))}}])&&q(t.prototype,r),n&&q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);Z.propTypes={value:a().string,name:a().string,isOpen:a().bool,isAlpha:a().bool,showPalettes:a().bool,hideResultButton:a().bool,autoFocus:a().bool,clickOutsideRef:a().shape({current:a().any}),onChangeColorPicker:a().func,onClearColorPicker:a().func,onCloseColorPicker:a().func},Z.defaultProps={isOpen:!1,isAlpha:!0,showPalettes:!1,hideResultButton:!0,autoFocus:!0};const X=Z;var J=r(58685);function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e,t,r){return(t=ne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function re(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ne(n.key),n)}}function ne(e){var t=function(e,t){if("object"!==ee(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ee(t)?t:String(t)}function oe(e,t){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oe(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=le(e);if(t){var o=le(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ae(e)}(this,r)}}function ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oe(e,t)}(a,e);var t,r,n,i=ie(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={colorEditId:null,isConverting:!1,selectedColor:null,tempInfoHolder:null,isDeleteAttempt:!1,isCurrentColorPicker:!1},t._classNameBase="et-common-settings-option-color ",t._wrapperRef=o().createRef(),t._onClickPreviewCanvas=t._onClickPreviewCanvas.bind(ae(t)),t._onClickPreviewAddButton=t._onClickPreviewAddButton.bind(ae(t)),t._onClickPreviewEditButton=t._onClickPreviewEditButton.bind(ae(t)),t._onClickPreviewRemoveButton=t._onClickPreviewRemoveButton.bind(ae(t)),t._onClickPreviewResetButton=t._onClickPreviewResetButton.bind(ae(t)),t._onChangeColorPicker=t._onChangeColorPicker.bind(ae(t)),t._onClearColorPicker=t._onClearColorPicker.bind(ae(t)),t._onCloseColorPicker=t._onCloseColorPicker.bind(ae(t)),t._onClickColorManagerCurrentColor=t._onClickColorManagerCurrentColor.bind(ae(t)),t._onSelectColorManagerPalette=t._onSelectColorManagerPalette.bind(ae(t)),t._onToggleColorManagerPalette=t._onToggleColorManagerPalette.bind(ae(t)),t.isComponentMounted=!1,t}return t=a,r=[{key:"componentDidMount",value:function(){this.isComponentMounted=!0}},{key:"componentWillUnmount",value:function(){this.isComponentMounted=!1}},{key:"_emitChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.props,o=n.name,i=n.readonly,a=n._onChange;if(!i){var l=t||o;(0,s.isFunction)(a)&&a(l,e,void 0,void 0,r)}}},{key:"_setCurrentColorPickerStatus",value:function(){this.setState({tempInfoHolder:this._getValue(),isCurrentColorPicker:!0})}},{key:"_onClickPreviewCanvas",value:function(){var e=this.props,t=e.isGradient,r=e.onClickPreviewCanvas;t?r():(this._openColorPicker(),"background_color"===this.props.name&&this._setCurrentColorPickerStatus())}},{key:"_onClickPreviewAddButton",value:function(){var e=this.props,t=e.isGradient,r=e.onClickPreviewAddButton;t?r():this._openColorPicker()}},{key:"_onClickPreviewEditButton",value:function(){this._openColorPicker()}},{key:"_onClickPreviewRemoveButton",value:function(){this.props.isGradient?this._emitChange("off","use_color_gradient"):this._emitChange("")}},{key:"_onClickPreviewResetButton",value:function(){this._emitChange("",null,!0)}},{key:"_onChangeColorPicker",value:function(e){var t=this.props,r=t.name,n=t.isGradient,o=t.onChangeColorPicker;this.setState({selectedColor:e}),n?o(e,r,!1):this._emitChange(e)}},{key:"_onClearColorPicker",value:function(){this._emitChange("")}},{key:"_onCloseColorPicker",value:function(){this._closeColorPicker()}},{key:"_onClickColorManagerCurrentColor",value:function(){this.props.isGradient||(this._openColorPicker(),this._setCurrentColorPickerStatus())}},{key:"_onSelectColorManagerPalette",value:function(e,t){var r=this.props,n=r.isGradient,o=r.hidePickerOnPaletteSelect,i=r.onSelectColorManagerPalette;o&&this._closeColorPicker();var a=e;n?i(a,t):this._emitChange(a)}},{key:"_onToggleColorManagerPalette",value:function(){this.props.hidePickerOnPaletteSelect&&this._closeColorPicker()}},{key:"_openColorPicker",value:function(){var e=this.props,t=e.colorPicker,r=e.setColorPickerState;e.readonly||t||r(!0)}},{key:"_closeColorPicker",value:function(){var e=this.props,t=e.readonly,r=e.onCloseColorPicker,n=e.setColorPickerState;t||(this.setState({isCurrentColorPicker:!1}),(0,s.isFunction)(n)&&n(!1),(0,s.isFunction)(r)&&r())}},{key:"_getValue",value:function(){return this.state.selectedColor,this.props.value||""}},{key:"_getDefaultValue",value:function(){return this.props.default}},{key:"_getClassName",value:function(e){return e?"".concat(this._classNameBase,"-").concat(e):this._classNameBase}},{key:"_renderColorPicker",value:function(){var e=this.props,t=e.name,r=e.isAlpha,n=e.isGradient,i=e.colorPicker,a=e.showPickerPalettes,l=n&&(0,s.isEmpty)(t)?"":t,u=this.getRealColorValue();return o().createElement("div",{className:this._getClassName("wrap--picker")},o().createElement(X,{isOpen:!!i,value:u,name:l,isAlpha:r,showPalettes:a,clickOutsideRef:this._wrapperRef,onChangeColorPicker:this._onChangeColorPicker,onClearColorPicker:this._onClearColorPicker,onCloseColorPicker:this._onCloseColorPicker}))}},{key:"_renderColorPreview",value:function(){var e=this.props,t=e.hasPreview,r=e.colorPicker,n=e.previewStyle,i=e.showAddButton,a=e.onMouseEnterPreview,l=e.onMouseLeavePreview,u=e.name;if(!t||r)return!1;var s=["background_color","use_background_color_gradient"].includes(u);return o().createElement("div",{className:this._getClassName("wrap--preview")},o().createElement(J.default,{previewStyle:this.getRealColorValue(n),showAddButton:i,onClickCanvas:this._onClickPreviewCanvas,onClickAddButton:this._onClickPreviewAddButton,onClickRemoveButton:this._onClickPreviewRemoveButton,onClickResetButton:this._onClickPreviewResetButton,onClickEditButton:this._onClickPreviewEditButton,onMouseEnterPreview:a,onMouseLeavePreview:l,hideAIButton:s}))}},{key:"getRealColorValue",value:function(e){return e||this._getValue()}},{key:"_renderColorManager",value:function(){var e=this.props,t=e.name,r=e.animate,n=e.context,i=e.readonly,a=e.isVisible,l=e.isGradient,u=e.colorPicker,c=e.hasColorManager,f=e.showCustomInput,d=e.showColorManagerOnPickerActive,p=e.hideHarmoniusColors,h=e.hideCurrentColorWrapper;if(!c||d&&!u)return!1;var m=l&&(0,s.isEmpty)(t)?"":t;return o().createElement("div",{className:this._getClassName("wrap--manager")},o().createElement(T,{name:m,value:this.getRealColorValue(),context:n,isVisible:a,animate:r,readonly:i,showCustomInput:f,onClickCurrentColor:this._onClickColorManagerCurrentColor,onSelectPalette:this._onSelectColorManagerPalette,onTogglePalette:this._onToggleColorManagerPalette,hideHarmoniusColors:p,hideCurrentColorWrapper:h}))}},{key:"render",value:function(){var e,t=this.props,r=t.hasPreview,n=t.hasColorManager,i=(te(e={},this._getClassName(),!0),te(e,this._getClassName("-has-preview"),r),te(e,this._getClassName("-has-color-manager"),n),e);return o().createElement("div",{ref:this._wrapperRef,className:u()(i)},this._renderColorPicker(),this._renderColorPreview(),this._renderColorManager())}}],r&&re(t.prototype,r),n&&re(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);ue.propTypes={name:a().oneOfType([a().bool,a().string]).isRequired,hasPreview:a().bool,hasColorManager:a().bool,showPickerPalettes:a().bool,isAlpha:a().bool,hidePickerOnPaletteSelect:a().bool,hidePaletteOnPickerActive:a().bool,readonly:a().bool,animate:a().bool,showCustomInput:a().bool,hideHarmoniusColors:a().bool,hideCurrentColorWrapper:a().bool,value:a().oneOfType([a().string,a().bool]),default:a().oneOfType([a().string,a().bool])},ue.defaultProps={hasPreview:!1,hasColorManager:!0,showPickerPalettes:!0,isAlpha:!0,hidePickerOnPaletteSelect:!1,hidePaletteOnPickerActive:!0,readonly:!1,animate:!1,showCustomInput:!1,value:"",default:!1,hideHarmoniusColors:!1,hideCurrentColorWrapper:!1};const se=ue;function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function fe(e,t,r){return(t=he(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de.apply(this,arguments)}function pe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,he(n.key),n)}}function he(e){var t=function(e,t){if("object"!==ce(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ce(t)?t:String(t)}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ye(e);if(t){var o=ye(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ge(e)}(this,r)}}function ge(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ye(e){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ye(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&me(e,t)}(a,e);var t,r,n,i=ve(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={colorPicker:!1},t._classNameBase="et-common-settings-option-color",t._wrapperRef=o().createRef(),t._onClickPreviewCanvas=t._onClickPreviewCanvas.bind(ge(t)),t._onClickPreviewAddButton=t._onClickPreviewAddButton.bind(ge(t)),t._onClickPreviewEditButton=t._onClickPreviewEditButton.bind(ge(t)),t._onClickPreviewRemoveButton=t._onClickPreviewRemoveButton.bind(ge(t)),t._onClickPreviewResetButton=t._onClickPreviewResetButton.bind(ge(t)),t._setColorPickerState=t._setColorPickerState.bind(ge(t)),t}return t=a,(r=[{key:"_onClickPreviewCanvas",value:function(){this._openColorPicker()}},{key:"_onClickPreviewAddButton",value:function(){this._openColorPicker()}},{key:"_onClickPreviewEditButton",value:function(){this._openColorPicker()}},{key:"_onClickPreviewRemoveButton",value:function(){this._emitChange("")}},{key:"_onClickPreviewResetButton",value:function(){this._emitChange()}},{key:"_openColorPicker",value:function(){this.props.readonly||this.setState({colorPicker:!0})}},{key:"_getDefaultValue",value:function(){return this.props.default}},{key:"_getClassName",value:function(e){return e?"".concat(this._classNameBase,"-").concat(e):this._classNameBase}},{key:"_setColorPickerState",value:function(e){this.setState({colorPicker:e})}},{key:"_renderColorGradientShared",value:function(){var e=this.state.colorPicker,t=this.props,r=t.value,n=t.hidePaletteOnPickerActive,i=t.hidePickerOnPaletteSelect,a=!(n&&e);return o().createElement(se,de({},this.props,{isGradient:!1,colorPicker:e,hidePickerOnPaletteSelect:i,setColorPickerState:this._setColorPickerState,onClickPreviewCanvas:this._onClickPreviewCanvas,previewStyle:r,onClickPreviewAddButton:this._onClickPreviewAddButton,isVisible:a}))}},{key:"render",value:function(){var e,t=this.props,r=t.hasPreview,n=t.hasColorManager,i=(fe(e={},this._getClassName(),!0),fe(e,this._getClassName("-has-preview"),r),fe(e,this._getClassName("-has-color-manager"),n),e);return o().createElement("div",{ref:this._wrapperRef,className:u()(i)},this._renderColorGradientShared())}}])&&pe(t.prototype,r),n&&pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);be.propTypes={name:a().string,hasPreview:a().bool,hasColorManager:a().bool,showPickerPalettes:a().bool,isAlpha:a().bool,hidePickerOnPaletteSelect:a().bool,hidePaletteOnPickerActive:a().bool,readonly:a().bool,animate:a().bool,showCustomInput:a().bool,hideHarmoniusColors:a().bool,value:a().oneOfType([a().string,a().bool]),default:a().oneOfType([a().string,a().bool]),_onChange:a().func},be.defaultProps={hasPreview:!1,hasColorManager:!0,showPickerPalettes:!0,isAlpha:!0,hidePickerOnPaletteSelect:!1,hidePaletteOnPickerActive:!0,readonly:!1,animate:!1,hideHarmoniusColors:!1};const we=be},81149:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var c=["positive","value","checked","className","children"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===s(i)?i:String(i)),n)}var o,i}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(a,e);var t,r,n,i=m(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.positive,r=e.value,n=e.checked,i=e.className,a=e.children,l=d(e,c);return o().createElement("label",{className:"et-common-checkbox ".concat(i)},o().createElement("input",f({type:"checkbox",value:r,checked:n,className:u()({"et-common-checkbox__input":!0,"et-common-checkbox__input--danger":!t})},l)),o().createElement("span",{className:"et-common-checkbox__label"},a))}}])&&p(t.prototype,r),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);g.propTypes={positive:a().bool,value:a().oneOfType([a().string,a().number]).isRequired,checked:a().bool.isRequired,className:a().string},g.defaultProps={value:1,positive:!0,className:""};const y=g},94526:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}var u=["className","type"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function c(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===l(i)?i:String(i)),n)}var o,i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(a,e);var t,r,n,i=p(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){var e=this.props,t=e.className,r=e.type,n=c(e,u);return o().createElement("input",s({type:r,className:"et-common-input-text ".concat(t)},n))}}])&&f(t.prototype,r),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);m.propTypes={className:a().string,type:a().string},m.defaultProps={className:"",type:"text"};const v=m},12172:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(87363),o=r.n(n),i=["className"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const u=(0,n.forwardRef)((function(e,t){var r=e.className,n=l(e,i);return o().createElement("textarea",a({className:"et-common-textarea ".concat(r)},n,{ref:t}))}))},58685:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>B});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(59070),c=r(90418),f=r.n(c),d=r(21009),p=r.n(d),h=r(4082),m=r.n(h),v=r(47606),g=r.n(v),y=r(91596),b=r(30911),w=r(6721),_=r(66459),x=r(92419);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==S(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===S(i)?i:String(i)),n)}var o,i}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=C(e);if(t){var o=C(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(i,e);var t,r,n,o=E(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).loadAIModal=function(e){var r=t.props,n=r.label,o=r.type,i=r.name,a=r.value,l=o,u={aiMode:(0,_.includes)(["upload","background"],o)?"image":"text",type:e,etAccount:{},label:n,prefilledContentType:l,contextData:{},additionalInfo:{field_name:i,module:undefined,fields:[]},content:t.props.selectedText||a};jQuery(window).trigger("et_ai_container_ready",[u,"et-ai-app"])},t.handleAIButtonMenuChange=function(e){var r=t.props,n=r.name,o=r.onHandleAIButtonMenuChange;o&&o({fieldName:n}),t.loadAIModal(e)},t}return t=i,(r=[{key:"getAITextFieldOptions",value:function(e){var t={};return(0,_.forEach)(ETBuilderBackend[e],(function(e){var r=e.group?e.group:"Default",n=e.slug;(0,_.isUndefined)(t[r])&&(t[r]={}),t[r][n]=e.label})),t}},{key:"getAIImageFieldOptions",value:function(){return this.getAITextFieldOptions("aiImageFieldOptions")}},{key:"getAITextFieldEmptyOptions",value:function(){return this.getAITextFieldOptions("aiTextFieldEmptyOptions")}},{key:"getAITextFieldNonEmptyOptions",value:function(){return this.props.selectedText?this.getAITextFieldOptions("aiTextFieldSelectedTextOptions"):this.getAITextFieldOptions("aiTextFieldOptions")}},{key:"render",value:function(){var e=this,t=this.props,r=t.name,n=t.value,o=t.fieldRef,i=t.optionsFn,a=t.fieldID;return(0,_.isNil)(r)?null:React.createElement("div",{className:"et-fb-settings-option-select-discrete"},React.createElement(x.default,{ref:o,name:"".concat(r,"_ai_content"),value:n,options:this[i](),selectFirst:!1,__onChange:function(t){return e.handleAIButtonMenuChange(t)},fieldID:a,onOpen:this.props.onOpen,onClose:this.props.onClose}))}}])&&k(t.prototype,r),n&&k(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(n.Component);j.defaultProps={selectedText:"",onOpen:function(){},onClose:function(){}};const P=j;function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function M(e,t,r){return(t=T(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function T(e){var t=function(e,t){if("object"!==L(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===L(t)?t:String(t)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=D(e);if(t){var o=D(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}(this,r)}}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}var z={stiffness:300,damping:20},F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(a,e);var t,r,n,i=R(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).AISelectRef=null,t._onClickAIButton=function(){t.AISelectRef.toggleMenu({target:null})},t.state={isHovered:!1},t._onClickCanvas=t._onClickCanvas.bind(N(t)),t._onClickAddButton=t._onClickAddButton.bind(N(t)),t._onClickEditButton=t._onClickEditButton.bind(N(t)),t._onClickRemoveButton=t._onClickRemoveButton.bind(N(t)),t._onClickResetButton=t._onClickResetButton.bind(N(t)),t._onMouseEnter=t._onMouseEnter.bind(N(t)),t._onMouseLeave=t._onMouseLeave.bind(N(t)),t._classNameBase="et-fb-settings-option-preview",t}return t=a,(r=[{key:"_onClickCanvas",value:function(e){e.preventDefault();var t=this.props,r=t.onClickCanvas,n=t.name;p()(r)&&r(n)}},{key:"_onClickAddButton",value:function(){var e=this.props,t=e.onClickAddButton,r=e.name;p()(t)&&t(r)}},{key:"_onClickEditButton",value:function(){var e=this.props,t=e.onClickEditButton,r=e.name;p()(t)&&t(r)}},{key:"_onClickRemoveButton",value:function(){var e=this.props,t=e.onClickRemoveButton,r=e.name;p()(t)&&t(r)}},{key:"_onClickResetButton",value:function(){var e=this.props,t=e.onClickResetButton,r=e.name;p()(t)&&t(r)}},{key:"_onMouseEnter",value:function(){this.setState({isHovered:!0});var e=this.props,t=e.onMouseEnterPreview,r=e.name;p()(t)&&t(r)}},{key:"_onMouseLeave",value:function(){this.setState({isHovered:!1});var e=this.props,t=e.onMouseLeavePreview,r=e.name;p()(t)&&t(r)}},{key:"_isHasPreviewStyle",value:function(){return!f()(this._getPreviewStyle())}},{key:"_isHasPreviewContent",value:function(){return!f()(this.props.children)}},{key:"_isHasValue",value:function(){return this._isHasPreviewStyle()||this._isHasPreviewContent()}},{key:"_getPreviewStyle",value:function(){var e=this.props.previewStyle;return!f()(e)&&m()(e)?e:!f()(e)&&g()(e)?y.Z.isColorValid(e.toLowerCase())?{backgroundColor:e}:{backgroundImage:"url(".concat(e,")")}:{}}},{key:"_getButtonMotionStyle",value:function(){return this.state.isHovered?{opacity:(0,s.ST)(1,z),scale:(0,s.ST)(1,z),top:(0,s.ST)(0,z)}:{opacity:(0,s.ST)(0,z),scale:(0,s.ST)(0,z),top:(0,s.ST)(-30,z)}}},{key:"_getButtonClassName",value:function(e){return"".concat(this._classNameBase,"--button ").concat(this._classNameBase,"--button--").concat(e)}},{key:"_getControlButtons",value:function(){var e=this.props,t=e.showEditButton,r=(e.showSwapButton,e.showRemoveButton),n=e.showResetButton;return e.hideAIButton,[{name:"edit",icon:"setting",enabled:t,onClick:this._onClickEditButton},{name:"remove",icon:"delete",enabled:r,onClick:this._onClickRemoveButton},{name:"reset",icon:"reset",enabled:n,onClick:this._onClickResetButton}].filter((function(e){return e.enabled}))}},{key:"_renderControlButtons",value:function(){var e=this;return this.props.hideAIButton,this._getControlButtons().map((function(t){return o().createElement(s.y_,{key:t.name,style:e._getButtonMotionStyle()},(function(r){return o().createElement(b.default,{className:e._getButtonClassName(t.name),style:{opacity:r.opacity,transform:"scale( ".concat(r.scale," )"),top:r.top},onClick:t.onClick},o().createElement(w.Z,{icon:t.icon,color:"#fff"}))}))}))}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.name,i=r.type,a=r.className,l=r.children,s=(M(e={},this._classNameBase,!0),M(e,"".concat(this._classNameBase,"--empty"),!this._isHasValue()),e);a&&(s[a]=!0);var c=n&&!["background_video_mp4","background_video_webm","reference_image"].includes(n);return o().createElement(o().Fragment,null,o().createElement("div",{className:u()(s),onMouseEnter:this._onMouseEnter,onMouseLeave:this._onMouseLeave,onClick:this._onClickCanvas,style:this._getPreviewStyle()},l,o().createElement("div",{className:"".concat(this._classNameBase,"__buttons-wrapper")},c&&o().createElement(P,{fieldRef:function(e){return t.AISelectRef=e},name:n,label:"Image",type:i,optionsFn:"getAIImageFieldOptions",onHandleAIButtonMenuChange:function(){}}),this._renderControlButtons())))}}])&&A(t.prototype,r),n&&A(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);F.propTypes={name:a().string,type:a().string,className:a().string,addTitle:a().string,previewStyle:a().oneOfType([a().string,a().object]),showAddButton:a().bool,showEditButton:a().bool,showRemoveButton:a().bool,showResetButton:a().bool,onClickCanvas:a().func,onClickAddButton:a().func,onClickEditButton:a().func,onClickSwapButton:a().func,onClickRemoveButton:a().func,onClickResetButton:a().func,onMouseEnterPreview:a().func,onMouseLeavePreview:a().func},F.defaultProps={showAddButton:!1,showEditButton:!1,showSwapButton:!1,showRemoveButton:!1,showResetButton:!1,hideAIButton:!1};const B=F},71472:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(22211),c=r.n(s),f=r(33708),d=r.n(f),p=r(23156),h=r.n(p),m=r(62952),v=r.n(m);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==g(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===g(i)?i:String(i)),n)}var o,i}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=x(e);if(t){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}(this,r)}}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(a,e);var t,r,n,i=w(a);function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),k.call(_(t));var r=v()(_(t),"props.range_settings",{min:0,max:100,step:1}),n=h()(t.props.value);return t.state={rangeMin:r.min,rangeMax:r.max,rangeStep:r.step,value:t.emptyIfDefault(n)},t}return t=a,(r=[{key:"componentDidMount",value:function(){var e=this.props.value;this.deferredUpdate=d()(this.updateOptionAndState,700),parseFloat(this.state.rangeStep)>.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)}},{key:"componentDidUpdate",value:function(e){var t=this.emptyIfDefault(this.props.value);e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"componentWillUnmount",value:function(){this.deferredUpdate.cancel()}},{key:"getDefaultValue",value:function(){return this.addUnit(h()(this.props.default))}},{key:"emptyIfDefault",value:function(e){return e===this.getDefaultValue()?"":e}},{key:"addUnit",value:function(e){var t=this.props.default_unit;return""===e?"0".concat(t):"".concat(e).concat(t)}},{key:"removeUnit",value:function(e){var t=this.props.default_unit;return e.replace("".concat(t),"")}},{key:"checkRangeBoundaries",value:function(e){if(h()(e)){var t=parseFloat(e);t>this.state.rangeMax&&this.setState({rangeMax:t}),t<this.state.rangeMin&&this.setState({rangeMin:t}),parseFloat(this.state.rangeStep)>.1&&t%1>0&&this.setState({rangeStep:"0.1"})}}},{key:"keepWithinBoundaries",value:function(e){var t=parseFloat(e);return isNaN(t)||t<this.state.rangeMin?this.state.rangeMin:t>this.state.rangeMax?this.state.rangeMax:t}},{key:"_renderInput",value:function(){var e=this.props.id||"et-fb-".concat(this.props.name),t=this.props.name,r=this.emptyIfDefault(this.state.value);r=this.addUnit(r);var n=this.getDefaultValue(),i=""===this.removeUnit(r)?n:this.removeUnit(r);return o().createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o().createElement("input",{id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.state.rangeStep,className:"et-fb-range",value:parseFloat(i),"data-shortcuts-allowed":!0,onChange:this._updateFromRange}),o().createElement("div",{className:"et-fb-range-number"},o().createElement("input",{type:"text",value:r,placeholder:n,onChange:this._onChange,className:"et-fb-settings-option-input"})))}},{key:"render",value:function(){return o().createElement("div",{className:u()({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},this._renderInput())}}])&&y(t.prototype,r),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);S.defaultProps={default_unit:""},S.propTypes={name:a().string.isRequired,default_unit:a().string,precision:a().number};var k=function(){var e=this;this.isChangingRange=!1,this.updateOptionAndState=function(t){t=c()(t)?e.state.value:t,e.userUpdate=!0,e.setState({value:t}),e.props._onChange(e.props.name,t)},this._updateFromRange=function(t){var r=v()(t,"target.value");r=e.removeUnit(r),e.isChangingRange=!0,e.updateOptionAndState(r),e.isChangingRange=!1},this._onChange=function(t){var r=v()(t,"target.value");r=e.keepWithinBoundaries(e.removeUnit(r)),e.updateOptionAndState(r)}};const O=S},92419:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>be});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(59070),c=r(45077),f=r.n(c),d=r(47606),p=r.n(d),h=r(88546),m=r.n(h),v=r(22211),g=r.n(v),y=r(4082),b=r.n(y),w=r(61329),_=r.n(w),x=r(71839),S=r.n(x),k=r(73109),O=r.n(k),E=r(90418),C=r.n(E),j=r(8961),P=r.n(j),L=r(99021),M=r.n(L),A=r(47240),T=r.n(A),I=r(61733),R=r.n(I),N=r(62952),D=r.n(N),z=r(46762),F=r.n(z),B=r(92333),H=r.n(B),U=r(11587),W=r.n(U),V=r(43167),q=r.n(V),G=r(71641),Y=r.n(G),K=r(24911),$=r.n(K),Q=r(66459),Z=r(36789);function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function J(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==X(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==X(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===X(i)?i:String(i)),n)}var o,i}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=re(e);if(t){var o=re(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var ne={isMenuActive:a().bool,itemIndex:a().number,value:a().string,name:a().oneOfType([a().string,a().element]),selectedOption:a().string,_onChange:a().func,additionalContentFirst:a().bool},oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(a,e);var t,r,n,i=te(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).onChangeValue=function(e){if(jQuery(e.target).closest(".et-fb-select-marker, .et-fb-select-additional-content-container, .et-fb-font-removal-activated").length>0&&t.props.customMarkerAction)return!1;t.props._onChange({},t.props.value)},t.onMarkerClick=function(){t.props.customMarkerAction&&t.props.customMarkerAction(t.props.value)},t.markerToIconMapping={recent:"history",uploaded:"delete",menuArrow:"menu-expand",arrowDownDense:"arrow-down-dense"},t}return t=a,(r=[{key:"render",value:function(){if(!this.props.isMenuActive&&this.props.selectedOption!==this.props.value)return!1;if(b()(this.props.value)||g()(this.props.value))return!1;var e=this.props.selectedOption===this.props.value,t=u()({"select-option-item":!0,"select-option-item-hovered":this.props.isItemHovered,"et-fb-selected-item":e},"select-option-item-".concat(this.props.value.replace(/ /g,"_")),this.props.classNames),r=e&&this.props.displayCheckMark&&this.props.isMenuActive?o().createElement(Z.default,{icon:"check",color:"#37C4AA"}):"",n=this.props.customMarker&&""===r?o().createElement("span",{onClick:this.onMarkerClick,className:"et-fb-select-marker"},o().createElement(Z.default,{icon:this.markerToIconMapping[this.props.customMarker],color:"#BEC9D5"})):"",i=g()(this.props.additionalContent)||""===this.props.additionalContent?"":this.props.additionalContent,a=this.props.additionalContentFirst;return o().createElement("li",{className:t,onClick:this.onChangeValue,onMouseOver:this.updateActiveItemIndex,onMouseLeave:this.resetActiveItemIndex,"data-value":this.props.value,"data-testid":"select-option-".concat(this.props.value)},a?i:"",o().createElement("span",{className:"select-option-item__name"},this.props.name),r,n,a?"":i)}}])&&J(t.prototype,r),n&&J(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);oe.propTypes=ne,oe.defaultProps={additionalContentFirst:!1};const ie=oe;var ae=r(94526),le=r(46823);function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},se.apply(this,arguments)}function ce(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fe(n.key),n)}}function fe(e){var t=function(e,t){if("object"!==ue(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ue(t)?t:String(t)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=me(e);if(t){var o=me(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return he(e)}(this,r)}}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}var ve={ON:"on",OFF:"off",AUTO:"auto"},ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(a,e);var t,r,n,i=pe(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),ye.call(he(t)),t.state={iconPickerMenuCustomStyling:void 0!==t.props.iconPickerMenuCustomStyling,isControlSelectSVG:void 0!==e.isControlSelectSVG,active:e.activeOnLoad||!1,filterValue:"",deleteConfirmation:"",menuHeight:0,flattenOptions:[],selectedOption:""},t.itemIndex=0,t}return t=a,(r=[{key:"shouldComponentUpdate",value:function(e,t){return!P()(e,this.props)||!P()(t,this.state)}},{key:"componentDidMount",value:function(){window.top.addEventListener("mousedown",this.maybeCloseMenu),window.top.addEventListener("keydown",this.maybeNavigate),window.top.addEventListener("resize",this.updateMenuPosition);var e=F()(this._flattenOptions)(this.props.options),t=this.getSelectedOption(e);this.setState({flattenOptions:e,selectedOption:t}),(this.state.iconPickerMenuCustomStyling||this.state.isControlSelectSVG)&&this.updateMenuPosition(),this.state.active&&this.props.onOpen()}},{key:"componentWillUnmount",value:function(){window.top.removeEventListener("mousedown",this.maybeCloseMenu),window.top.removeEventListener("keydown",this.maybeNavigate),window.top.removeEventListener("resize",this.updateMenuPosition)}},{key:"componentDidUpdate",value:function(e,t){var r=this.state.active&&!t.active,n=!P()(e.options,this.props.options),o=e.value!==this.props.value;if((r||n)&&this.updateMenuPosition(),o){var i=this.getSelectedOption(this.state.flattenOptions);this.setState({selectedOption:i})}}},{key:"_renderSearchField",value:function(){if(!this.props.searchable||!this.state.active)return!1;var e=this.props.searchPlaceholder?this.props.searchPlaceholder:"Search";return o().createElement("li",{className:"et-fb-select-options-filter select-option-item"},o().createElement(ae.default,{type:"text",value:this.state.filterValue,name:"filterOptions",onChange:this._onFilterInput,placeholder:e}))}},{key:"_getSelectedOptionItem",value:function(e){var t=this.props.value,r=!g()(t)&&""!==t,n=!g()(this.props.additionalOptions)&&!C()(this.props.additionalOptions)&&this.props.additionalOptions;if(g()(t))return"";if(r&&(r=Array.isArray(e)?-1!==H()(e,t):!g()(e[t])),!r&&!C()(n)&&W()(n,"uploaded")){var o=n.uploaded.filter((function(e){return t===e}));if(!C()(o)&&Array.isArray(o))return o[0]}return r||(t=this.props.selectFirst?Array.isArray(e)?e[0]:T()(e,(function(e){return!C()(e)})):null),t}},{key:"render",value:function(){var e,t,r=this,n=this.state.menuHeight,i=this.state.active&&!this.props.activeOnLoad?o().createElement("div",{className:"et-fb-settings-option-select-advanced-placeholder"}):"",a={};this.itemIndex=0;var l={"et-fb-settings-option-select":!0,"et-fb-allow-mouse-wheel":this.state.active,"et-fb-settings-option-select-advanced":!0},c={"et-fb-settings-custom-select-wrapper":!0,"et-fb-settings-option-select-active":this.state.active,"et-fb-settings-option-select-closed":!this.state.active,"et-fb-settings-option-select-searchable":this.state.active&&this.props.searchable,"et-fb-settings-option-select-grouped-options":this.state.active&&this._isOptionsGrouped(),"et-fb-settings-option-select-readonly":this.props.readonly};"column_structure"===this.props.processedKey&&(l["et-fb-settings-option-select--column-structure"]=!0),this.props.className?l[this.props.className]=!0:l["et-fb-main-setting"]=!0,t=this._renderActiveOption(this.state.flattenOptions),e=this._render_options(this.props.options);var f=this._renderSearchField();this.state.active&&(a.top=this.state.menuPosition,a.width=this.state.menuWidth,this.state.iconPickerMenuCustomStyling&&a.width&&(a.marginLeft=a.width-145));var d=-1!==[ve.ON,ve.AUTO].indexOf(this.props.preserveHeight)&&this._renderHeightPreserver();if(this.state.isControlSelectSVG&&!this.state.active){var p=this._render_options_svg(this.props.options);t=o().createElement("li",{className:"et-fb-settings-custom-select-wrapper-inner"},o().createElement("ul",null,t,o().createElement("li",{className:"et-fb-select__height-preserver--hidden"},o().createElement("ul",null,p))))}var h=this.state.active?o().createElement(s.y_,{defaultStyle:{size:.8,opacity:0},style:{size:(0,s.ST)(1,{stiffness:300,damping:20}),opacity:(0,s.ST)(1,{stiffness:300,damping:20})}},(function(i){return o().createElement("ul",{className:u()(l),style:{maxHeight:n>0?n:"none",opacity:i.opacity,transform:"scale( ".concat(i.size," )")},role:r.props.role},o().createElement("li",{className:"et-fb-settings-custom-select-wrapper-inner et-fb-allow-mouse-wheel-form"},o().createElement("ul",null,r.props.beforeList(),f,t,void 0,e,r.props.afterList(d))))})):this.props.activeOnLoad?null:o().createElement("ul",{className:u()(l),style:{maxHeight:n>0?n:"none"}},t),m={onClick:this.toggleMenu};this.props.readonly&&delete m.onClick;var v,g,y,b=(v={"et-fb-settings-custom-select-wrapper-outer":!0},g="et-fb-settings-".concat(this.props.name,"-select-wrapper-outer"),y=!0,(g=fe(g))in v?Object.defineProperty(v,g,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[g]=y,v);return o().createElement("div",{className:u()(b),ref:this.divRef},i,o().createElement("div",se({id:"et-fb-".concat(this.props.name),className:u()(c),style:a},m),h))}}])&&ce(t.prototype,r),n&&ce(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o().Component),ye=function(){var e=this;this.divRef=(0,n.createRef)(),this.updateMenuPosition=function(){e.heightPreserverRef&&jQuery(e.heightPreserverRef).addClass("et-fb-select__height-preserver--hidden");var t=jQuery(e.divRef.current),r=!e.state.active&&e.state.isControlSelectSVG,n=t.find(".et-fb-settings-custom-select-wrapper-inner:first").outerHeight();if(r&&Math.max(n,e.state.menuHeight)<241){var o=t.find(".et-fb-settings-custom-select-wrapper-inner").find(".et-fb-select__svg-height-preserver--hidden:first");o.length&&(n=o.css({display:"block"}).outerHeight(),o.css({display:"none"}))}var i=Math.max(n,e.state.menuHeight),a=0;jQuery(top.window.document).find("#wpadminbar").length&&(a=jQuery(top.window.document).find("#wpadminbar").innerHeight());var l=a+30,u=(0,le.Nr)(jQuery(window.top),t,t,i,l,100),s=e.heightPreserverRef&&i>n,c=e.props.preserveHeight===ve.ON||!u.flags.fitsInBottomSpace;s&&c&&jQuery(e.heightPreserverRef).height(Math.ceil(i-n)).removeClass("et-fb-select__height-preserver--hidden"),e.setState({menuPosition:u.position.top,menuWidth:u.size.width,menuHeight:u.size.height})},this.isSocialMediaItem=function(){return"et_pb_social_media_follow_network"===D()(e.props,"module.props.module.props.type","")},this.isSelectedOption=function(t,r){return r===e.state.selectedOption},this._onFilterInput=function(t){e.setState({filterValue:t.target.value})},this.deleteFont=function(t){e.setState({deleteConfirmation:t})},this.cancelFontRemove=function(){e.setState({deleteConfirmation:""})},this.openFontUploader=function(){e._closeMenu()},this.fonUploaderFinishedCallback=function(t){e._onChange("",t)},this.getSelectedOption=function(t){return e._getSelectedOptionItem(t)},this.renderNoResults=function(){return o().createElement("li",{className:"select-option-item et-fb-selected-item"},ETBuilderBackend.i18n.selectControl.noResults)},this._renderActiveOption=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.state.selectedOption;if(e.state.active&&(!e.props.searchable||""!==e.state.filterValue||!n))return!1;var i=Array.isArray(t)?{0:n}:_()(t,e.isSelectedOption);if(!C()(i)){var a=S()(i)[0],l=O()(i)[0],u=Array.isArray(t)?l:a,s=a;""!==r&&(s="".concat(r,"-").concat(s));var c=o().createElement(ie,{key:s,additionalContent:"",value:u,name:e._getLabelForOption(l,u),isMenuActive:e.state.active,selectedOption:n,_onChange:e._onChange,itemIndex:0,isItemHovered:!1,_closeMenu:e._closeMenu,displayCheckMark:!0,customMarker:e.props.customMarker});return e.state.active?o().createElement("li",{className:"et-fb-option-subgroup",key:s},o().createElement("ul",null,c)):c}return"select_product"===e.props.type&&e.renderNoResults()},this._flattenOptions=function(t){var r=Array.isArray(t)?[]:{};for(var n in t){var o=t[n];if(o&&"object"===ue(o))if(e.isSocialMediaItem())r[n]=o.value;else for(var i in o)r[i]=o[i];else r[n]=o}return r},this._isOptionsGrouped=function(){return!P()(e.state.flattenOptions,e.props.options)},this._render_options_svg=function(t){if(!e.state.isControlSelectSVG||e.state.active)return null;var r=Array.isArray(t),n=r?t:S()(t),o=e.state.selectedOption;return f()(n,(function(n,i){var a=r?i:n,l=D()(t,a);return e._renderOptionsItem(l,a,o,"","-svg")}))},this._render_options=function(t){if(!e.state.active)return!1;var r=Array.isArray(t),n=r?t:S()(t),i=e.props;if(!C()(i.order)){var a=f()(i.order,String);n=M()(Y()(a,n),q()(n,a))}var l=e.state.selectedOption;return f()(n,(function(n,i){var a=r?i:n,s=D()(t,a);if(!e.isSocialMediaItem()&&(b()(s)||Array.isArray(s))){var c=f()(s,(function(t,r){return e._renderOptionsItem(t,r,l,a)})),d=W()(e.props.optionGroups,a)?e.props.optionGroups[a]:a,p={"et-fb-option-subgroup":!0,"et-fb-option-subgroup-separator":!!g()(e.props.groupSeparator)||e.props.groupSeparator};return o().createElement("li",{className:u()(p),key:a},o().createElement("p",{className:"et-fb-subgroup-title"},d),o().createElement("ul",null,c))}return e._renderOptionsItem(s,a,l)}))},this._getLabelForOption=function(t,r){var n=C()(t)&&!C()(e.props.emptyLabel)?e.props.emptyLabel:t;return R()(e.props.labelFilter)||(n=e.props.labelFilter(n,r)),n},this._renderOptionsItem=function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=m()(r)?t:r,u=""!==i?"".concat(i,"-").concat(l).concat(a):"".concat(l).concat(a),s="";if(!p()(t)&&e.isSocialMediaItem()&&(t=t.value),-1!==t.toLowerCase().indexOf(e.state.filterValue.toLowerCase())){e.itemIndex++;var c=e.props.getSvgContent;return(0,Q.isFunction)(c)&&(s=c(l)),o().createElement(ie,{key:u,additionalContent:s,value:l,name:e._getLabelForOption(t,l),isMenuActive:e.state.active||""!==a,selectedOption:n,_onChange:e._onChange,itemIndex:e.itemIndex,_closeMenu:e._closeMenu,displayCheckMark:!0,customMarker:!1,additionalContentFirst:e.props.additionalContentFirst})}},this._renderHeightPreserver=function(){return o().createElement("li",{ref:function(t){return e.heightPreserverRef=t},className:"et-fb-select-options-filter select-option-item et-fb-select__height-preserver"})},this.toggleMenu=function(t){window.top.jQuery(t.target).closest(".et-fb-select-options-filter, .et-fb-upload-font, .et-common-icon--delete, .et-fb-font-removal-activated").length>0||e.setState({active:!e.state.active,menuHeight:0,deleteConfirmation:"",filterValue:""},(function(){e.state.active?e.props.onOpen():e.props.onClose()}))},this.maybeCloseMenu=function(t){e.state.active&&jQuery(t.target).closest(jQuery(e.divRef.current)).length<1&&e._closeMenu()},this._performScrolling=function(t){var r="down"===t?"+=".concat(26):"-=".concat(26);jQuery(e.divRef.current).find(".et-fb-settings-option-select").animate({scrollTop:r},0)},this._onChange=function(t,r,n){if(r!==e.state.selectedOption)if(g()(e.props.__onChange)){var o=e.props.name,i=g()(r)?t.target.value:r;e.props._onChange(o,i)}else e.props.__onChange(r);n&&e._closeMenu()},this._onChangeAdditional=function(){return e._closeMenu()},this._closeMenu=function(){e.setState({active:!1,menuHeight:0,deleteConfirmation:""},e.props.onClose);var t=jQuery(window.top.document.body),r=t.css("display"),n="initial"===r?"block":"initial";t.css({display:n}),setTimeout((function(){t.css({display:r})}),0)}};ge.propTypes={selectFirst:a().bool,emptyLabel:a().string,role:a().string,labelFilter:a().func,preserveHeight:a().oneOf(O()(ve)),beforeList:a().func,afterList:a().func,onOpen:a().func,onClose:a().func,getSvgContent:a().oneOfType([a().bool,a().func]),customMarker:a().string,additionalContentFirst:a().bool},ge.defaultProps={selectFirst:!0,emptyLabel:"",role:"",labelFilter:null,preserveHeight:ve.AUTO,beforeList:$(),afterList:$(),onOpen:$(),onClose:$(),getSvgContent:!1,customMarker:"menuArrow",additionalContentFirst:!1};const be=ge},25425:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Ce});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i),l=r(45298);const u="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect,s=(e,t,r)=>{u((()=>{if(e)return;const n=t.current;return r(n,!0),()=>{r(n)}}),[e,t,r])},c="szh-menu",f="item",d=(0,n.createContext)(),p=(0,n.createContext)({}),h=(0,n.createContext)({}),m=(0,n.createContext)({}),v=(0,n.createContext)({}),g=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),y=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),b=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),w=Object.freeze({FIRST:"first",LAST:"last"}),_=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),x="absolute",S="menuitem",k={"aria-hidden":!0,role:S};function O(e,t){"function"==typeof e?e(t):e.current=t}const E=(e,t)=>(0,n.useMemo)((()=>e?t?r=>{O(e,r),O(t,r)}:e:t),[e,t]),C=({block:e,element:t,modifiers:r,className:o})=>(0,n.useMemo)((()=>{const n=t?`${e}__${t}`:e;let i=n;r&&Object.keys(r).forEach((e=>{const t=r[e];t&&(i+=` ${n}--${!0===t?e:`${e}-${t}`}`)}));let a="function"==typeof o?o(r):o;return"string"==typeof a&&(a=a.trim(),a&&(i+=` ${a}`)),i}),[e,t,r,o]),j=(e,t)=>{const r=(0,n.memo)(t),o=(0,n.forwardRef)(((e,t)=>{const o=(0,n.useRef)(null);return(0,l.jsx)(r,{...e,itemRef:o,externalRef:t,isHovering:(0,n.useContext)(d)===o.current})}));return o.displayName=`WithHovering(${e})`,o};var P=r(61533);const L=e=>!!e&&"o"===e[0],M=P.unstable_batchedUpdates||(e=>e()),A=(Object.values,(e,t,r=1e-4)=>Math.abs(e-t)<r),T=(e,t)=>!0===e||!(!e||!e[t]),I=(e,t)=>"function"==typeof e?e(t):e,R="_szhsinMenu",N=(e,t)=>Object.defineProperty(t,R,{value:e}),D=(e,t)=>(t&&Object.keys(t).forEach((r=>{const n=e[r],o=t[r];e[r]="function"==typeof o&&n?(...e)=>{o(...e),n(...e)}:o})),e),z=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:r,overflowY:n}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+n+r))return e}};function F(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function B(e,t){for(let r=0;r<e.length;r++)if(e[r]===t)return r;return-1}const H=j("FocusableItem",(function({className:e,disabled:t,children:r,isHovering:o,itemRef:i,externalRef:a,...u}){const d=!!t,h=(0,n.useRef)(null),{setHover:g,onPointerLeave:b,...w}=((e,t,r,o)=>{const{submenuCloseDelay:i}=(0,n.useContext)(v),{isParentOpen:a,submenuCtx:l,dispatch:u,updateItems:c}=(0,n.useContext)(p),f=()=>{!r&&!o&&u(y.SET,e.current)},d=()=>{!o&&u(y.UNSET,e.current)};return s(o,e,c),(0,n.useEffect)((()=>{r&&a&&t.current&&t.current.focus()}),[t,r,a]),{setHover:f,onBlur:e=>{r&&!e.currentTarget.contains(e.relatedTarget)&&d()},onPointerMove:e=>{o||(e.stopPropagation(),l.on(i,f,f))},onPointerLeave:(e,t)=>{l.off(),!t&&d()}}})(i,h,o,d),{handleClose:_}=(0,n.useContext)(m),x=(0,n.useMemo)((()=>({disabled:d,hover:o,focusable:!0})),[d,o]),k=(0,n.useMemo)((()=>I(r,{...x,ref:h,closeMenu:_})),[r,x,_]),O=D({...w,onPointerLeave:e=>b(e,!0),onFocus:g},u);return(0,l.jsx)("li",{role:S,...F(d),...O,ref:E(a,i),className:C({block:c,element:f,modifiers:x,className:e}),children:k})})),U=(0,n.memo)((0,n.forwardRef)((function({className:e,...t},r){return(0,l.jsx)("li",{role:"separator",...t,ref:r,className:C({block:c,element:"divider",className:e})})}))),W=N("MenuButton",(0,n.forwardRef)((function({className:e,isOpen:t,disabled:r,children:o,...i},a){const u=(0,n.useMemo)((()=>({open:t})),[t]);return(0,l.jsx)("button",{"aria-haspopup":!0,"aria-expanded":t,"aria-disabled":r||void 0,type:"button",disabled:r,...i,ref:a,className:C({block:"szh-menu-button",modifiers:u,className:e}),children:o})}))),V=({className:e,containerRef:t,containerProps:r,children:o,isOpen:i,theming:a,transition:u,onClose:s})=>{const c=T(u,"item");return(0,l.jsx)("div",{...D({onKeyDown:({key:e})=>{if(e===g.ESC)I(s,{key:e,reason:b.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&I(s,{reason:b.BLUR})}},r),className:C({block:"szh-menu-container",modifiers:(0,n.useMemo)((()=>({theme:a,itemTransition:c})),[a,c]),className:e}),style:{position:"absolute",...null==r?void 0:r.style},ref:t,children:o})},q=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(r,n,o)=>{t?e||(e=setTimeout((()=>{e=0,n()}),r)):null==o||o()},off:()=>{e&&(clearTimeout(e),e=0)}}},G=(e,t,r,n)=>{const o=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),a=r===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:r.getBoundingClientRect(),l=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?r:t[1];return{top:r,right:n,bottom:isNaN(t[2])?r:t[2],left:isNaN(t[3])?n:t[3]}})(n),u=e=>e+i.left-a.left-l.left,s=e=>e+i.left+o.width-a.right+l.right,c=e=>e+i.top-a.top-l.top,f=e=>e+i.top+o.height-a.bottom+l.bottom;return{menuRect:o,containerRect:i,getLeftOverflow:u,getRightOverflow:s,getTopOverflow:c,getBottomOverflow:f,confineHorizontally:e=>{let t=u(e);if(t<0)e-=t;else{const r=s(e);r>0&&(t=u(e-=r),t<0&&(e-=t))}return e},confineVertically:e=>{let t=c(e);if(t<0)e-=t;else{const r=f(e);r>0&&(t=c(e-=r),t<0&&(e-=t))}return e}}},Y=({anchorRect:e,containerRect:t,menuRect:r,placeLeftorRightY:n,placeLeftX:o,placeRightX:i,getLeftOverflow:a,getRightOverflow:l,confineHorizontally:u,confineVertically:s,arrowRef:c,arrow:f,direction:d,position:p})=>{let h,m,v,g=d,y=n;"initial"!==p&&(y=s(y),"anchor"===p&&(y=Math.min(y,e.bottom-t.top),y=Math.max(y,e.top-t.top-r.height))),"left"===g?(h=o,"initial"!==p&&(m=a(h),m<0&&(v=l(i),(v<=0||-m>v)&&(h=i,g="right")))):(h=i,"initial"!==p&&(v=l(h),v>0&&(m=a(o),(m>=0||-m<v)&&(h=o,g="left")))),"auto"===p&&(h=u(h));const b=f?(({arrowRef:e,menuY:t,anchorRect:r,containerRect:n,menuRect:o})=>{let i=r.top-n.top-t+r.height/2;const a=1.25*e.current.offsetHeight;return i=Math.max(a,i),i=Math.min(i,o.height-a),i})({menuY:y,arrowRef:c,anchorRect:e,containerRect:t,menuRect:r}):void 0;return{arrowY:b,x:h,y,computedDirection:g}},K=({anchorRect:e,containerRect:t,menuRect:r,placeToporBottomX:n,placeTopY:o,placeBottomY:i,getTopOverflow:a,getBottomOverflow:l,confineHorizontally:u,confineVertically:s,arrowRef:c,arrow:f,direction:d,position:p})=>{let h,m,v,g="top"===d?"top":"bottom",y=n;"initial"!==p&&(y=u(y),"anchor"===p&&(y=Math.min(y,e.right-t.left),y=Math.max(y,e.left-t.left-r.width))),"top"===g?(h=o,"initial"!==p&&(m=a(h),m<0&&(v=l(i),(v<=0||-m>v)&&(h=i,g="bottom")))):(h=i,"initial"!==p&&(v=l(h),v>0&&(m=a(o),(m>=0||-m<v)&&(h=o,g="top")))),"auto"===p&&(h=s(h));const b=f?(({arrowRef:e,menuX:t,anchorRect:r,containerRect:n,menuRect:o})=>{let i=r.left-n.left-t+r.width/2;const a=1.25*e.current.offsetWidth;return i=Math.max(a,i),i=Math.min(i,o.width-a),i})({menuX:y,arrowRef:c,anchorRect:e,containerRect:t,menuRect:r}):void 0;return{arrowX:b,x:y,y:h,computedDirection:g}},$=({ariaLabel:e,menuClassName:t,menuStyle:r,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:f,containerProps:m,focusProps:_,externalRef:S,parentScrollingRef:O,align:j="start",direction:R="bottom",position:N="auto",overflow:H="visible",setDownOverflow:U,repositionFlag:W,captureFocus:$=!0,state:Q,endTransition:Z,isDisabled:X,menuItemFocus:J,gap:ee=0,shift:te=0,children:re,onClose:ne,...oe})=>{const[ie,ae]=(0,n.useState)({x:-9999,y:-9999}),[le,ue]=(0,n.useState)({}),[se,ce]=(0,n.useState)(),[fe,de]=(0,n.useState)(R),[pe]=(0,n.useState)(q),[he,me]=(0,n.useReducer)((e=>e+1),1),{transition:ve,boundingBoxRef:ge,boundingBoxPadding:ye,rootMenuRef:be,rootAnchorRef:we,scrollNodesRef:_e,reposition:xe,viewScroll:Se,submenuCloseDelay:ke}=(0,n.useContext)(v),{submenuCtx:Oe,reposSubmenu:Ee=W}=(0,n.useContext)(h),Ce=(0,n.useRef)(null),je=(0,n.useRef)(),Pe=(0,n.useRef)(),Le=(0,n.useRef)(!1),Me=(0,n.useRef)({width:0,height:0}),Ae=(0,n.useRef)((()=>{})),{hoverItem:Te,dispatch:Ie,updateItems:Re}=((e,t)=>{const[r,o]=(0,n.useState)(),i=(0,n.useRef)({items:[],hoverIndex:-1,sorted:!1}).current,a=(0,n.useCallback)(((e,r)=>{const{items:n}=i;if(e)if(r)n.push(e);else{const r=n.indexOf(e);r>-1&&(n.splice(r,1),e.contains(document.activeElement)&&(t.current.focus(),o()))}else i.items=[];i.hoverIndex=-1,i.sorted=!1}),[i,t]);return{hoverItem:r,dispatch:(0,n.useCallback)(((t,r,n)=>{const{items:a,hoverIndex:l}=i,u=()=>{if(i.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");a.sort(((e,r)=>B(t,e)-B(t,r))),i.sorted=!0};let s,c=-1;switch(t){case y.RESET:break;case y.SET:s=r;break;case y.UNSET:s=e=>e===r?void 0:e;break;case y.FIRST:u(),c=0,s=a[c];break;case y.LAST:u(),c=a.length-1,s=a[c];break;case y.SET_INDEX:u(),c=n,s=a[c];break;case y.INCREASE:u(),c=l,c<0&&(c=a.indexOf(r)),c++,c>=a.length&&(c=0),s=a[c];break;case y.DECREASE:u(),c=l,c<0&&(c=a.indexOf(r)),c--,c<0&&(c=a.length-1),s=a[c]}s||(c=-1),o(s),i.hoverIndex=c}),[e,i]),updateItems:a}})(Ce,je),Ne=L(Q),De=T(ve,"open"),ze=T(ve,"close"),Fe=_e.current,Be=(0,n.useCallback)((e=>{var t;const r=s?null==(t=s.current)?void 0:t.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!r)return void 0;Fe.menu||(Fe.menu=(ge?ge.current:z(be.current))||window);const n=G(f,Ce,Fe.menu,ye);let{arrowX:i,arrowY:l,x:u,y:c,computedDirection:d}=(({arrow:e,align:t,direction:r,gap:n,shift:o,position:i,anchorRect:a,arrowRef:l,positionHelpers:u})=>{const{menuRect:s,containerRect:c}=u,f="left"===r||"right"===r;let d=f?n:o,p=f?o:n;if(e){const e=l.current;f?d+=e.offsetWidth:p+=e.offsetHeight}const h=a.left-c.left-s.width-d,m=a.right-c.left+d,v=a.top-c.top-s.height-p,g=a.bottom-c.top+p;let y,b;"end"===t?(y=a.right-c.left-s.width,b=a.bottom-c.top-s.height):"center"===t?(y=a.left-c.left-(s.width-a.width)/2,b=a.top-c.top-(s.height-a.height)/2):(y=a.left-c.left,b=a.top-c.top),y+=d,b+=p;const w={...u,anchorRect:a,placeLeftX:h,placeRightX:m,placeLeftorRightY:b,placeTopY:v,placeBottomY:g,placeToporBottomX:y,arrowRef:l,arrow:e,direction:r,position:i};switch(r){case"left":case"right":return Y(w);default:return K(w)}})({arrow:o,align:j,direction:R,gap:ee,shift:te,position:N,anchorRect:r,arrowRef:Pe,positionHelpers:n});const{menuRect:p}=n;let h=p.height;if(!e&&"visible"!==H){const{getTopOverflow:e,getBottomOverflow:t}=n;let r,o;const i=Me.current.height,a=t(c);if(a>0||A(a,0)&&A(h,i))r=h-a,o=a;else{const t=e(c);(t<0||A(t,0)&&A(h,i))&&(r=h+t,o=0-t,r>=0&&(c-=t))}r>=0?(h=r,ce({height:r,overflowAmt:o})):ce()}o&&ue({x:i,y:l}),ae({x:u,y:c}),de(d),Me.current={width:p.width,height:h}}),[o,j,ye,R,ee,te,N,H,a,s,f,ge,be,Fe]);u((()=>{Ne&&(Be(),Le.current&&me()),Le.current=Ne,Ae.current=Be}),[Ne,Be,Ee]),u((()=>{se&&!U&&(Ce.current.scrollTop=0)}),[se,U]),u((()=>Re),[Re]),(0,n.useEffect)((()=>{let{menu:e}=Fe;if(!Ne||!e)return;if(e=e.addEventListener?e:window,!Fe.anchors){Fe.anchors=[];let t=z(we&&we.current);for(;t&&t!==e;)Fe.anchors.push(t),t=z(t)}let t=Se;if(Fe.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const r=()=>{"auto"===t?M((()=>Be(!0))):I(ne,{reason:b.SCROLL})},n=Fe.anchors.concat("initial"!==Se?e:[]);return n.forEach((e=>e.addEventListener("scroll",r))),()=>n.forEach((e=>e.removeEventListener("scroll",r)))}),[we,Fe,Ne,ne,Se,Be]);const He=!!se&&se.overflowAmt>0;(0,n.useEffect)((()=>{if(He||!Ne||!O)return;const e=()=>M(Be),t=O.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}),[Ne,He,O,Be]),(0,n.useEffect)((()=>{if("function"!=typeof ResizeObserver||"initial"===xe)return;const e=new ResizeObserver((([e])=>{const{borderBoxSize:t,target:r}=e;let n,o;if(t){const{inlineSize:e,blockSize:r}=t[0]||t;n=e,o=r}else{const e=r.getBoundingClientRect();n=e.width,o=e.height}0!==n&&0!==o&&(A(n,Me.current.width,1)&&A(o,Me.current.height,1)||(0,P.flushSync)((()=>{Ae.current(),me()})))})),t=Ce.current;return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}),[xe]),(0,n.useEffect)((()=>{if(!Ne)return Ie(y.RESET),void(ze||ce());const{position:e,alwaysUpdate:t}=J||{},r=()=>{e===w.FIRST?Ie(y.FIRST):e===w.LAST?Ie(y.LAST):e>=-1&&Ie(y.SET_INDEX,void 0,e)};if(t)r();else if($){const e=setTimeout((()=>{const e=Ce.current;e&&!e.contains(document.activeElement)&&(je.current.focus(),r())}),De?170:100);return()=>clearTimeout(e)}}),[Ne,De,ze,$,J,Ie]);const Ue=(0,n.useMemo)((()=>({isParentOpen:Ne,submenuCtx:pe,dispatch:Ie,updateItems:Re})),[Ne,pe,Ie,Re]);let We,Ve;se&&(U?Ve=se.overflowAmt:We=se.height);const qe=(0,n.useMemo)((()=>({reposSubmenu:he,submenuCtx:pe,overflow:H,overflowAmt:Ve,parentMenuRef:Ce,parentDir:fe})),[he,pe,H,Ve,fe]),Ge=We>=0?{maxHeight:We,overflow:H}:void 0,Ye=(0,n.useMemo)((()=>({state:Q,dir:fe})),[Q,fe]),Ke=(0,n.useMemo)((()=>({dir:fe})),[fe]),$e=C({block:c,element:"arrow",modifiers:Ke,className:i.className}),Qe=(0,l.jsxs)("ul",{role:"menu","aria-label":e,...F(X),...D({onPointerEnter:null==Oe?void 0:Oe.off,onPointerMove:e=>{e.stopPropagation(),pe.on(ke,(()=>{Ie(y.RESET),je.current.focus()}))},onPointerLeave:e=>{e.target===e.currentTarget&&pe.off()},onKeyDown:e=>{switch(e.key){case g.HOME:Ie(y.FIRST);break;case g.END:Ie(y.LAST);break;case g.UP:Ie(y.DECREASE,Te);break;case g.DOWN:Ie(y.INCREASE,Te);break;case g.SPACE:return void(e.target&&-1!==e.target.className.indexOf(c)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===Q&&ce(),I(Z)}},oe),ref:E(S,Ce),className:C({block:c,modifiers:Ye,className:t}),style:{...r,...Ge,margin:0,display:"closed"===Q?"none":void 0,position:x,left:ie.x,top:ie.y},children:[(0,l.jsx)("li",{tabIndex:-1,style:{position:x,left:0,top:0,display:"block",outline:"none"},ref:je,...k,..._}),o&&(0,l.jsx)("li",{...k,...i,className:$e,style:{display:"block",position:x,left:le.x,top:le.y,...i.style},ref:Pe}),(0,l.jsx)(h.Provider,{value:qe,children:(0,l.jsx)(p.Provider,{value:Ue,children:(0,l.jsx)(d.Provider,{value:Te,children:I(re,Ye)})})})]});return m?(0,l.jsx)(V,{...m,isOpen:Ne,children:Qe}):Qe},Q=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Z=e=>({_s:e,status:Q[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),X=e=>e?6:5,J=(e,t,r,n,o)=>{clearTimeout(n.current);const i=Z(e);t(i),r.current=i,o&&o({current:i})},ee=({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:i,initialEntered:a,mountOnEnter:l,unmountOnExit:u,onStateChange:s}={})=>{const[c,f]=(0,n.useState)((()=>Z(a?2:X(l)))),d=(0,n.useRef)(c),p=(0,n.useRef)(),[h,m]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),v=(0,n.useCallback)((()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return X(t)}})(d.current._s,u);e&&J(e,f,d,p,s)}),[s,u]),g=(0,n.useCallback)((n=>{const i=e=>{switch(J(e,f,d,p,s),e){case 1:h>=0&&(p.current=setTimeout(v,h));break;case 4:m>=0&&(p.current=setTimeout(v,m));break;case 0:case 3:p.current=((e,t)=>setTimeout((()=>{isNaN(document.body.offsetTop)||e(t+1)}),0))(i,e)}},a=d.current.isEnter;"boolean"!=typeof n&&(n=!a),n?!a&&i(e?r?0:1:2):a&&i(t?o?3:4:X(u))}),[v,s,e,t,r,o,h,m,u]);return(0,n.useEffect)((()=>()=>clearTimeout(p.current)),[]),[c,g,v]},te=e=>{const[t,r]=(({initialOpen:e,initialMounted:t,unmountOnClose:r,transition:n,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=ee({initialEntered:e,mountOnEnter:!t,unmountOnExit:r,timeout:o,enter:T(n,"open"),exit:T(n,"close")});return[{state:_[i],endTransition:l},a]})(e),[o,i]=(0,n.useState)();return[{menuItemFocus:o,...t},r,(e,t)=>{i({position:e,alwaysUpdate:t}),r(!0)}]},re=(e,t)=>{const r=(0,n.useRef)(t);(0,n.useEffect)((()=>{r.current!==t&&I(e,{open:t}),r.current=t}),[e,t])},ne=j("SubMenu",(function({"aria-label":e,className:t,disabled:r,direction:o,label:i,openTrigger:a,onMenuChange:u,isHovering:d,instanceRef:m,itemRef:b,captureFocus:_,repositionFlag:x,itemProps:k={},...O}){const j=(0,n.useContext)(v),{rootMenuRef:A,submenuOpenDelay:T,submenuCloseDelay:R}=j,{parentMenuRef:N,parentDir:z,overflow:B}=(0,n.useContext)(h),{isParentOpen:H,submenuCtx:U,dispatch:W,updateItems:V}=(0,n.useContext)(p),q="visible"!==B,[G,Y,K]=te(j),{state:Q}=G,Z=!!r,X=L(Q),J=(0,n.useRef)(null),[ee]=(0,n.useState)({v:0}),ne=()=>{U.off(),ee.v&&(clearTimeout(ee.v),ee.v=0)},oe=(...e)=>{ne(),ie(),!Z&&K(...e)},ie=()=>!d&&!Z&&W(y.SET,b.current),ae=e=>{ie(),a||(ee.v=setTimeout((()=>M(oe)),Math.max(e,0)))};s(Z,b,V),re(u,X),(0,n.useEffect)((()=>U.toggle(X)),[U,X]),(0,n.useEffect)((()=>()=>clearTimeout(ee.v)),[ee]),(0,n.useEffect)((()=>{d&&H?b.current.focus():Y(!1)}),[d,H,Y,b]),(0,n.useImperativeHandle)(m,(()=>({openMenu:(...e)=>{H&&oe(...e)},closeMenu:()=>{X&&(b.current.focus(),Y(!1))}})));const le=(0,n.useMemo)((()=>({open:X,hover:d,disabled:Z,submenu:!0})),[X,d,Z]),{ref:ue,className:se,...ce}=k,fe=D({onPointerEnter:U.off,onPointerMove:e=>{Z||(e.stopPropagation(),ee.v||X||U.on(R,(()=>ae(T-R)),(()=>ae(T))))},onPointerLeave:()=>{ne(),X||W(y.UNSET,b.current)},onKeyDown:e=>{if(d)switch(e.key){case g.ENTER:e.preventDefault();case g.SPACE:case g.RIGHT:"none"!==a&&oe(w.FIRST)}},onClick:()=>"none"!==a&&oe()},ce);return(0,l.jsxs)("li",{className:C({block:c,element:"submenu",className:t}),style:{position:"relative"},role:"presentation",ref:J,onKeyDown:e=>{let t=!1;switch(e.key){case g.LEFT:X&&(b.current.focus(),Y(!1),t=!0);break;case g.RIGHT:X||(t=!0)}t&&(e.preventDefault(),e.stopPropagation())},children:[(0,l.jsx)("div",{role:S,"aria-haspopup":!0,"aria-expanded":X,...F(Z,d),...fe,ref:E(ue,b),className:C({block:c,element:f,modifiers:le,className:se}),children:(0,n.useMemo)((()=>I(i,le)),[i,le])}),Q&&(()=>{const t=(0,l.jsx)($,{...O,...G,ariaLabel:e||("string"==typeof i?i:"Submenu"),anchorRef:b,containerRef:q?A:J,direction:o||("right"===z||"left"===z?z:"right"),parentScrollingRef:q&&N,isDisabled:Z}),r=A.current;return q&&r?(0,P.createPortal)(t,r):t})()]})})),oe=(0,n.forwardRef)((function({"aria-label":e,className:t,containerProps:r,initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:c,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:p=150,viewScroll:h="initial",portal:y,theming:w,onItemClick:_,...x},S){const k=(0,n.useRef)(null),O=(0,n.useRef)({}),{anchorRef:E,state:C,onClose:j}=x,L=(0,n.useMemo)((()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:c,rootMenuRef:k,rootAnchorRef:E,scrollNodesRef:O,reposition:f,viewScroll:h,submenuOpenDelay:d,submenuCloseDelay:p})),[o,i,a,u,E,s,c,f,h,d,p]),M=(0,n.useMemo)((()=>({handleClick(e,t){e.stopPropagation||I(_,e);let r=e.keepOpen;void 0===r&&(r=t&&e.key===g.SPACE),r||I(j,{value:e.value,key:e.key,reason:b.CLICK})},handleClose(e){I(j,{key:e,reason:b.CLICK})}})),[_,j]);if(!C)return null;const A=(0,l.jsx)(v.Provider,{value:L,children:(0,l.jsx)(m.Provider,{value:M,children:(0,l.jsx)($,{...x,ariaLabel:e||"Menu",externalRef:S,containerRef:k,containerProps:{className:t,containerRef:k,containerProps:r,theming:w,transition:a,onClose:j}})})});return!0===y&&"undefined"!=typeof document?(0,P.createPortal)(A,document.body):y?y.target?(0,P.createPortal)(A,y.target):y.stablePosition?null:A:A})),ie=(0,n.forwardRef)((function({"aria-label":e,captureFocus:t,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...u},s){const[c,f,d]=te(u),{state:p}=c,h=L(p),m=(0,n.useRef)(null),v=((e,t)=>{const[r]=(0,n.useState)({});return{onMouseDown:()=>{r.v=e&&"closed"!==e},onClick:e=>r.v?r.v=!1:t(!0,e)}})(p,((e,t)=>d(t.detail?void 0:w.FIRST))),y=(0,n.useCallback)((e=>{f(!1),e.key&&m.current.focus()}),[f]),b=I(o,{open:h});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const _={ref:E(b.ref,m),...D({onKeyDown:e=>{switch(e.key){case g.UP:d(w.LAST);break;case g.DOWN:d(w.FIRST);break;default:return}e.preventDefault()},...v},b.props)};"MenuButton"===b.type[R]&&(_.isOpen=h);const x=(0,n.cloneElement)(b,_);return re(a,h),(0,n.useImperativeHandle)(i,(()=>({openMenu:d,closeMenu:()=>f(!1)}))),(0,l.jsxs)(n.Fragment,{children:[x,(0,l.jsx)(oe,{...u,...c,"aria-label":e||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:m,ref:s,onClose:y})]})}));var ae=r(93379),le=r.n(ae),ue=r(7795),se=r.n(ue),ce=r(90569),fe=r.n(ce),de=r(3565),pe=r.n(de),he=r(19216),me=r.n(he),ve=r(44589),ge=r.n(ve),ye=r(84202),be={};be.styleTagTransform=ge(),be.setAttributes=pe(),be.insert=fe().bind(null,"head"),be.domAPI=se(),be.insertStyleElement=me();le()(ye.Z,be);ye.Z&&ye.Z.locals&&ye.Z.locals;var we=r(36789);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach((function(t){ke(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ke(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==_e(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===_e(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const Ce=function(e){var t=Oe((0,n.useState)({}),2),r=t[0],i=t[1],l=Oe((0,n.useState)(null),2),u=l[0],s=l[1],c=(0,n.useRef)(null),f=function(e){return o().createElement(o().Fragment,null,o().createElement(H,null,(function(t){var n,a=t.ref;return o().createElement("input",{ref:a,type:"text",placeholder:"Search",value:null!==(n=r[e])&&void 0!==n?n:"",onChange:function(t){i(Se(Se({},r),{},ke({},e,t.target.value)))}})})),o().createElement(U,null))},d=function(e,t){var n={};return null!=r&&r[e]?Object.entries(t).forEach((function(t){var o=Oe(t,2),i=o[0],a=o[1];((null==a?void 0:a.name)||a).toLowerCase().includes(r[e].toLowerCase())&&(n[i]=a)})):n=t,n},p=function(e,t){var r=t.items||{},n=r,i=Object.keys(r).length;return i>10&&(n=d("main",r)),o().createElement(ne,{label:o().createElement(o().Fragment,null,o().createElement("span",{className:"szh-menu__item__name"},t.name),o().createElement(we.default,{icon:"caret-solid-right"})),key:e,align:"center",position:"anchor"},i>10&&f(e),h(n,e))},h=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return null;var n=t;return e.showSearchField&&(n=d("main",t)),Object.entries(n).map((function(t){var n=Oe(t,2),i=n[0],l=n[1];if(l.hasOwnProperty("items"))return p(i,l);var u=a()({"szh-menu__item":!0,"szh-menu__item--type-radio":!0});return o().createElement("li",{role:"menuitemradio",className:u,key:i,onClick:function(){return function(t,r,n){var o;e.onSelect({parentValue:n||t,value:t,name:(null==r?void 0:r.name)||r}),null==c||null===(o=c.current)||void 0===o||o.blur()}(i,l,r)}},o().createElement("span",{className:"szh-menu__item__name"},(null==l?void 0:l.name)||l),i===e.value&&o().createElement(we.default,{icon:"check"}))}))},m=function(e){if(e.target){var t=e.target.getBoundingClientRect().top,r=window.top.innerHeight;s(r-t<400?t>=400?"top":"left":null)}},v=a()({"et-fb-scrollable-menu":e.scrollableParentMenu,"et-fb-select-menu":!0});return o().createElement("div",{className:"et-fb-select-menu-container"},o().createElement(ie,{ref:c,menuButton:e.useOriginalButton?e.button:o().createElement(W,{onClick:m},e.button),portal:{target:e.target||window.top.document.body},menuStyle:e.menuStyle||{},menuClassName:v,containerProps:{style:{zIndex:2000001,position:"fixed"}},transition:{open:!0,close:!1,item:!1},submenuCloseDelay:0,submenuOpenDelay:0,initialOpen:!0,initialMounted:!1,viewScroll:"auto",align:"center",direction:u},e.showSearchField&&f("main"),h(e.options)))}},88712:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAvailableLanguages:()=>h,getDataOptions:()=>m,getDataOptionsByContext:()=>g,getDivisibleByEight:()=>y,getImageBase64WithUpscaleRate:()=>w,getSizeWithUpscaleRate:()=>b,getUpscaleOptions:()=>v});var n,o,i=r(22646),a=r(19830);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(o||[]);return n(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,i,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,i)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,u){var s=d(e[n],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,u)}),(function(e){o("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,u)}))}u(s.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},_(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(w),c(w,s,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,l,"next",e)}function l(e){s(i,n,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=(null!==(n=null!==(o=window.et_ai_data)&&void 0!==o?o:window.top.et_ai_data)&&void 0!==n?n:{}).ai_server_url,h=function(){var e=a.Z.availableLanguages,t={};return Object.entries(e).forEach((function(e){var r=f(e,2),n=r[0],o=r[1];t[n]={name:o}})),{translate:{name:(0,i.Z)("ai","Translate"),items:t}}},m=function(){var e=c(u().mark((function e(){var t,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("aiDataOptions"))){e.next=3;break}return e.abrupt("return",JSON.parse(t).options);case 3:return e.next=5,fetch("".concat(p,"/data"));case 5:return r=e.sent,e.next=8,r.json();case 8:return t=e.sent,sessionStorage.setItem("aiDataOptions",JSON.stringify(t)),e.abrupt("return",t.options);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){return{image:{refine:{upscale:{name:"Upscale",items:{2:{name:"2x"},3:{name:"3x"},4:{name:"4x"},custom_size:{name:"Custom size"}}}}}}},g=function(){var e=c(u().mark((function e(t){var r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m();case 2:r=e.sent,e.t0=t,e.next="text"===e.t0?6:"image"===e.t0?7:"css-declarations"===e.t0||"code_css_no_selector"===e.t0?8:"css"===e.t0||"code_css"===e.t0?9:"code_css_free_form"===e.t0||"free-form-css"===e.t0?10:"html"===e.t0||"code_html"===e.t0?11:12;break;case 6:return e.abrupt("return",r.text);case 7:return e.abrupt("return",r.image);case 8:return e.abrupt("return",r.cssDeclarations);case 9:return e.abrupt("return",r.css);case 10:return e.abrupt("return",r.freeFormCss);case 11:return e.abrupt("return",r.html);case 12:return e.abrupt("return",r);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function y(e){if(!e)return 0;var t=e%8;return 0===t?e:e+(8-t)}var b=function(e,t){var r=""!==e?parseInt(e):0,n=""!==t?parseInt(t):0,o=1;if(r<512&&n<512&&(r=512,n=512),r<=1024&&n<=1024)return{width:y(r),height:y(n),scale:o};var i=Math.max(r,n);o=Math.floor(i/512);var a=Math.ceil(r/o),l=Math.ceil(n/o);return{width:y(a),height:y(l),scale:o}},w=function(e){return new Promise((function(t,r){var n=e.url,o=e.mime,i=new Image;i.onload=function(){var e=document.createElement("canvas"),n=e.getContext("2d"),a=b(i.width,i.height),l=a.width,u=a.height,s=a.scale;e.width=l,e.height=u,null==n||n.drawImage(i,0,0,l,u);try{var c=["image/jpeg","image/png"].includes(o)?o:"image/jpeg",f=e.toDataURL(c);t({base64:f,width:l,height:u,scale:s})}catch(e){r()}},i.onerror=function(){return r()},i.crossOrigin="anonymous",i.src="".concat(n,"?").concat(Date.now())}))}},19830:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});const n=window.et_common_data.config},22646:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(62952),o=r.n(n),i=function(e,t){for(var r=o()(e,t,""),n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(i.length>0){var l=o()(window,"wp.i18n.sprintf");return l?l.apply(void 0,[r].concat(i)):r.replace("%s",i[0])}return r};const a=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return i.apply(void 0,[window.et_common_data.i18n,[e,t]].concat(n))}},46823:(e,t,r)=>{"use strict";r.d(t,{Nr:()=>n,nY:()=>u,np:()=>l});var n=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:100,l=i(e,r,0,t.offset().top,t.parent().width(),n,30,30,o,a);return{position:{left:l.left,top:l.top},size:{width:l.width,height:l.height},flags:{fitsInBottomSpace:l.fitsInBottomSpace,fitsInBottomAndTopSpace:l.fitsInBottomAndTopSpace,fitsWithScroll:l.fitsWithScroll}}},o=function(e,t,r,n,o,i){var a=t<=Math.min(n,r-o)-i,l=t<=r-o-i,u=Math.max(o,e),s=t;return a||(l?(u-=t-(n-i),s=t):(u=o,s=r-o-i)),{position:u,size:s,fitsInAfterSpace:a,fitsInBeforeAndAfterSpace:l}},i=function(e,t,r,n,i,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:30,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:30,f=e.scrollLeft(),d=e.scrollTop(),p=e.width(),h=e.height(),m=p-((r=r>=f?r:f+l)-f),v=h-((n=n>=d?n:d+s)-d),g=t.parents().filter((function(){var e=jQuery(this).css("transform");return"none"!==e&&e.length>0})).first(),y=o(r-f,i,p,m,l,u),b=y.position,w=y.size,_=y.fitsInAfterSpace,x=y.fitsInBeforeAndAfterSpace,S=o(n-d,a,h,v,s,c),k=S.position,O=S.size,E=S.fitsInAfterSpace,C=S.fitsInBeforeAndAfterSpace;return g.length>0&&(b-=g.offset().left-f,k-=g.offset().top-d),{left:b,top:k,width:w,height:O,fitsInRightSpace:_,fitsInRightAndLeftSpace:x,fitsInBottomSpace:E,fitsInBottomAndTopSpace:C,fitsWithScroll:!E&&!C}},a=-1,l=function(){if(0<a)return a;var e=document.createElement("div"),t=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",t.style.width="100%",t.style.height="100%",e.appendChild(t),document.body.appendChild(e);var r=e.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return document.body.removeChild(e),a=r-n},u=function(e){return e.document.body.scrollHeight>e.document.body.clientHeight}},76516:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>G});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(90418),u=r.n(l),s=r(66459),c=r(94480),f=r.n(c),d=r(85838),p=r.n(d),h=r(59070);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===m(i)?i:String(i)),n)}var o,i}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_(e);if(t){var o=_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b(this,r)}}function b(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(a,e);var t,r,n,i=y(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b(e,((e=i.call.apply(i,[this].concat(r))).getDefaultStyle=function(){return{size:e.props.scale,opacity:0}},e.getStyle=function(){return{size:e.props.enabled?(0,h.ST)(1,{stiffness:300,damping:20}):1,opacity:e.props.enabled?(0,h.ST)(1,{stiffness:300,damping:20}):1}},w(e)))}return t=a,(r=[{key:"render",value:function(){var e=this;return o().createElement(h.y_,{defaultStyle:this.getDefaultStyle(),style:this.getStyle(),onRest:this.props.onRest},(function(t){return e.props.children({opacity:t.opacity,transform:"scale(".concat(t.size,")")})}))}}])&&v(t.prototype,r),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);x.propTypes={enabled:a().bool,scale:a().number,children:a().func.isRequired,onRest:a().func},x.defaultProps={enabled:!0,scale:.5,onRest:s.noop};const S=x;var k=r(30911),O=r(36789),E=r(65311),C=r.n(E),j=r(30547),P=r.n(j),L=r(83792),M=r.n(L),A=r(46823);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==T(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===T(i)?i:String(i)),n)}var o,i}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=F(e);if(t){var o=F(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return D(this,r)}}function D(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return z(e)}function z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(i,e);var t,r,n,o=N(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D(e,((e=o.call.apply(o,[this].concat(r))).toggleBodyClass=function(){var t=C()("body"),r=C()(window),n=t.hasClass("rtl"),o=e.getLocks().length>0,i="et-common-scroll-lock--added-margin",a=parseInt(t.attr("data-et-common-scroll-lock-offset"))||0,l=t.find("#wpadminbar");if(o&&(0,A.nY)(window)){var u=(0,A.np)();t.addClass(i),t.css("margin".concat(n?"Left":"Right"),"".concat(u,"px")),l.length>0&&l.css("width","calc(100% - ".concat(u,"px)"))}!o&&t.hasClass(i)&&(t.removeClass(i),t.css("margin".concat(n?"Left":"Right"),""),l.length>0&&l.css("width","")),o&&0===a?t.attr("data-et-common-scroll-lock-offset",r.scrollTop()):o||0===a||(r.scrollTop(parseInt(t.attr("data-et-common-scroll-lock-offset"))||0),t.removeAttr("data-et-common-scroll-lock-offset")),t.toggleClass("et-common-scroll-lock",o)},e.getLocks=function(){return P()((C()("body").attr("data-et-common-scroll-locks")||"").split(","),(function(e){return!!e}))},e.setLocks=function(e){C()("body").attr("data-et-common-scroll-locks",e.join(","))},e.addLock=function(t){var r=e.getLocks();r.push(t),e.setLocks(M()(r))},e.removeLock=function(t){var r=e.getLocks();e.setLocks(P()(r,(function(e){return e!==t})))},z(e)))}return t=i,(r=[{key:"componentDidMount",value:function(){this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentDidUpdate",value:function(e){this.removeLock(e.lockId),this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentWillUnmount",value:function(){this.removeLock(this.props.lockId),this.toggleBodyClass()}},{key:"render",value:function(){return null}}])&&I(t.prototype,r),n&&I(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(n.PureComponent);B.propTypes={lockId:a().string.isRequired};const H=B;function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(this,arguments)}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var q=o().forwardRef((function(e,t){var r=e.animation,i=e.modalKey,a=e.children,l=e.draggable,s=W((0,n.useState)({x:0,y:0}),2),c=s[0],d=s[1],h=(0,n.useRef)(),m={enabled:r};u()(i)||(m.key=i);var v=function(){if(h.current){var e=window.top,t=h.current.getBoundingClientRect(),r=t.left,n=t.top;if(t.right>e.innerWidth&&(r=e.innerWidth-t.width),t.bottom>e.innerHeight&&(n=e.innerHeight-t.height),t.left<0&&(r=0),t.top<0&&(n=0),r!==t.left||n!==t.top){var o=r-t.left,i=n-t.top,a=h.current.style.transform.replace(/translate\((.*)px, (.*)px\)/,(function(e,t,r){var n=parseInt(t,10)+o,a=parseInt(r,10)+i;return d({x:n,y:a}),"translate(".concat(n,"px, ").concat(a,"px)")}));h.current.style.transform=a}}};(0,n.useEffect)((function(){var e=localStorage.getItem("".concat(i,"_position"));e&&d(JSON.parse(e));var t=h.current,r=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting||v()}))}),{root:null,rootMargin:"0px",threshold:0});t&&r.observe(t);var n=new ResizeObserver((function(){v()}));return t&&n.observe(t),function(){t&&(r.unobserve(t),n.unobserve(t))}}),[]);var g=function(e,t){var r={x:t.lastX,y:t.lastY};localStorage.setItem("".concat(i,"_position"),JSON.stringify(r)),d(r)},y=function(){return o().createElement("div",{className:"et-common-prompt__container",ref:h},a)},b=f()({"et-common-prompt":!0,"et-common-prompt-draggable":l});return o().createElement("div",{className:b,ref:t},!l&&o().createElement("div",{className:"et-common-prompt__overlay"}),o().createElement(S,U({},m,{onRest:v}),(function(e){return o().createElement("div",{className:"et-common-prompt__modal",style:e},l&&o().createElement(p(),{handle:".react-draggable > .et-common-prompt__header",bounds:"parent",position:c,onStop:g},y()),!l&&y())})),o().createElement(H,{lockId:"common-prompt"}))}));q.propTypes={animation:a().bool,modalKey:a().oneOfType([a().string,a().number]),draggable:a().bool},q.defaultProps={animation:!0,modalKey:"",draggable:!1},q.Header=o().memo((function(e){var t=e.children,r=e.render,n=e.onBack,i=e.onClose,a=e.className,l=void 0===a?"":a,u=e.additionalActions,c=void 0===u?null:u,d=f()({"et-common-prompt__header":!0,"et-common-prompt__header-back":n})+" ".concat(l);return o().createElement("div",{className:d},(0,s.isFunction)(n)&&o().createElement(k.default,{className:"et-common-button--round",onClick:n},o().createElement(O.default,{icon:"back",color:"#ffffff"})),o().createElement("span",null,t),(0,s.isFunction)(r)&&r(),o().createElement("div",{className:"et-common-prompt__header-actions"},o().createElement(o().Fragment,null,c||null,(0,s.isFunction)(i)&&o().createElement(k.default,{className:"et-common-button--round",onClick:i,"data-testid":"ClosePrompt"},o().createElement(O.default,{icon:"close",color:"#ffffff"})))))})),q.Content=o().memo((function(e){var t=e.style,r=e.children;return o().createElement("div",{className:"et-common-prompt__body"},o().createElement("div",{className:"et-common-prompt__content",style:t},r))})),q.Content.propTypes={style:a().object},q.Content.defaultProps={style:{}},q.Actions=o().memo((function(e){var t=e.children;return o().createElement("div",{className:"et-common-prompt__footer"},t)}));const G=q},62281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(10746);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===u(i)?i:String(i)),n)}var o,i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p(e);if(t){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(a,e);var t,r,n,i=d(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(r=[{key:"render",value:function(){return o().createElement(l.Z,s({countTransform:!1,delayShow:700,globalEventOff:"click"},this.props,{className:"et-tb-tooltip ".concat(this.props.className)}))}}])&&c(t.prototype,r),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);h.propTypes={className:a().string},h.defaultProps={className:""};const m=h},91596:(e,t,r)=>{"use strict";r.d(t,{Z:()=>S});var n=r(47240),o=r.n(n),i=r(48232),a=r.n(i),l=r(38925),u=r.n(l),s=r(61733),c=r.n(s),f=r(47606),d=r.n(f),p=r(22211),h=r.n(p),m=r(44080);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,i=function(e,t){if("object"!==v(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===v(i)?i:String(i)),n)}var o,i}var y={hex:/^#[a-f0-9]{3}([a-f0-9]{3})?$/i,rgb:/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*(,\s*[\d\.]+)?\s*\)$/,hsl:/^hsla?\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%\s*(,\s*[\d\.]+)?\s*\)$/},b=[{h:15,s:20,l:20},{h:0,s:0,l:0},{h:-15,s:0,l:0},{h:-15,s:0,l:-30},{h:165,s:0,l:-20},{h:165,s:0,l:0},{h:180,s:0,l:0},{h:195,s:-20,l:20}],w=[{h:0,s:0,l:100},{h:0,s:0,l:0},{h:0,s:0,l:14},{h:0,s:0,l:28},{h:0,s:0,l:42},{h:0,s:0,l:56},{h:0,s:0,l:70},{h:0,s:0,l:84}],_=[{h:0,s:0,l:-100},{h:0,s:0,l:0},{h:0,s:0,l:-16},{h:0,s:0,l:-30},{h:0,s:0,l:-44},{h:0,s:0,l:-58},{h:0,s:0,l:-72},{h:0,s:0,l:-86}],x=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,n=[{key:"isHex",value:function(e){return y.hex.test(e)}},{key:"isRgb",value:function(e){return y.rgb.test(e)}},{key:"isHsl",value:function(e){return y.hsl.test(e)}},{key:"getColorType",value:function(e){return o()(y,(function(t){return t.test(e)}))}},{key:"isColorValid",value:function(e){return!h()(this.getColorType(e))}},{key:"normalize",value:function(e){var t=d()(e)?e.toLowerCase().replace(/ /g,""):"";return t&&this.isColorValid(t)?t:""}},{key:"rgbExtract",value:function(e){var t;if(this.isRgb(e)){var r=e.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(",");t=[parseInt(r[0]),parseInt(r[1]),parseInt(r[2])],4===r.length&&t.push(parseFloat(r[3]))}return t}},{key:"rgbToHsl",value:function(e,t,r){var n=e/255,o=t/255,i=r/255,a=Math.max(n,o,i),l=Math.min(n,o,i),u=0,s=0,c=(a+l)/2;if(a!==l){var f=a-l;switch(s=c>.5?f/(2-a-l):f/(a+l),a){case n:u=(o-i)/f+(o<i?6:0);break;case o:u=(i-n)/f+2;break;case i:u=(n-o)/f+4}u*=.6}return[Math.round(100*u),Math.round(100*s),Math.round(100*c)]}},{key:"_adjustHslValue",value:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}},{key:"hslToRgb",value:function(e,t,r){var n=e/360,o=t/100,i=r/100,a=i,l=i,u=i;if(0!==o){var s=i<.5?i*(1+o):i+o-i*o,c=2*i-s;a=this._adjustHslValue(s,c,n+1/3),l=this._adjustHslValue(s,c,n),u=this._adjustHslValue(s,c,n-1/3)}return[Math.round(255*a),Math.round(255*l),Math.round(255*u)]}},{key:"hexToRgb",value:function(e){var t,r=e.replace("#",""),n=new RegExp("(.{".concat(r.length/3,"})"),"g");if(r=r.match(n),!c()(r)){for(var o=0;o<r.length;o++){var i=1===r[o].length?r[o]+r[o]:r[o];r[o]=parseInt(i,16)}t=r}return t}},{key:"rgbToHex",value:function(e,t,r){var n="0".concat(e.toString(16)),o="0".concat(t.toString(16)),i="0".concat(r.toString(16));return"#".concat(n.slice(-2)).concat(o.slice(-2)).concat(i.slice(-2))}},{key:"generateHarmoniousColors",value:function(e,t,r){var n=b,o=[];return 0===r?n=w:100===r&&(n=_),a()(n,(function(n){var i=[(e+n.h)%360,Math.min(Math.max(t+n.s,0),100),Math.min(Math.max(r+n.l,0),100)];o.push(i)})),o}},{key:"parseGradientString",value:function(e){var t=this;return e.split("|").map((function(e,r){var n=(e=e.trim().split(" ")).slice(0,-1).join(" "),o=Number.parseInt(e.slice(-1),10),i=Number.isNaN(o)?0:o,a=e.slice(-1)[0].substring(Number.isNaN(o)?0:o.toString().length),l=u()(t.validUnits,a)?a:"%";return new GradientStop(n,i,r,(0,m.Z)(),l)}))}},{key:"toGradientString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map((function(e){var r=e.color,n=e.position,o=e.unit,i=t&&ETBuilderGlobalColorsStore.getColorValue(r)||r;return"".concat(i," ").concat(n).concat(o)})).join("|")}},{key:"luma",value:function(e,t,r){return.2126*e+.7152*t+.0722*r}}],(r=null)&&g(t.prototype,r),n&&g(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();x.transparent="rgba(255,255,255,0)",x.validUnits=["%","px","em","rem","ex","ch","pc","pt","cm","mm","in","vh","vw","vmin","vmax"];const S=x},32380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(36873),a=(n=i)&&n.__esModule?n:{default:n};var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.segments,n=void 0===r?50:r,o=t.iterationLimit,i=void 0===o?100:o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.p1=new a.default,this.p2=new a.default,this.segments=n,this.iterationLimit=i}return o(e,[{key:"drawToCanvas",value:function(e,t,r,n){this.p1.update(t),this.p2.update(r);var o=this.p1.x>this.p2.x,i=o?this.p2:this.p1,a=o?this.p1:this.p2,l=[],u=!0;if(i.getDistanceTo(a)<n)if(a.x-i.x>.01){var s=a.x-i.x,c=a.y-i.y,f=-this.getCatenaryParameter(s,c,n,this.iterationLimit),d=.5*(f*Math.log((n+c)/(n-c))-s),p=f*Math.cosh(d/f),h=i.x-d,m=i.y-p;l=this.getCurve(f,i,a,h,m,this.segments),u=!1}else{var v=.5*(i.x+a.x),g=.5*(i.y+a.y+n);l=[[i.x,i.y],[v,g],[a.x,a.y]]}else l=[[i.x,i.y],[a.x,a.y]];return u?this.drawLine(l,e):this.drawCurve(l,e),l}},{key:"getCatenaryParameter",value:function(e,t,r,n){for(var o=Math.sqrt(r*r-t*t)/e,i=Math.acosh(o)+1,a=-1,l=0;Math.abs(i-a)>1e-6&&l<n;)a=i,i-=(Math.sinh(i)-o*i)/(Math.cosh(i)-o),l++;return e/(2*i)}},{key:"getCurve",value:function(e,t,r,n,o,i){for(var a=[t.x,e*Math.cosh((t.x-n)/e)+o],l=r.x-t.x,u=i-1,s=0;s<u;s++){var c=t.x+l*(s+.5)/u,f=e*Math.cosh((c-n)/e)+o;a.push(c,f)}return a.push(r.x,e*Math.cosh((r.x-n)/e)+o),a}},{key:"drawLine",value:function(e,t){t.moveTo(e[0][0],e[0][1]),t.lineTo(e[1][0],e[1][1])}},{key:"drawCurve",value:function(e,t){var r=.5*e.length-1,n=e[2],o=e[3],i=[];t.moveTo(e[0],e[1]);for(var a=2;a<r;a++){var l=e[2*a],u=e[2*a+1],s=.5*(l+n),c=.5*(u+o);i.push([n,o,s,c]),t.quadraticCurveTo(n,o,s,c),n=l,o=u}return r=e.length,t.quadraticCurveTo(e[r-4],e[r-3],e[r-2],e[r-1]),i}}]),e}();t.default=l},36873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var n=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=r}return r(e,[{key:"update",value:function(e){this.x=e.x,this.y=e.y}},{key:"getDifferenceTo",value:function(t){return new e(this.x-t.x,this.y-t.y)}},{key:"getDistanceTo",value:function(e){var t=this.getDifferenceTo(e);return Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2))}}]),e}();t.default=n},14301:(e,t,r)=>{"use strict";t.oT=void 0;var n=i(r(32380)),o=i(r(36873));function i(e){return e&&e.__esModule?e:{default:e}}t.oT=n.default,o.default},94184:e=>{!function(){"use strict";var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=r.apply(null,o);a&&e.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var l in o)t.call(o,l)&&o[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return r})):window.classNames=r}()},4925:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(8081),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([e.id,".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:0;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll-behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_down_opacity,1);-webkit-transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_down_offset,0));transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_down_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-webkit-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{-webkit-touch-callout:none;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none}@media screen and (min-width:800px){.yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.yarl__slide_loading{-webkit-animation:yarl__delayed_fadein 1s linear;animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{-webkit-animation:yarl__stroke_opacity 1s linear infinite;animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{-webkit-animation-delay:-1.875s;animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){-webkit-animation-delay:-1.75s;animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){-webkit-animation-delay:-1.625s;animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){-webkit-animation-delay:-1.5s;animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){-webkit-animation-delay:-1.375s;animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){-webkit-animation-delay:-1.25s;animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){-webkit-animation-delay:-1.125s;animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){-webkit-animation-delay:-1s;animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{-webkit-animation:unset;animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;-webkit-filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px)}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;-webkit-transform:translateY(-50%) rotate(180deg);transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;-webkit-transform:translateY(-50%) rotate(180deg);transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@-webkit-keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@-webkit-keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",""]);const l=a},84202:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(8081),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([e.id,'@charset "UTF-8";\n.szh-menu {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n width: max-content;\n z-index: 100;\n border: 1px solid rgba(0, 0, 0, 0.1);\n background-color: #fff;\n}\n.szh-menu:focus {\n outline: none;\n}\n.szh-menu__arrow {\n box-sizing: border-box;\n width: 0.75rem;\n height: 0.75rem;\n background-color: #fff;\n border: 1px solid transparent;\n border-left-color: rgba(0, 0, 0, 0.1);\n border-top-color: rgba(0, 0, 0, 0.1);\n z-index: -1;\n}\n.szh-menu__arrow--dir-left {\n right: -0.375rem;\n transform: translateY(-50%) rotate(135deg);\n}\n.szh-menu__arrow--dir-right {\n left: -0.375rem;\n transform: translateY(-50%) rotate(-45deg);\n}\n.szh-menu__arrow--dir-top {\n bottom: -0.375rem;\n transform: translateX(-50%) rotate(-135deg);\n}\n.szh-menu__arrow--dir-bottom {\n top: -0.375rem;\n transform: translateX(-50%) rotate(45deg);\n}\n.szh-menu__item {\n cursor: pointer;\n}\n.szh-menu__item:focus {\n outline: none;\n}\n.szh-menu__item--hover {\n background-color: #ebebeb;\n}\n.szh-menu__item--focusable {\n cursor: default;\n background-color: inherit;\n}\n.szh-menu__item--disabled {\n cursor: default;\n color: #aaa;\n}\n.szh-menu__group {\n box-sizing: border-box;\n}\n.szh-menu__radio-group {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.szh-menu__divider {\n height: 1px;\n margin: 0.5rem 0;\n background-color: rgba(0, 0, 0, 0.12);\n}\n\n.szh-menu-button {\n box-sizing: border-box;\n}\n\n.szh-menu {\n user-select: none;\n color: #212529;\n border: none;\n border-radius: 0.25rem;\n box-shadow: 0 3px 7px rgba(0, 0, 0, 0.133), 0 0.6px 2px rgba(0, 0, 0, 0.1);\n min-width: 10rem;\n padding: 0.5rem 0;\n}\n.szh-menu__item {\n display: flex;\n align-items: center;\n position: relative;\n padding: 0.375rem 1.5rem;\n}\n.szh-menu-container--itemTransition .szh-menu__item {\n transition-property: background-color, color;\n transition-duration: 0.15s;\n transition-timing-function: ease-in-out;\n}\n.szh-menu__item--type-radio {\n padding-left: 2.2rem;\n}\n.szh-menu__item--type-radio::before {\n content: "\u25cb";\n position: absolute;\n left: 0.8rem;\n top: 0.55rem;\n font-size: 0.8rem;\n}\n.szh-menu__item--type-radio.szh-menu__item--checked::before {\n content: "\u25cf";\n}\n.szh-menu__item--type-checkbox {\n padding-left: 2.2rem;\n}\n.szh-menu__item--type-checkbox::before {\n position: absolute;\n left: 0.8rem;\n}\n.szh-menu__item--type-checkbox.szh-menu__item--checked::before {\n content: "\u2714";\n}\n.szh-menu__submenu > .szh-menu__item {\n padding-right: 2.5rem;\n}\n.szh-menu__submenu > .szh-menu__item::after {\n content: "\u276f";\n position: absolute;\n right: 1rem;\n}\n.szh-menu__header {\n color: #888;\n font-size: 0.8rem;\n padding: 0.2rem 1.5rem;\n text-transform: uppercase;\n}\n',""]);const l=a},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var l=0;l<this.length;l++){var u=this[l][0];null!=u&&(a[u]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},8679:(e,t,r)=>{"use strict";var n=r(59864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return n.isMemo(e)?a:l[e.$$typeof]||o}l[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[n.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var o=p(r);o&&o!==h&&e(t,o,n)}var a=c(r);f&&(a=a.concat(f(r)));for(var l=u(t),m=u(r),v=0;v<a.length;++v){var g=a[v];if(!(i[g]||n&&n[g]||m&&m[g]||l&&l[g])){var y=d(r,g);try{s(t,g,y)}catch(e){}}}}return t}},8630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(4195),a=(n=i)&&n.__esModule?n:{default:n};var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.radius,n=void 0===r?30:r,o=t.enabled,i=void 0===o||o,l=t.initialPoint,u=void 0===l?{x:0,y:0}:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.radius=n,this._isEnabled=i,this.pointer=new a.default(u.x,u.y),this.brush=new a.default(u.x,u.y),this.angle=0,this.distance=0,this._hasMoved=!1}return o(e,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"isEnabled",value:function(){return this._isEnabled}},{key:"setRadius",value:function(e){this.radius=e}},{key:"getRadius",value:function(){return this.radius}},{key:"getBrushCoordinates",value:function(){return this.brush.toObject()}},{key:"getPointerCoordinates",value:function(){return this.pointer.toObject()}},{key:"getBrush",value:function(){return this.brush}},{key:"getPointer",value:function(){return this.pointer}},{key:"getAngle",value:function(){return this.angle}},{key:"getDistance",value:function(){return this.distance}},{key:"brushHasMoved",value:function(){return this._hasMoved}},{key:"update",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).both,r=void 0!==t&&t;return this._hasMoved=!1,!(this.pointer.equalsTo(e)&&!r)&&(this.pointer.update(e),r?(this._hasMoved=!0,this.brush.update(e),!0):(this._isEnabled?(this.distance=this.pointer.getDistanceTo(this.brush),this.angle=this.pointer.getAngleTo(this.brush),this.distance>this.radius&&(this.brush.moveByAngle(this.angle,this.distance-this.radius),this._hasMoved=!0)):(this.distance=0,this.angle=0,this.brush.update(e),this._hasMoved=!0),!0))}}]),e}();t.default=l},4195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(91093),a=(n=i)&&n.__esModule?n:{default:n};var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"update",value:function(e){this.x=e.x,this.y=e.y}},{key:"moveByAngle",value:function(e,t){var r=e+Math.PI/2;this.x=this.x+Math.sin(r)*t,this.y=this.y-Math.cos(r)*t}},{key:"equalsTo",value:function(e){return this.x===e.x&&this.y===e.y}},{key:"getDifferenceTo",value:function(e){return new a.default(this.x-e.x,this.y-e.y)}},{key:"getDistanceTo",value:function(e){var t=this.getDifferenceTo(e);return Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2))}},{key:"getAngleTo",value:function(e){var t=this.getDifferenceTo(e);return Math.atan2(t.y,t.x)}},{key:"toObject",value:function(){return{x:this.x,y:this.y}}}]),t}(a.default);t.default=l},91093:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=r}},41227:(e,t,r)=>{"use strict";t.xv=void 0;var n=a(r(8630)),o=a(r(91093)),i=a(r(4195));function a(e){return e&&e.__esModule?e:{default:e}}t.xv=n.default,o.default,i.default},1989:(e,t,r)=>{var n=r(51789),o=r(80401),i=r(57667),a=r(21327),l=r(81866);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},38407:(e,t,r)=>{var n=r(27040),o=r(14125),i=r(82117),a=r(67518),l=r(54705);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},57071:(e,t,r)=>{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),o=r(11285),i=r(96e3),a=r(49916),l=r(95265);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},62705:(e,t,r)=>{var n=r(55639).Symbol;e.exports=n},29932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},18470:(e,t,r)=>{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},97786:(e,t,r)=>{var n=r(71811),o=r(40327);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},44239:(e,t,r)=>{var n=r(62705),o=r(89607),i=r(2333),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},28458:(e,t,r)=>{var n=r(23560),o=r(15346),i=r(13218),a=r(80346),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:l).test(a(e))}},80531:(e,t,r)=>{var n=r(62705),o=r(29932),i=r(1469),a=r(33448),l=n?n.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},71811:(e,t,r)=>{var n=r(1469),o=r(15403),i=r(55514),a=r(79833);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),o=r(47801);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},89607:(e,t,r)=>{var n=r(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[l]=r:delete e[l]),o}},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},15403:(e,t,r)=>{var n=r(1469),o=r(33448),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,o=r(14429),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),o=r(38407),i=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:(e,t,r)=>{var n=r(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},55514:(e,t,r)=>{var n=r(24523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},1469:e=>{var t=Array.isArray;e.exports=t},23560:(e,t,r)=>{var n=r(44239),o=r(13218);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},33448:(e,t,r)=>{var n=r(44239),o=r(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},96486:function(e,t,r){e=r.nmd(e),function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,u=32,s=64,c=128,f=256,d=1/0,p=9007199254740991,h=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",s],["rearg",f]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",O="[object Number]",E="[object Object]",C="[object Promise]",j="[object RegExp]",P="[object Set]",L="[object String]",M="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",N="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",V=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,$=RegExp(Y.source),Q=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),ie=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Le="['\u2019]",Me="["+Se+"]",Ae="["+Pe+"]",Te="["+ke+"]",Ie="\\d+",Re="["+Oe+"]",Ne="["+Ee+"]",De="[^"+Se+Pe+Ie+Oe+Ee+Ce+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ce+"]",We="\\u200d",Ve="(?:"+Ne+"|"+De+")",qe="(?:"+Ue+"|"+De+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Te+"|"+ze+")"+"?",$e="["+je+"]?",Qe=$e+Ke+("(?:"+We+"(?:"+[Fe,Be,He].join("|")+")"+$e+Ke+")*"),Ze="(?:"+[Re,Be,He].join("|")+")"+Qe,Xe="(?:"+[Fe+Te+"?",Te,Be,He,Me].join("|")+")",Je=RegExp(Le,"g"),et=RegExp(Te,"g"),tt=RegExp(ze+"(?="+ze+")|"+Xe+Qe,"g"),rt=RegExp([Ue+"?"+Ne+"+"+Ge+"(?="+[Ae,Ue,"$"].join("|")+")",qe+"+"+Ye+"(?="+[Ae,Ue+Ve,"$"].join("|")+")",Ue+"?"+Ve+"+"+Ge,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ze].join("|"),"g"),nt=RegExp("["+We+Se+ke+je+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],at=-1,lt={};lt[R]=lt[N]=lt[D]=lt[z]=lt[F]=lt[B]=lt[H]=lt[U]=lt[W]=!0,lt[g]=lt[y]=lt[T]=lt[b]=lt[I]=lt[w]=lt[_]=lt[x]=lt[k]=lt[O]=lt[E]=lt[j]=lt[P]=lt[L]=lt[A]=!1;var ut={};ut[g]=ut[y]=ut[T]=ut[I]=ut[b]=ut[w]=ut[R]=ut[N]=ut[D]=ut[z]=ut[F]=ut[k]=ut[O]=ut[E]=ut[j]=ut[P]=ut[L]=ut[M]=ut[B]=ut[H]=ut[U]=ut[W]=!0,ut[_]=ut[x]=ut[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ft=parseInt,dt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,gt=vt&&vt.exports===mt,yt=gt&&dt.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),wt=bt&&bt.isArrayBuffer,_t=bt&&bt.isDate,xt=bt&&bt.isMap,St=bt&&bt.isRegExp,kt=bt&&bt.isSet,Ot=bt&&bt.isTypedArray;function Et(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Pt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Lt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Mt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function At(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Tt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function It(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Rt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function Dt(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function zt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ft=Gt("length");function Bt(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Ht(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ut(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Ht(e,Vt,r)}function Wt(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function Vt(e){return e!=e}function qt(e,t){var r=null==e?0:e.length;return r?$t(e,t)/r:h}function Gt(e){return function(t){return null==t?n:t[e]}}function Yt(e){return function(t){return null==e?n:e[t]}}function Kt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function $t(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Zt(e){return e?e.slice(0,hr(e)+1).replace(ie,""):e}function Xt(e){return function(t){return e(t)}}function Jt(e,t){return It(t,(function(t){return e[t]}))}function er(e,t){return e.has(t)}function tr(e,t){for(var r=-1,n=e.length;++r<n&&Ut(t,e[r],0)>-1;);return r}function rr(e,t){for(var r=e.length;r--&&Ut(t,e[r],0)>-1;);return r}var nr=Yt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),or=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+st[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var l=e[r];l!==t&&l!==a||(e[r]=a,i[o++]=r)}return i}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function fr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function dr(e){return ar(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Ft(e)}function pr(e){return ar(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var mr=Yt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var vr=function e(t){var r,ae=(t=null==t?ht:vr.defaults(ht.Object(),t,vr.pick(ht,it))).Array,Se=t.Date,ke=t.Error,Oe=t.Function,Ee=t.Math,Ce=t.Object,je=t.RegExp,Pe=t.String,Le=t.TypeError,Me=ae.prototype,Ae=Oe.prototype,Te=Ce.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,Ne=Te.hasOwnProperty,De=0,ze=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Te.toString,Be=Re.call(Ce),He=ht._,Ue=je("^"+Re.call(Ne).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=gt?t.Buffer:n,Ve=t.Symbol,qe=t.Uint8Array,Ge=We?We.allocUnsafe:n,Ye=ur(Ce.getPrototypeOf,Ce),Ke=Ce.create,$e=Te.propertyIsEnumerable,Qe=Me.splice,Ze=Ve?Ve.isConcatSpreadable:n,Xe=Ve?Ve.iterator:n,tt=Ve?Ve.toStringTag:n,nt=function(){try{var e=pi(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Se&&Se.now!==ht.Date.now&&Se.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,mt=Ee.ceil,vt=Ee.floor,yt=Ce.getOwnPropertySymbols,bt=We?We.isBuffer:n,Ft=t.isFinite,Yt=Me.join,gr=ur(Ce.keys,Ce),yr=Ee.max,br=Ee.min,wr=Se.now,_r=t.parseInt,xr=Ee.random,Sr=Me.reverse,kr=pi(t,"DataView"),Or=pi(t,"Map"),Er=pi(t,"Promise"),Cr=pi(t,"Set"),jr=pi(t,"WeakMap"),Pr=pi(Ce,"create"),Lr=jr&&new jr,Mr={},Ar=Fi(kr),Tr=Fi(Or),Ir=Fi(Er),Rr=Fi(Cr),Nr=Fi(jr),Dr=Ve?Ve.prototype:n,zr=Dr?Dr.valueOf:n,Fr=Dr?Dr.toString:n;function Br(e){if(rl(e)&&!qa(e)&&!(e instanceof Vr)){if(e instanceof Wr)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Wr(e)}var Hr=function(){function e(){}return function(t){if(!tl(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Ur(){}function Wr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Yr;++t<r;)this.add(e[t])}function $r(e){var t=this.__data__=new Gr(e);this.size=t.size}function Qr(e,t){var r=qa(e),n=!r&&Va(e),o=!r&&!n&&$a(e),i=!r&&!n&&!o&&cl(e),a=r||n||o||i,l=a?Qt(e.length,Pe):[],u=l.length;for(var s in e)!t&&!Ne.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wi(s,u))||l.push(s);return l}function Zr(e){var t=e.length;return t?e[$n(0,t-1)]:n}function Xr(e,t){return Ni(Mo(e),un(t,0,e.length))}function Jr(e){return Ni(Mo(e))}function en(e,t,r){(r!==n&&!Ha(e[t],r)||r===n&&!(t in e))&&an(e,t,r)}function tn(e,t,r){var o=e[t];Ne.call(e,t)&&Ha(o,r)&&(r!==n||t in e)||an(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if(Ha(e[r][0],t))return r;return-1}function nn(e,t,r,n){return pn(e,(function(e,o,i){t(n,e,r(e),i)})),n}function on(e,t){return e&&Ao(t,Al(t),e)}function an(e,t,r){"__proto__"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ln(e,t){for(var r=-1,o=t.length,i=ae(o),a=null==e;++r<o;)i[r]=a?n:Cl(e,t[r]);return i}function un(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sn(e,t,r,o,i,a){var l,u=1&t,s=2&t,c=4&t;if(r&&(l=i?r(e,o,i,a):r(e)),l!==n)return l;if(!tl(e))return e;var f=qa(e);if(f){if(l=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Mo(e,l)}else{var d=vi(e),p=d==x||d==S;if($a(e))return Oo(e,u);if(d==E||d==g||p&&!i){if(l=s||p?{}:yi(e),!u)return s?function(e,t){return Ao(e,mi(e),t)}(e,function(e,t){return e&&Ao(t,Tl(t),e)}(l,e)):function(e,t){return Ao(e,hi(e),t)}(e,on(l,e))}else{if(!ut[d])return i?e:{};l=function(e,t,r){var n=e.constructor;switch(t){case T:return Eo(e);case b:case w:return new n(+e);case I:return function(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case N:case D:case z:case F:case B:case H:case U:case W:return Co(e,r);case k:return new n;case O:case L:return new n(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new n;case M:return o=e,zr?Ce(zr.call(o)):{}}var o}(e,d,u)}}a||(a=new $r);var h=a.get(e);if(h)return h;a.set(e,l),ll(e)?e.forEach((function(n){l.add(sn(n,t,r,n,e,a))})):nl(e)&&e.forEach((function(n,o){l.set(o,sn(n,t,r,o,e,a))}));var m=f?n:(c?s?ai:ii:s?Tl:Al)(e);return jt(m||e,(function(n,o){m&&(n=e[o=n]),tn(l,o,sn(n,t,r,o,e,a))})),l}function cn(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ce(e);o--;){var i=r[o],a=t[i],l=e[i];if(l===n&&!(i in e)||!a(l))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Le(o);return Ai((function(){e.apply(n,r)}),t)}function dn(e,t,r,n){var o=-1,i=At,a=!0,l=e.length,u=[],s=t.length;if(!l)return u;r&&(t=It(t,Xt(r))),n?(i=Tt,a=!1):t.length>=200&&(i=er,a=!1,t=new Kr(t));e:for(;++o<l;){var c=e[o],f=null==r?c:r(c);if(c=n||0!==c?c:0,a&&f==f){for(var d=s;d--;)if(t[d]===f)continue e;u.push(c)}else i(t,f,n)||u.push(c)}return u}Br.templateSettings={escape:Z,evaluate:X,interpolate:J,variable:"",imports:{_:Br}},Br.prototype=Ur.prototype,Br.prototype.constructor=Br,Wr.prototype=Hr(Ur.prototype),Wr.prototype.constructor=Wr,Vr.prototype=Hr(Ur.prototype),Vr.prototype.constructor=Vr,qr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},qr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qr.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===i?n:r}return Ne.call(t,e)?t[e]:n},qr.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==n:Ne.call(t,e)},qr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===n?i:t,this},Gr.prototype.clear=function(){this.__data__=[],this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Qe.call(t,r,1),--this.size,!0)},Gr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?n:t[r][1]},Gr.prototype.has=function(e){return rn(this.__data__,e)>-1},Gr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Yr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Or||Gr),string:new qr}},Yr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Yr.prototype.get=function(e){return fi(this,e).get(e)},Yr.prototype.has=function(e){return fi(this,e).has(e)},Yr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,i),this},Kr.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.clear=function(){this.__data__=new Gr,this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$r.prototype.get=function(e){return this.__data__.get(e)},$r.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Gr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(_n),hn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],l=t(a);if(null!=l&&(u===n?l==l&&!sl(l):r(l,u)))var u=l,s=a}return s}function gn(e,t){var r=[];return pn(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function yn(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=bi),o||(o=[]);++i<a;){var l=e[i];t>0&&r(l)?t>1?yn(l,t-1,r,n,o):Rt(o,l):n||(o[o.length]=l)}return o}var bn=No(),wn=No(!0);function _n(e,t){return e&&bn(e,t,Al)}function xn(e,t){return e&&wn(e,t,Al)}function Sn(e,t){return Mt(t,(function(t){return Xa(e[t])}))}function kn(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&r<o;)e=e[zi(t[r++])];return r&&r==o?e:n}function On(e,t,r){var n=t(e);return qa(e)?n:Rt(n,r(e))}function En(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in Ce(e)?function(e){var t=Ne.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch(e){}var i=Fe.call(e);o&&(t?e[tt]=r:delete e[tt]);return i}(e):function(e){return Fe.call(e)}(e)}function Cn(e,t){return e>t}function jn(e,t){return null!=e&&Ne.call(e,t)}function Pn(e,t){return null!=e&&t in Ce(e)}function Ln(e,t,r){for(var o=r?Tt:At,i=e[0].length,a=e.length,l=a,u=ae(a),s=1/0,c=[];l--;){var f=e[l];l&&t&&(f=It(f,Xt(t))),s=br(f.length,s),u[l]=!r&&(t||i>=120&&f.length>=120)?new Kr(l&&f):n}f=e[0];var d=-1,p=u[0];e:for(;++d<i&&c.length<s;){var h=f[d],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?er(p,m):o(c,m,r))){for(l=a;--l;){var v=u[l];if(!(v?er(v,m):o(e[l],m,r)))continue e}p&&p.push(m),c.push(h)}}return c}function Mn(e,t,r){var o=null==(e=Pi(e,t=_o(t,e)))?e:e[zi(Zi(t))];return null==o?n:Et(o,e,r)}function An(e){return rl(e)&&En(e)==g}function Tn(e,t,r,o,i){return e===t||(null==e||null==t||!rl(e)&&!rl(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var l=qa(e),u=qa(t),s=l?y:vi(e),c=u?y:vi(t),f=(s=s==g?E:s)==E,d=(c=c==g?E:c)==E,p=s==c;if(p&&$a(e)){if(!$a(t))return!1;l=!0,f=!1}if(p&&!f)return a||(a=new $r),l||cl(e)?ni(e,t,r,o,i,a):function(e,t,r,n,o,i,a){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!i(new qe(e),new qe(t)));case b:case w:case O:return Ha(+e,+t);case _:return e.name==t.name&&e.message==t.message;case j:case L:return e==t+"";case k:var l=lr;case P:var u=1&n;if(l||(l=cr),e.size!=t.size&&!u)return!1;var s=a.get(e);if(s)return s==t;n|=2,a.set(e,t);var c=ni(l(e),l(t),n,o,i,a);return a.delete(e),c;case M:if(zr)return zr.call(e)==zr.call(t)}return!1}(e,t,s,r,o,i,a);if(!(1&r)){var h=f&&Ne.call(e,"__wrapped__"),m=d&&Ne.call(t,"__wrapped__");if(h||m){var v=h?e.value():e,x=m?t.value():t;return a||(a=new $r),i(v,x,r,o,a)}}if(!p)return!1;return a||(a=new $r),function(e,t,r,o,i,a){var l=1&r,u=ii(e),s=u.length,c=ii(t),f=c.length;if(s!=f&&!l)return!1;var d=s;for(;d--;){var p=u[d];if(!(l?p in t:Ne.call(t,p)))return!1}var h=a.get(e),m=a.get(t);if(h&&m)return h==t&&m==e;var v=!0;a.set(e,t),a.set(t,e);var g=l;for(;++d<s;){var y=e[p=u[d]],b=t[p];if(o)var w=l?o(b,y,p,t,e,a):o(y,b,p,e,t,a);if(!(w===n?y===b||i(y,b,r,o,a):w)){v=!1;break}g||(g="constructor"==p)}if(v&&!g){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,r,o,i,a)}(e,t,r,o,Tn,i))}function In(e,t,r,o){var i=r.length,a=i,l=!o;if(null==e)return!a;for(e=Ce(e);i--;){var u=r[i];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var s=(u=r[i])[0],c=e[s],f=u[1];if(l&&u[2]){if(c===n&&!(s in e))return!1}else{var d=new $r;if(o)var p=o(c,f,s,e,t,d);if(!(p===n?Tn(f,c,3,o,d):p))return!1}}return!0}function Rn(e){return!(!tl(e)||(t=e,ze&&ze in t))&&(Xa(e)?Ue:ge).test(Fi(e));var t}function Nn(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?qa(e)?Un(e[0],e[1]):Hn(e):pu(e)}function Dn(e){if(!Oi(e))return gr(e);var t=[];for(var r in Ce(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function zn(e){if(!tl(e))return function(e){var t=[];if(null!=e)for(var r in Ce(e))t.push(r);return t}(e);var t=Oi(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}function Fn(e,t){return e<t}function Bn(e,t){var r=-1,n=Ya(e)?ae(e.length):[];return pn(e,(function(e,o,i){n[++r]=t(e,o,i)})),n}function Hn(e){var t=di(e);return 1==t.length&&t[0][2]?Ci(t[0][0],t[0][1]):function(r){return r===e||In(r,e,t)}}function Un(e,t){return xi(e)&&Ei(t)?Ci(zi(e),t):function(r){var o=Cl(r,e);return o===n&&o===t?jl(r,e):Tn(t,o,3)}}function Wn(e,t,r,o,i){e!==t&&bn(t,(function(a,l){if(i||(i=new $r),tl(a))!function(e,t,r,o,i,a,l){var u=Li(e,r),s=Li(t,r),c=l.get(s);if(c)return void en(e,r,c);var f=a?a(u,s,r+"",e,t,l):n,d=f===n;if(d){var p=qa(s),h=!p&&$a(s),m=!p&&!h&&cl(s);f=s,p||h||m?qa(u)?f=u:Ka(u)?f=Mo(u):h?(d=!1,f=Oo(s,!0)):m?(d=!1,f=Co(s,!0)):f=[]:il(s)||Va(s)?(f=u,Va(u)?f=yl(u):tl(u)&&!Xa(u)||(f=yi(s))):d=!1}d&&(l.set(s,f),i(f,s,o,a,l),l.delete(s));en(e,r,f)}(e,t,l,r,Wn,o,i);else{var u=o?o(Li(e,l),a,l+"",e,t,i):n;u===n&&(u=a),en(e,l,u)}}),Tl)}function Vn(e,t){var r=e.length;if(r)return wi(t+=t<0?r:0,r)?e[t]:n}function qn(e,t,r){t=t.length?It(t,(function(e){return qa(e)?function(t){return kn(t,1===e.length?e[0]:e)}:e})):[ou];var n=-1;t=It(t,Xt(ci()));var o=Bn(e,(function(e,r,o){var i=It(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,(function(e,t){return function(e,t,r){var n=-1,o=e.criteria,i=t.criteria,a=o.length,l=r.length;for(;++n<a;){var u=jo(o[n],i[n]);if(u)return n>=l?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Gn(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],l=kn(e,a);r(l,a)&&eo(i,_o(a,e),l)}return i}function Yn(e,t,r,n){var o=n?Wt:Ut,i=-1,a=t.length,l=e;for(e===t&&(t=Mo(t)),r&&(l=It(e,Xt(r)));++i<a;)for(var u=0,s=t[i],c=r?r(s):s;(u=o(l,c,u,n))>-1;)l!==e&&Qe.call(l,u,1),Qe.call(e,u,1);return e}function Kn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;wi(o)?Qe.call(e,o,1):po(e,o)}}return e}function $n(e,t){return e+vt(xr()*(t-e+1))}function Qn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ti(ji(e,t,ou),e+"")}function Xn(e){return Zr(Hl(e))}function Jn(e,t){var r=Hl(e);return Ni(r,un(t,0,r.length))}function eo(e,t,r,o){if(!tl(e))return e;for(var i=-1,a=(t=_o(t,e)).length,l=a-1,u=e;null!=u&&++i<a;){var s=zi(t[i]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=l){var f=u[s];(c=o?o(f,s,u):n)===n&&(c=tl(f)?f:wi(t[i+1])?[]:{})}tn(u,s,c),u=u[s]}return e}var to=Lr?function(e,t){return Lr.set(e,t),e}:ou,ro=nt?function(e,t){return nt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function no(e){return Ni(Hl(e))}function oo(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=ae(o);++n<o;)i[n]=e[n+t];return i}function io(e,t){var r;return pn(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ao(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,a=e[i];null!==a&&!sl(a)&&(r?a<=t:a<t)?n=i+1:o=i}return o}return lo(e,t,ou,r)}function lo(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var l=(t=r(t))!=t,u=null===t,s=sl(t),c=t===n;i<a;){var f=vt((i+a)/2),d=r(e[f]),p=d!==n,h=null===d,m=d==d,v=sl(d);if(l)var g=o||m;else g=c?m&&(o||p):u?m&&p&&(o||!h):s?m&&p&&!h&&(o||!v):!h&&!v&&(o?d<=t:d<t);g?i=f+1:a=f}return br(a,4294967294)}function uo(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r],l=t?t(a):a;if(!r||!Ha(l,u)){var u=l;i[o++]=0===a?0:a}}return i}function so(e){return"number"==typeof e?e:sl(e)?h:+e}function co(e){if("string"==typeof e)return e;if(qa(e))return It(e,co)+"";if(sl(e))return Fr?Fr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,r){var n=-1,o=At,i=e.length,a=!0,l=[],u=l;if(r)a=!1,o=Tt;else if(i>=200){var s=t?null:Zo(e);if(s)return cr(s);a=!1,o=er,u=new Kr}else u=t?[]:l;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||0!==c?c:0,a&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),l.push(c)}else o(u,f,r)||(u!==l&&u.push(f),l.push(c))}return l}function po(e,t){return null==(e=Pi(e,t=_o(t,e)))||delete e[zi(Zi(t))]}function ho(e,t,r,n){return eo(e,t,r(kn(e,t)),n)}function mo(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?oo(e,n?0:i,n?i+1:o):oo(e,n?i+1:0,n?o:i)}function vo(e,t){var r=e;return r instanceof Vr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))}),r)}function go(e,t,r){var n=e.length;if(n<2)return n?fo(e[0]):[];for(var o=-1,i=ae(n);++o<n;)for(var a=e[o],l=-1;++l<n;)l!=o&&(i[o]=dn(i[o]||a,e[l],t,r));return fo(yn(i,1),t,r)}function yo(e,t,r){for(var o=-1,i=e.length,a=t.length,l={};++o<i;){var u=o<a?t[o]:n;r(l,e[o],u)}return l}function bo(e){return Ka(e)?e:[]}function wo(e){return"function"==typeof e?e:ou}function _o(e,t){return qa(e)?e:xi(e,t)?[e]:Di(bl(e))}var xo=Zn;function So(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:oo(e,t,r)}var ko=st||function(e){return ht.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function Eo(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Co(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=sl(e),l=t!==n,u=null===t,s=t==t,c=sl(t);if(!u&&!c&&!a&&e>t||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&e<t||c&&r&&i&&!o&&!a||u&&r&&i||!l&&i||!s)return-1}return 0}function Po(e,t,r,n){for(var o=-1,i=e.length,a=r.length,l=-1,u=t.length,s=yr(i-a,0),c=ae(u+s),f=!n;++l<u;)c[l]=t[l];for(;++o<a;)(f||o<i)&&(c[r[o]]=e[o]);for(;s--;)c[l++]=e[o++];return c}function Lo(e,t,r,n){for(var o=-1,i=e.length,a=-1,l=r.length,u=-1,s=t.length,c=yr(i-l,0),f=ae(c+s),d=!n;++o<c;)f[o]=e[o];for(var p=o;++u<s;)f[p+u]=t[u];for(;++a<l;)(d||o<i)&&(f[p+r[a]]=e[o++]);return f}function Mo(e,t){var r=-1,n=e.length;for(t||(t=ae(n));++r<n;)t[r]=e[r];return t}function Ao(e,t,r,o){var i=!r;r||(r={});for(var a=-1,l=t.length;++a<l;){var u=t[a],s=o?o(r[u],e[u],u,r,e):n;s===n&&(s=e[u]),i?an(r,u,s):tn(r,u,s)}return r}function To(e,t){return function(r,n){var o=qa(r)?Ct:nn,i=t?t():{};return o(r,e,ci(n,2),i)}}function Io(e){return Zn((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,l=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,l&&_i(r[0],r[1],l)&&(a=i<3?n:a,i=1),t=Ce(t);++o<i;){var u=r[o];u&&e(t,u,o,a)}return t}))}function Ro(e,t){return function(r,n){if(null==r)return r;if(!Ya(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Ce(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}function No(e){return function(t,r,n){for(var o=-1,i=Ce(t),a=n(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===r(i[u],u,i))break}return t}}function Do(e){return function(t){var r=ar(t=bl(t))?pr(t):n,o=r?r[0]:t.charAt(0),i=r?So(r,1).join(""):t.slice(1);return o[e]()+i}}function zo(e){return function(t){return Nt(Xl(Vl(t).replace(Je,"")),e,"")}}function Fo(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 r=Hr(e.prototype),n=e.apply(r,t);return tl(n)?n:r}}function Bo(e){return function(t,r,o){var i=Ce(t);if(!Ya(t)){var a=ci(r,3);t=Al(t),r=function(e){return a(i[e],e,i)}}var l=e(t,r,o);return l>-1?i[a?t[l]:l]:n}}function Ho(e){return oi((function(t){var r=t.length,i=r,a=Wr.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new Le(o);if(a&&!u&&"wrapper"==ui(l))var u=new Wr([],!0)}for(i=u?i:r;++i<r;){var s=ui(l=t[i]),c="wrapper"==s?li(l):n;u=c&&Si(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ui(c[0])].apply(u,c[3]):1==l.length&&Si(l)?u[s]():u.thru(l)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&qa(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Uo(e,t,r,o,i,a,l,u,s,f){var d=t&c,p=1&t,h=2&t,m=24&t,v=512&t,g=h?n:Fo(e);return function c(){for(var y=arguments.length,b=ae(y),w=y;w--;)b[w]=arguments[w];if(m)var _=si(c),x=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(b,_);if(o&&(b=Po(b,o,i,m)),a&&(b=Lo(b,a,l,m)),y-=x,m&&y<f){var S=sr(b,_);return $o(e,t,Uo,c.placeholder,r,b,S,u,s,f-y)}var k=p?r:this,O=h?k[e]:e;return y=b.length,u?b=function(e,t){var r=e.length,o=br(t.length,r),i=Mo(e);for(;o--;){var a=t[o];e[o]=wi(a,r)?i[a]:n}return e}(b,u):v&&y>1&&b.reverse(),d&&s<y&&(b.length=s),this&&this!==ht&&this instanceof c&&(O=g||Fo(O)),O.apply(k,b)}}function Wo(e,t){return function(r,n){return function(e,t,r,n){return _n(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function Vo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=co(r),o=co(o)):(r=so(r),o=so(o)),i=e(r,o)}return i}}function qo(e){return oi((function(t){return t=It(t,Xt(ci())),Zn((function(r){var n=this;return e(t,(function(e){return Et(e,n,r)}))}))}))}function Go(e,t){var r=(t=t===n?" ":co(t)).length;if(r<2)return r?Qn(t,e):t;var o=Qn(t,mt(e/dr(t)));return ar(t)?So(pr(o),0,e).join(""):o.slice(0,e)}function Yo(e){return function(t,r,o){return o&&"number"!=typeof o&&_i(t,r,o)&&(r=o=n),t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r,n){for(var o=-1,i=yr(mt((t-e)/(r||1)),0),a=ae(i);i--;)a[n?i:++o]=e,e+=r;return a}(t,r,o=o===n?t<r?1:-1:hl(o),e)}}function Ko(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=gl(t),r=gl(r)),e(t,r)}}function $o(e,t,r,o,i,a,l,c,f,d){var p=8&t;t|=p?u:s,4&(t&=~(p?s:u))||(t&=-4);var h=[e,t,i,p?a:n,p?l:n,p?n:a,p?n:l,c,f,d],m=r.apply(n,h);return Si(e)&&Mi(m,h),m.placeholder=o,Ii(m,e,t)}function Qo(e){var t=Ee[e];return function(e,r){if(e=gl(e),(r=null==r?0:br(ml(r),292))&&Ft(e)){var n=(bl(e)+"e").split("e");return+((n=(bl(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Zo=Cr&&1/cr(new Cr([,-0]))[1]==d?function(e){return new Cr(e)}:su;function Xo(e){return function(t){var r=vi(t);return r==k?lr(t):r==P?fr(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jo(e,t,r,i,d,p,h,m){var v=2&t;if(!v&&"function"!=typeof e)throw new Le(o);var g=i?i.length:0;if(g||(t&=-97,i=d=n),h=h===n?h:yr(ml(h),0),m=m===n?m:ml(m),g-=d?d.length:0,t&s){var y=i,b=d;i=d=n}var w=v?n:li(e),_=[e,t,r,i,d,y,b,p,h,m];if(w&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,l=n==c&&8==r||n==c&&r==f&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!l)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var s=e[3];e[3]=s?Po(s,u,t[4]):u,e[4]=s?sr(e[3],a):t[4]}(u=t[5])&&(s=e[5],e[5]=s?Lo(s,u,t[6]):u,e[6]=s?sr(e[5],a):t[6]);(u=t[7])&&(e[7]=u);n&c&&(e[8]=null==e[8]?t[8]:br(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(_,w),e=_[0],t=_[1],r=_[2],i=_[3],d=_[4],!(m=_[9]=_[9]===n?v?0:e.length:yr(_[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==l?function(e,t,r){var o=Fo(e);return function i(){for(var a=arguments.length,l=ae(a),u=a,s=si(i);u--;)l[u]=arguments[u];var c=a<3&&l[0]!==s&&l[a-1]!==s?[]:sr(l,s);return(a-=c.length)<r?$o(e,t,Uo,i.placeholder,n,l,c,n,n,r-a):Et(this&&this!==ht&&this instanceof i?o:e,this,l)}}(e,t,m):t!=u&&33!=t||d.length?Uo.apply(n,_):function(e,t,r,n){var o=1&t,i=Fo(e);return function t(){for(var a=-1,l=arguments.length,u=-1,s=n.length,c=ae(s+l),f=this&&this!==ht&&this instanceof t?i:e;++u<s;)c[u]=n[u];for(;l--;)c[u++]=arguments[++a];return Et(f,o?r:this,c)}}(e,t,r,i);else var x=function(e,t,r){var n=1&t,o=Fo(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Ii((w?to:Mi)(x,_),e,t)}function ei(e,t,r,o){return e===n||Ha(e,Te[r])&&!Ne.call(o,r)?t:e}function ti(e,t,r,o,i,a){return tl(e)&&tl(t)&&(a.set(t,e),Wn(e,t,n,ti,a),a.delete(t)),e}function ri(e){return il(e)?n:e}function ni(e,t,r,o,i,a){var l=1&r,u=e.length,s=t.length;if(u!=s&&!(l&&s>u))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,h=2&r?new Kr:n;for(a.set(e,t),a.set(t,e);++d<u;){var m=e[d],v=t[d];if(o)var g=l?o(v,m,d,t,e,a):o(m,v,d,e,t,a);if(g!==n){if(g)continue;p=!1;break}if(h){if(!zt(t,(function(e,t){if(!er(h,t)&&(m===e||i(m,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(m!==v&&!i(m,v,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function oi(e){return Ti(ji(e,n,Gi),e+"")}function ii(e){return On(e,Al,hi)}function ai(e){return On(e,Tl,mi)}var li=Lr?function(e){return Lr.get(e)}:su;function ui(e){for(var t=e.name+"",r=Mr[t],n=Ne.call(Mr,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function si(e){return(Ne.call(Br,"placeholder")?Br:e).placeholder}function ci(){var e=Br.iteratee||iu;return e=e===iu?Nn:e,arguments.length?e(arguments[0],arguments[1]):e}function fi(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function di(e){for(var t=Al(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Ei(o)]}return t}function pi(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Rn(r)?r:n}var hi=yt?function(e){return null==e?[]:(e=Ce(e),Mt(yt(e),(function(t){return $e.call(e,t)})))}:vu,mi=yt?function(e){for(var t=[];e;)Rt(t,hi(e)),e=Ye(e);return t}:vu,vi=En;function gi(e,t,r){for(var n=-1,o=(t=_o(t,e)).length,i=!1;++n<o;){var a=zi(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&el(o)&&wi(a,o)&&(qa(e)||Va(e))}function yi(e){return"function"!=typeof e.constructor||Oi(e)?{}:Hr(Ye(e))}function bi(e){return qa(e)||Va(e)||!!(Ze&&e&&e[Ze])}function wi(e,t){var r=typeof e;return!!(t=null==t?p:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function _i(e,t,r){if(!tl(r))return!1;var n=typeof t;return!!("number"==n?Ya(r)&&wi(t,r.length):"string"==n&&t in r)&&Ha(r[t],e)}function xi(e,t){if(qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!sl(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Ce(t))}function Si(e){var t=ui(e),r=Br[t];if("function"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=li(r);return!!n&&e===n[0]}(kr&&vi(new kr(new ArrayBuffer(1)))!=I||Or&&vi(new Or)!=k||Er&&vi(Er.resolve())!=C||Cr&&vi(new Cr)!=P||jr&&vi(new jr)!=A)&&(vi=function(e){var t=En(e),r=t==E?e.constructor:n,o=r?Fi(r):"";if(o)switch(o){case Ar:return I;case Tr:return k;case Ir:return C;case Rr:return P;case Nr:return A}return t});var ki=Ie?Xa:gu;function Oi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Ei(e){return e==e&&!tl(e)}function Ci(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Ce(r)))}}function ji(e,t,r){return t=yr(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=yr(n.length-t,0),a=ae(i);++o<i;)a[o]=n[t+o];o=-1;for(var l=ae(t+1);++o<t;)l[o]=n[o];return l[t]=r(a),Et(e,this,l)}}function Pi(e,t){return t.length<2?e:kn(e,oo(t,0,-1))}function Li(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mi=Ri(to),Ai=pt||function(e,t){return ht.setTimeout(e,t)},Ti=Ri(ro);function Ii(e,t,r){var n=t+"";return Ti(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return jt(v,(function(r){var n="_."+r[0];t&r[1]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var o=wr(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=$n(r,i),l=e[a];e[a]=e[r],e[r]=l}return e.length=t,e}var Di=function(e){var t=Ra(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,r,n,o){t.push(n?o.replace(de,"$1"):r||e)})),t}));function zi(e){if("string"==typeof e||sl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fi(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bi(e){if(e instanceof Vr)return e.clone();var t=new Wr(e.__wrapped__,e.__chain__);return t.__actions__=Mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Hi=Zn((function(e,t){return Ka(e)?dn(e,yn(t,1,Ka,!0)):[]})),Ui=Zn((function(e,t){var r=Zi(t);return Ka(r)&&(r=n),Ka(e)?dn(e,yn(t,1,Ka,!0),ci(r,2)):[]})),Wi=Zn((function(e,t){var r=Zi(t);return Ka(r)&&(r=n),Ka(e)?dn(e,yn(t,1,Ka,!0),n,r):[]}));function Vi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ht(e,ci(t,3),o)}function qi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=ml(r),i=r<0?yr(o+i,0):br(i,o-1)),Ht(e,ci(t,3),i,!0)}function Gi(e){return(null==e?0:e.length)?yn(e,1):[]}function Yi(e){return e&&e.length?e[0]:n}var Ki=Zn((function(e){var t=It(e,bo);return t.length&&t[0]===e[0]?Ln(t):[]})),$i=Zn((function(e){var t=Zi(e),r=It(e,bo);return t===Zi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ln(r,ci(t,2)):[]})),Qi=Zn((function(e){var t=Zi(e),r=It(e,bo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ln(r,n,t):[]}));function Zi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Xi=Zn(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Yn(e,t):e}var ea=oi((function(e,t){var r=null==e?0:e.length,n=ln(e,t);return Kn(e,It(t,(function(e){return wi(e,r)?+e:e})).sort(jo)),n}));function ta(e){return null==e?e:Sr.call(e)}var ra=Zn((function(e){return fo(yn(e,1,Ka,!0))})),na=Zn((function(e){var t=Zi(e);return Ka(t)&&(t=n),fo(yn(e,1,Ka,!0),ci(t,2))})),oa=Zn((function(e){var t=Zi(e);return t="function"==typeof t?t:n,fo(yn(e,1,Ka,!0),n,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(Ka(e))return t=yr(e.length,t),!0})),Qt(t,(function(t){return It(e,Gt(t))}))}function aa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:It(r,(function(e){return Et(t,n,e)}))}var la=Zn((function(e,t){return Ka(e)?dn(e,t):[]})),ua=Zn((function(e){return go(Mt(e,Ka))})),sa=Zn((function(e){var t=Zi(e);return Ka(t)&&(t=n),go(Mt(e,Ka),ci(t,2))})),ca=Zn((function(e){var t=Zi(e);return t="function"==typeof t?t:n,go(Mt(e,Ka),n,t)})),fa=Zn(ia);var da=Zn((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,aa(e,r)}));function pa(e){var t=Br(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=oi((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Vr&&wi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:n}),new Wr(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var va=To((function(e,t,r){Ne.call(e,r)?++e[r]:an(e,r,1)}));var ga=Bo(Vi),ya=Bo(qi);function ba(e,t){return(qa(e)?jt:pn)(e,ci(t,3))}function wa(e,t){return(qa(e)?Pt:hn)(e,ci(t,3))}var _a=To((function(e,t,r){Ne.call(e,r)?e[r].push(t):an(e,r,[t])}));var xa=Zn((function(e,t,r){var n=-1,o="function"==typeof t,i=Ya(e)?ae(e.length):[];return pn(e,(function(e){i[++n]=o?Et(t,e,r):Mn(e,t,r)})),i})),Sa=To((function(e,t,r){an(e,r,t)}));function ka(e,t){return(qa(e)?It:Bn)(e,ci(t,3))}var Oa=To((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_i(e,t[0],t[1])?t=[]:r>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,yn(t,1),[])})),Ca=dt||function(){return ht.Date.now()};function ja(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,c,n,n,n,n,t)}function Pa(e,t){var r;if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var La=Zn((function(e,t,r){var n=1;if(r.length){var o=sr(r,si(La));n|=u}return Jo(e,n,t,r,o)})),Ma=Zn((function(e,t,r){var n=3;if(r.length){var o=sr(r,si(Ma));n|=u}return Jo(t,n,e,r,o)}));function Aa(e,t,r){var i,a,l,u,s,c,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Le(o);function m(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function v(e){var r=e-c;return c===n||r>=t||r<0||p&&e-f>=l}function g(){var e=Ca();if(v(e))return y(e);s=Ai(g,function(e){var r=t-(e-c);return p?br(r,l-(e-f)):r}(e))}function y(e){return s=n,h&&i?m(e):(i=a=n,u)}function b(){var e=Ca(),r=v(e);if(i=arguments,a=this,c=e,r){if(s===n)return function(e){return f=e,s=Ai(g,t),d?m(e):u}(c);if(p)return ko(s),s=Ai(g,t),m(c)}return s===n&&(s=Ai(g,t)),u}return t=gl(t)||0,tl(r)&&(d=!!r.leading,l=(p="maxWait"in r)?yr(gl(r.maxWait)||0,t):l,h="trailing"in r?!!r.trailing:h),b.cancel=function(){s!==n&&ko(s),f=0,i=c=a=s=n},b.flush=function(){return s===n?u:y(Ca())},b}var Ta=Zn((function(e,t){return fn(e,1,t)})),Ia=Zn((function(e,t,r){return fn(e,gl(t)||0,r)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ra.Cache||Yr),r}function Na(e){if("function"!=typeof e)throw new Le(o);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)}}Ra.Cache=Yr;var Da=xo((function(e,t){var r=(t=1==t.length&&qa(t[0])?It(t[0],Xt(ci())):It(yn(t,1),Xt(ci()))).length;return Zn((function(n){for(var o=-1,i=br(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return Et(e,this,n)}))})),za=Zn((function(e,t){var r=sr(t,si(za));return Jo(e,u,n,t,r)})),Fa=Zn((function(e,t){var r=sr(t,si(Fa));return Jo(e,s,n,t,r)})),Ba=oi((function(e,t){return Jo(e,f,n,n,n,t)}));function Ha(e,t){return e===t||e!=e&&t!=t}var Ua=Ko(Cn),Wa=Ko((function(e,t){return e>=t})),Va=An(function(){return arguments}())?An:function(e){return rl(e)&&Ne.call(e,"callee")&&!$e.call(e,"callee")},qa=ae.isArray,Ga=wt?Xt(wt):function(e){return rl(e)&&En(e)==T};function Ya(e){return null!=e&&el(e.length)&&!Xa(e)}function Ka(e){return rl(e)&&Ya(e)}var $a=bt||gu,Qa=_t?Xt(_t):function(e){return rl(e)&&En(e)==w};function Za(e){if(!rl(e))return!1;var t=En(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Xa(e){if(!tl(e))return!1;var t=En(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ml(e)}function el(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rl(e){return null!=e&&"object"==typeof e}var nl=xt?Xt(xt):function(e){return rl(e)&&vi(e)==k};function ol(e){return"number"==typeof e||rl(e)&&En(e)==O}function il(e){if(!rl(e)||En(e)!=E)return!1;var t=Ye(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Be}var al=St?Xt(St):function(e){return rl(e)&&En(e)==j};var ll=kt?Xt(kt):function(e){return rl(e)&&vi(e)==P};function ul(e){return"string"==typeof e||!qa(e)&&rl(e)&&En(e)==L}function sl(e){return"symbol"==typeof e||rl(e)&&En(e)==M}var cl=Ot?Xt(Ot):function(e){return rl(e)&&el(e.length)&&!!lt[En(e)]};var fl=Ko(Fn),dl=Ko((function(e,t){return e<=t}));function pl(e){if(!e)return[];if(Ya(e))return ul(e)?pr(e):Mo(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=vi(e);return(t==k?lr:t==P?cr:Hl)(e)}function hl(e){return e?(e=gl(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ml(e){var t=hl(e),r=t%1;return t==t?r?t-r:t:0}function vl(e){return e?un(ml(e),0,m):0}function gl(e){if("number"==typeof e)return e;if(sl(e))return h;if(tl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ve.test(e);return r||ye.test(e)?ft(e.slice(2),r?2:8):me.test(e)?h:+e}function yl(e){return Ao(e,Tl(e))}function bl(e){return null==e?"":co(e)}var wl=Io((function(e,t){if(Oi(t)||Ya(t))Ao(t,Al(t),e);else for(var r in t)Ne.call(t,r)&&tn(e,r,t[r])})),_l=Io((function(e,t){Ao(t,Tl(t),e)})),xl=Io((function(e,t,r,n){Ao(t,Tl(t),e,n)})),Sl=Io((function(e,t,r,n){Ao(t,Al(t),e,n)})),kl=oi(ln);var Ol=Zn((function(e,t){e=Ce(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&_i(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],l=Tl(a),u=-1,s=l.length;++u<s;){var c=l[u],f=e[c];(f===n||Ha(f,Te[c])&&!Ne.call(e,c))&&(e[c]=a[c])}return e})),El=Zn((function(e){return e.push(n,ti),Et(Rl,n,e)}));function Cl(e,t,r){var o=null==e?n:kn(e,t);return o===n?r:o}function jl(e,t){return null!=e&&gi(e,t,Pn)}var Pl=Wo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=r}),tu(ou)),Ll=Wo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),ci),Ml=Zn(Mn);function Al(e){return Ya(e)?Qr(e):Dn(e)}function Tl(e){return Ya(e)?Qr(e,!0):zn(e)}var Il=Io((function(e,t,r){Wn(e,t,r)})),Rl=Io((function(e,t,r,n){Wn(e,t,r,n)})),Nl=oi((function(e,t){var r={};if(null==e)return r;var n=!1;t=It(t,(function(t){return t=_o(t,e),n||(n=t.length>1),t})),Ao(e,ai(e),r),n&&(r=sn(r,7,ri));for(var o=t.length;o--;)po(r,t[o]);return r}));var Dl=oi((function(e,t){return null==e?{}:function(e,t){return Gn(e,t,(function(t,r){return jl(e,r)}))}(e,t)}));function zl(e,t){if(null==e)return{};var r=It(ai(e),(function(e){return[e]}));return t=ci(t),Gn(e,r,(function(e,r){return t(e,r[0])}))}var Fl=Xo(Al),Bl=Xo(Tl);function Hl(e){return null==e?[]:Jt(e,Al(e))}var Ul=zo((function(e,t,r){return t=t.toLowerCase(),e+(r?Wl(t):t)}));function Wl(e){return Zl(bl(e).toLowerCase())}function Vl(e){return(e=bl(e))&&e.replace(we,nr).replace(et,"")}var ql=zo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gl=zo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Yl=Do("toLowerCase");var Kl=zo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var $l=zo((function(e,t,r){return e+(r?" ":"")+Zl(t)}));var Ql=zo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zl=Do("toUpperCase");function Xl(e,t,r){return e=bl(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Jl=Zn((function(e,t){try{return Et(e,n,t)}catch(e){return Za(e)?e:new ke(e)}})),eu=oi((function(e,t){return jt(t,(function(t){t=zi(t),an(e,t,La(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Ho(),nu=Ho(!0);function ou(e){return e}function iu(e){return Nn("function"==typeof e?e:sn(e,1))}var au=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),lu=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function uu(e,t,r){var n=Al(t),o=Sn(t,n);null!=r||tl(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,Al(t)));var i=!(tl(r)&&"chain"in r&&!r.chain),a=Xa(e);return jt(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function su(){}var cu=qo(It),fu=qo(Lt),du=qo(zt);function pu(e){return xi(e)?Gt(zi(e)):function(e){return function(t){return kn(t,e)}}(e)}var hu=Yo(),mu=Yo(!0);function vu(){return[]}function gu(){return!1}var yu=Vo((function(e,t){return e+t}),0),bu=Qo("ceil"),wu=Vo((function(e,t){return e/t}),1),_u=Qo("floor");var xu,Su=Vo((function(e,t){return e*t}),1),ku=Qo("round"),Ou=Vo((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=ja,Br.assign=wl,Br.assignIn=_l,Br.assignInWith=xl,Br.assignWith=Sl,Br.at=kl,Br.before=Pa,Br.bind=La,Br.bindAll=eu,Br.bindKey=Ma,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Br.chain=pa,Br.chunk=function(e,t,r){t=(r?_i(e,t,r):t===n)?1:yr(ml(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,l=ae(mt(o/t));i<o;)l[a++]=oo(e,i,i+=t);return l},Br.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},Br.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Rt(qa(r)?Mo(r):[r],yn(t,1))},Br.cond=function(e){var t=null==e?0:e.length,r=ci();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Le(o);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var o=e[n];if(Et(o[0],this,r))return Et(o[1],this,r)}}))},Br.conforms=function(e){return function(e){var t=Al(e);return function(r){return cn(r,e,t)}}(sn(e,1))},Br.constant=tu,Br.countBy=va,Br.create=function(e,t){var r=Hr(e);return null==t?r:on(r,t)},Br.curry=function e(t,r,o){var i=Jo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Br.curryRight=function e(t,r,o){var i=Jo(t,l,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Br.debounce=Aa,Br.defaults=Ol,Br.defaultsDeep=El,Br.defer=Ta,Br.delay=Ia,Br.difference=Hi,Br.differenceBy=Ui,Br.differenceWith=Wi,Br.drop=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=r||t===n?1:ml(t))<0?0:t,o):[]},Br.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,0,(t=o-(t=r||t===n?1:ml(t)))<0?0:t):[]},Br.dropRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!0,!0):[]},Br.dropWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!0):[]},Br.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&_i(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=ml(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:ml(o))<0&&(o+=i),o=r>o?0:vl(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Br.filter=function(e,t){return(qa(e)?Mt:gn)(e,ci(t,3))},Br.flatMap=function(e,t){return yn(ka(e,t),1)},Br.flatMapDeep=function(e,t){return yn(ka(e,t),d)},Br.flatMapDepth=function(e,t,r){return r=r===n?1:ml(r),yn(ka(e,t),r)},Br.flatten=Gi,Br.flattenDeep=function(e){return(null==e?0:e.length)?yn(e,d):[]},Br.flattenDepth=function(e,t){return(null==e?0:e.length)?yn(e,t=t===n?1:ml(t)):[]},Br.flip=function(e){return Jo(e,512)},Br.flow=ru,Br.flowRight=nu,Br.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Br.functions=function(e){return null==e?[]:Sn(e,Al(e))},Br.functionsIn=function(e){return null==e?[]:Sn(e,Tl(e))},Br.groupBy=_a,Br.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Br.intersection=Ki,Br.intersectionBy=$i,Br.intersectionWith=Qi,Br.invert=Pl,Br.invertBy=Ll,Br.invokeMap=xa,Br.iteratee=iu,Br.keyBy=Sa,Br.keys=Al,Br.keysIn=Tl,Br.map=ka,Br.mapKeys=function(e,t){var r={};return t=ci(t,3),_n(e,(function(e,n,o){an(r,t(e,n,o),e)})),r},Br.mapValues=function(e,t){var r={};return t=ci(t,3),_n(e,(function(e,n,o){an(r,n,t(e,n,o))})),r},Br.matches=function(e){return Hn(sn(e,1))},Br.matchesProperty=function(e,t){return Un(e,sn(t,1))},Br.memoize=Ra,Br.merge=Il,Br.mergeWith=Rl,Br.method=au,Br.methodOf=lu,Br.mixin=uu,Br.negate=Na,Br.nthArg=function(e){return e=ml(e),Zn((function(t){return Vn(t,e)}))},Br.omit=Nl,Br.omitBy=function(e,t){return zl(e,Na(ci(t)))},Br.once=function(e){return Pa(2,e)},Br.orderBy=function(e,t,r,o){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(r=o?n:r)||(r=null==r?[]:[r]),qn(e,t,r))},Br.over=cu,Br.overArgs=Da,Br.overEvery=fu,Br.overSome=du,Br.partial=za,Br.partialRight=Fa,Br.partition=Oa,Br.pick=Dl,Br.pickBy=zl,Br.property=pu,Br.propertyOf=function(e){return function(t){return null==e?n:kn(e,t)}},Br.pull=Xi,Br.pullAll=Ji,Br.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,ci(r,2)):e},Br.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,n,r):e},Br.pullAt=ea,Br.range=hu,Br.rangeRight=mu,Br.rearg=Ba,Br.reject=function(e,t){return(qa(e)?Mt:gn)(e,Na(ci(t,3)))},Br.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=ci(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return Kn(e,o),r},Br.rest=function(e,t){if("function"!=typeof e)throw new Le(o);return Zn(e,t=t===n?t:ml(t))},Br.reverse=ta,Br.sampleSize=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),(qa(e)?Xr:Jn)(e,t)},Br.set=function(e,t,r){return null==e?e:eo(e,t,r)},Br.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:eo(e,t,r,o)},Br.shuffle=function(e){return(qa(e)?Jr:no)(e)},Br.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_i(e,t,r)?(t=0,r=o):(t=null==t?0:ml(t),r=r===n?o:ml(r)),oo(e,t,r)):[]},Br.sortBy=Ea,Br.sortedUniq=function(e){return e&&e.length?uo(e):[]},Br.sortedUniqBy=function(e,t){return e&&e.length?uo(e,ci(t,2)):[]},Br.split=function(e,t,r){return r&&"number"!=typeof r&&_i(e,t,r)&&(t=r=n),(r=r===n?m:r>>>0)?(e=bl(e))&&("string"==typeof t||null!=t&&!al(t))&&!(t=co(t))&&ar(e)?So(pr(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new Le(o);return t=null==t?0:yr(ml(t),0),Zn((function(r){var n=r[t],o=So(r,0,t);return n&&Rt(o,n),Et(e,this,o)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===n?1:ml(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=r||t===n?1:ml(t)))<0?0:t,o):[]},Br.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Le(o);return tl(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Aa(e,t,{leading:n,maxWait:t,trailing:i})},Br.thru=ha,Br.toArray=pl,Br.toPairs=Fl,Br.toPairsIn=Bl,Br.toPath=function(e){return qa(e)?It(e,zi):sl(e)?[e]:Mo(Di(bl(e)))},Br.toPlainObject=yl,Br.transform=function(e,t,r){var n=qa(e),o=n||$a(e)||cl(e);if(t=ci(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:tl(e)&&Xa(i)?Hr(Ye(e)):{}}return(o?jt:_n)(e,(function(e,n,o){return t(r,e,n,o)})),r},Br.unary=function(e){return ja(e,1)},Br.union=ra,Br.unionBy=na,Br.unionWith=oa,Br.uniq=function(e){return e&&e.length?fo(e):[]},Br.uniqBy=function(e,t){return e&&e.length?fo(e,ci(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fo(e,n,t):[]},Br.unset=function(e,t){return null==e||po(e,t)},Br.unzip=ia,Br.unzipWith=aa,Br.update=function(e,t,r){return null==e?e:ho(e,t,wo(r))},Br.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:ho(e,t,wo(r),o)},Br.values=Hl,Br.valuesIn=function(e){return null==e?[]:Jt(e,Tl(e))},Br.without=la,Br.words=Xl,Br.wrap=function(e,t){return za(wo(t),e)},Br.xor=ua,Br.xorBy=sa,Br.xorWith=ca,Br.zip=fa,Br.zipObject=function(e,t){return yo(e||[],t||[],tn)},Br.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Br.zipWith=da,Br.entries=Fl,Br.entriesIn=Bl,Br.extend=_l,Br.extendWith=xl,uu(Br,Br),Br.add=yu,Br.attempt=Jl,Br.camelCase=Ul,Br.capitalize=Wl,Br.ceil=bu,Br.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gl(r))==r?r:0),t!==n&&(t=(t=gl(t))==t?t:0),un(gl(e),t,r)},Br.clone=function(e){return sn(e,4)},Br.cloneDeep=function(e){return sn(e,5)},Br.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:n)},Br.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:n)},Br.conformsTo=function(e,t){return null==t||cn(e,t,Al(t))},Br.deburr=Vl,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=wu,Br.endsWith=function(e,t,r){e=bl(e),t=co(t);var o=e.length,i=r=r===n?o:un(ml(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Br.eq=Ha,Br.escape=function(e){return(e=bl(e))&&Q.test(e)?e.replace(K,or):e},Br.escapeRegExp=function(e){return(e=bl(e))&&oe.test(e)?e.replace(ne,"\\$&"):e},Br.every=function(e,t,r){var o=qa(e)?Lt:mn;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.find=ga,Br.findIndex=Vi,Br.findKey=function(e,t){return Bt(e,ci(t,3),_n)},Br.findLast=ya,Br.findLastIndex=qi,Br.findLastKey=function(e,t){return Bt(e,ci(t,3),xn)},Br.floor=_u,Br.forEach=ba,Br.forEachRight=wa,Br.forIn=function(e,t){return null==e?e:bn(e,ci(t,3),Tl)},Br.forInRight=function(e,t){return null==e?e:wn(e,ci(t,3),Tl)},Br.forOwn=function(e,t){return e&&_n(e,ci(t,3))},Br.forOwnRight=function(e,t){return e&&xn(e,ci(t,3))},Br.get=Cl,Br.gt=Ua,Br.gte=Wa,Br.has=function(e,t){return null!=e&&gi(e,t,jn)},Br.hasIn=jl,Br.head=Yi,Br.identity=ou,Br.includes=function(e,t,r,n){e=Ya(e)?e:Hl(e),r=r&&!n?ml(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),ul(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ut(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ut(e,t,o)},Br.inRange=function(e,t,r){return t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r){return e>=br(t,r)&&e<yr(t,r)}(e=gl(e),t,r)},Br.invoke=Ml,Br.isArguments=Va,Br.isArray=qa,Br.isArrayBuffer=Ga,Br.isArrayLike=Ya,Br.isArrayLikeObject=Ka,Br.isBoolean=function(e){return!0===e||!1===e||rl(e)&&En(e)==b},Br.isBuffer=$a,Br.isDate=Qa,Br.isElement=function(e){return rl(e)&&1===e.nodeType&&!il(e)},Br.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cl(e)||Va(e)))return!e.length;var t=vi(e);if(t==k||t==P)return!e.size;if(Oi(e))return!Dn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},Br.isEqual=function(e,t){return Tn(e,t)},Br.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Tn(e,t,n,r):!!o},Br.isError=Za,Br.isFinite=function(e){return"number"==typeof e&&Ft(e)},Br.isFunction=Xa,Br.isInteger=Ja,Br.isLength=el,Br.isMap=nl,Br.isMatch=function(e,t){return e===t||In(e,t,di(t))},Br.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,In(e,t,di(t),r)},Br.isNaN=function(e){return ol(e)&&e!=+e},Br.isNative=function(e){if(ki(e))throw new ke("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(e)},Br.isNil=function(e){return null==e},Br.isNull=function(e){return null===e},Br.isNumber=ol,Br.isObject=tl,Br.isObjectLike=rl,Br.isPlainObject=il,Br.isRegExp=al,Br.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=p},Br.isSet=ll,Br.isString=ul,Br.isSymbol=sl,Br.isTypedArray=cl,Br.isUndefined=function(e){return e===n},Br.isWeakMap=function(e){return rl(e)&&vi(e)==A},Br.isWeakSet=function(e){return rl(e)&&"[object WeakSet]"==En(e)},Br.join=function(e,t){return null==e?"":Yt.call(e,t)},Br.kebabCase=ql,Br.last=Zi,Br.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ml(r))<0?yr(o+i,0):br(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ht(e,Vt,i,!0)},Br.lowerCase=Gl,Br.lowerFirst=Yl,Br.lt=fl,Br.lte=dl,Br.max=function(e){return e&&e.length?vn(e,ou,Cn):n},Br.maxBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Cn):n},Br.mean=function(e){return qt(e,ou)},Br.meanBy=function(e,t){return qt(e,ci(t,2))},Br.min=function(e){return e&&e.length?vn(e,ou,Fn):n},Br.minBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Fn):n},Br.stubArray=vu,Br.stubFalse=gu,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=Su,Br.nth=function(e,t){return e&&e.length?Vn(e,ml(t)):n},Br.noConflict=function(){return ht._===this&&(ht._=He),this},Br.noop=su,Br.now=Ca,Br.pad=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Go(vt(o),r)+e+Go(mt(o),r)},Br.padEnd=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&n<t?e+Go(t-n,r):e},Br.padStart=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&n<t?Go(t-n,r)+e:e},Br.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),_r(bl(e).replace(ie,""),t||0)},Br.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_i(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=hl(e),t===n?(t=e,e=0):t=hl(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return $n(e,t)},Br.reduce=function(e,t,r){var n=qa(e)?Nt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,pn)},Br.reduceRight=function(e,t,r){var n=qa(e)?Dt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,hn)},Br.repeat=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),Qn(bl(e),t)},Br.replace=function(){var e=arguments,t=bl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var o=-1,i=(t=_o(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[zi(t[o])];a===n&&(o=i,a=r),e=Xa(a)?a.call(e):a}return e},Br.round=ku,Br.runInContext=e,Br.sample=function(e){return(qa(e)?Zr:Xn)(e)},Br.size=function(e){if(null==e)return 0;if(Ya(e))return ul(e)?dr(e):e.length;var t=vi(e);return t==k||t==P?e.size:Dn(e).length},Br.snakeCase=Kl,Br.some=function(e,t,r){var o=qa(e)?zt:io;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.sortedIndex=function(e,t){return ao(e,t)},Br.sortedIndexBy=function(e,t,r){return lo(e,t,ci(r,2))},Br.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ao(e,t);if(n<r&&Ha(e[n],t))return n}return-1},Br.sortedLastIndex=function(e,t){return ao(e,t,!0)},Br.sortedLastIndexBy=function(e,t,r){return lo(e,t,ci(r,2),!0)},Br.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ao(e,t,!0)-1;if(Ha(e[r],t))return r}return-1},Br.startCase=$l,Br.startsWith=function(e,t,r){return e=bl(e),r=null==r?0:un(ml(r),0,e.length),t=co(t),e.slice(r,r+t.length)==t},Br.subtract=Ou,Br.sum=function(e){return e&&e.length?$t(e,ou):0},Br.sumBy=function(e,t){return e&&e.length?$t(e,ci(t,2)):0},Br.template=function(e,t,r){var o=Br.templateSettings;r&&_i(e,t,r)&&(t=n),e=bl(e),t=xl({},t,o,ei);var i,a,l=xl({},t.imports,o.imports,ei),u=Al(l),s=Jt(l,u),c=0,f=t.interpolate||_e,d="__p += '",p=je((t.escape||_e).source+"|"+f.source+"|"+(f===J?pe:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,(function(t,r,n,o,l,u){return n||(n=o),d+=e.slice(c,u).replace(xe,ir),r&&(i=!0,d+="' +\n__e("+r+") +\n'"),l&&(a=!0,d+="';\n"+l+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),d+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(fe.test(m))throw new ke("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(q,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Jl((function(){return Oe(u,h+"return "+d).apply(n,s)}));if(v.source=d,Za(v))throw v;return v},Br.times=function(e,t){if((e=ml(e))<1||e>p)return[];var r=m,n=br(e,m);t=ci(t),e-=m;for(var o=Qt(n,t);++r<e;)t(r);return o},Br.toFinite=hl,Br.toInteger=ml,Br.toLength=vl,Br.toLower=function(e){return bl(e).toLowerCase()},Br.toNumber=gl,Br.toSafeInteger=function(e){return e?un(ml(e),-9007199254740991,p):0===e?e:0},Br.toString=bl,Br.toUpper=function(e){return bl(e).toUpperCase()},Br.trim=function(e,t,r){if((e=bl(e))&&(r||t===n))return Zt(e);if(!e||!(t=co(t)))return e;var o=pr(e),i=pr(t);return So(o,tr(o,i),rr(o,i)+1).join("")},Br.trimEnd=function(e,t,r){if((e=bl(e))&&(r||t===n))return e.slice(0,hr(e)+1);if(!e||!(t=co(t)))return e;var o=pr(e);return So(o,0,rr(o,pr(t))+1).join("")},Br.trimStart=function(e,t,r){if((e=bl(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=co(t)))return e;var o=pr(e);return So(o,tr(o,pr(t))).join("")},Br.truncate=function(e,t){var r=30,o="...";if(tl(t)){var i="separator"in t?t.separator:i;r="length"in t?ml(t.length):r,o="omission"in t?co(t.omission):o}var a=(e=bl(e)).length;if(ar(e)){var l=pr(e);a=l.length}if(r>=a)return e;var u=r-dr(o);if(u<1)return o;var s=l?So(l,0,u).join(""):e.slice(0,u);if(i===n)return s+o;if(l&&(u+=s.length-u),al(i)){if(e.slice(u).search(i)){var c,f=s;for(i.global||(i=je(i.source,bl(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;s=s.slice(0,d===n?u:d)}}else if(e.indexOf(co(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+o},Br.unescape=function(e){return(e=bl(e))&&$.test(e)?e.replace(Y,mr):e},Br.uniqueId=function(e){var t=++De;return bl(e)+t},Br.upperCase=Ql,Br.upperFirst=Zl,Br.each=ba,Br.eachRight=wa,Br.first=Yi,uu(Br,(xu={},_n(Br,(function(e,t){Ne.call(Br.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Br.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),jt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===n?1:yr(ml(r),0);var o=this.__filtered__&&!t?new Vr(this):this.clone();return o.__filtered__?o.__takeCount__=br(r,o.__takeCount__):o.__views__.push({size:br(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),jt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Mn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Na(ci(e)))},Vr.prototype.slice=function(e,t){e=ml(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ml(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(m)},_n(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Br[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Br.prototype[t]=function(){var t=this.__wrapped__,l=o?[1]:arguments,u=t instanceof Vr,s=l[0],c=u||qa(t),f=function(e){var t=i.apply(Br,Rt([e],l));return o&&d?t[0]:t};c&&r&&"function"==typeof s&&1!=s.length&&(u=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,m=u&&!p;if(!a&&c){t=m?t:new Vr(this);var v=e.apply(t,l);return v.__actions__.push({func:ha,args:[f],thisArg:n}),new Wr(v,d)}return h&&m?e.apply(this,l):(v=this.thru(f),h?o?v.value()[0]:v.value():v)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(qa(o)?o:[],e)}return this[r]((function(r){return t.apply(qa(r)?r:[],e)}))}})),_n(Vr.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ne.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Uo(n,2).name]=[{name:"wrapper",func:n}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=br(t,e+a);break;case"takeRight":e=yr(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,l=i.end,u=l-a,s=n?l:a-1,c=this.__iteratees__,f=c.length,d=0,p=br(u,this.__takeCount__);if(!r||!n&&o==u&&p==u)return vo(e,this.__actions__);var h=[];e:for(;u--&&d<p;){for(var m=-1,v=e[s+=t];++m<f;){var g=c[m],y=g.iteratee,b=g.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}h[d++]=v}return h},Br.prototype.at=ma,Br.prototype.chain=function(){return pa(this)},Br.prototype.commit=function(){return new Wr(this.value(),this.__chain__)},Br.prototype.next=function(){this.__values__===n&&(this.__values__=pl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof Ur;){var o=Bi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:n}),new Wr(t,this.__chain__)}return this.thru(ta)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Xe&&(Br.prototype[Xe]=function(){return this}),Br}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ht._=vr,define((function(){return vr}))):vt?((vt.exports=vr)._=vr,mt._=vr):ht._=vr}.call(this)},88306:(e,t,r)=>{var n=r(83369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},95091:(e,t,r)=>{"use strict";r.r(t)},92872:(e,t,r)=>{"use strict";r.r(t)},68039:(e,t,r)=>{"use strict";r.r(t)},8003:(e,t,r)=>{"use strict";r.r(t)},5501:(e,t,r)=>{"use strict";r.r(t)},64474:(e,t,r)=>{"use strict";r.r(t)},44158:(e,t,r)=>{"use strict";r.r(t)},31198:(e,t,r)=>{"use strict";r.r(t)},31733:(e,t,r)=>{"use strict";r.r(t)},14389:(e,t,r)=>{"use strict";r.r(t)},60937:(e,t,r)=>{"use strict";r.r(t)},64591:(e,t,r)=>{"use strict";r.r(t)},97147:(e,t,r)=>{"use strict";r.r(t)},12524:(e,t,r)=>{"use strict";r.r(t)},29518:(e,t,r)=>{"use strict";r.r(t)},43089:(e,t,r)=>{"use strict";r.r(t)},19860:(e,t,r)=>{"use strict";r.r(t)},1772:(e,t,r)=>{"use strict";r.r(t)},99598:(e,t,r)=>{"use strict";r.r(t)},51403:(e,t,r)=>{"use strict";r.r(t)},654:(e,t,r)=>{"use strict";r.r(t)},33347:(e,t,r)=>{"use strict";r.r(t)},23426:(e,t,r)=>{"use strict";r.r(t)},67259:(e,t,r)=>{"use strict";r.r(t)},75:function(e){(function(){var t,r,n,o,i,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},r=process.hrtime,o=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),i=o-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},92703:(e,t,r)=>{"use strict";var n=r(50414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},45697:(e,t,r)=>{e.exports=r(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},54087:(e,t,r)=>{for(var n=r(75),o="undefined"==typeof window?r.g:window,i=["moz","webkit"],a="AnimationFrame",l=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],s=0;!l&&s<i.length;s++)l=o[i[s]+"Request"+a],u=o[i[s]+"Cancel"+a]||o[i[s]+"CancelRequest"+a];if(!l||!u){var c=0,f=0,d=[];l=function(e){if(0===d.length){var t=n(),r=Math.max(0,16.666666666666668-(t-c));c=r+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(r))}return d.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}e.exports=function(e){return l.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=l,e.cancelAnimationFrame=u}},1911:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ie});var n=r(87363),o=r.n(n),i=r(41227),a=r(14301),l=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),u="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,s=void 0!==r.g&&r.g.Math===Math?r.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),c="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(s):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var f=["top","right","bottom","left","width","height","size","weight"],d="undefined"!=typeof MutationObserver,p=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function i(){r&&(r=!1,e()),n&&l()}function a(){c(i)}function l(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){u&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),d?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){u&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;f.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},m=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||s},v=x(0,0,0,0);function g(e){return parseFloat(e)||0}function y(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce((function(t,r){return t+g(e["border-"+r+"-width"])}),0)}function b(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return v;var n=m(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],i=e["padding-"+o];t[o]=g(i)}return t}(n),i=o.left+o.right,a=o.top+o.bottom,l=g(n.width),u=g(n.height);if("border-box"===n.boxSizing&&(Math.round(l+i)!==t&&(l-=y(n,"left","right")+i),Math.round(u+a)!==r&&(u-=y(n,"top","bottom")+a)),!function(e){return e===m(e).document.documentElement}(e)){var s=Math.round(l+i)-t,c=Math.round(u+a)-r;1!==Math.abs(s)&&(l-=s),1!==Math.abs(c)&&(u-=c)}return x(o.left,o.top,l,u)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof m(e).SVGGraphicsElement}:function(e){return e instanceof m(e).SVGElement&&"function"==typeof e.getBBox};function _(e){return u?w(e)?function(e){var t=e.getBBox();return x(0,0,t.width,t.height)}(e):b(e):v}function x(e,t,r,n){return{x:e,y:t,width:r,height:n}}var S=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=x(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=_(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var r,n,o,i,a,l,u,s=(n=(r=t).x,o=r.y,i=r.width,a=r.height,l="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(l.prototype),h(u,{x:n,y:o,width:i,height:a,top:o,right:n+i,bottom:a+o,left:n}),u);h(this,{target:e,contentRect:s})},O=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new l,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof m(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new S(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof m(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new l,C=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=p.getInstance(),n=new O(t,r,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){C.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));const j=void 0!==s.ResizeObserver?s.ResizeObserver:C;function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(this,arguments)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A=Object.freeze({x:0,y:0,untransformedX:0,untransformedY:0}),T=Object.freeze({canvasWidth:0,canvasHeight:0,left:0,top:0,right:0,bottom:0,viewMin:A,viewMax:A}),I=Object.freeze({a:1,b:0,c:0,d:1,e:0,f:0});var R=function(){function e(e){var t=this,r=e.scaleExtents,n=e.documentSize;M(this,"_scaleExtents",void 0),M(this,"_documentSize",void 0),M(this,"_canvas",null),M(this,"_view",{scale:1,x:0,y:0}),M(this,"_viewChangeListeners",new Set),M(this,"setScale",(function(e){t.setView({scale:e})})),M(this,"clampView",(function(e){var r=e.scale,n=e.x,o=e.y,i=t.scaleExtents,a=i.min,l=i.max,u=t.documentSize,s=u.width,c=u.height,f=t.canvasRect||T,d=f.left,p=f.top,h=f.right-d,m=f.bottom-p,v=h/2,g=-(s*t._view.scale-h/2),y=m/2,b=-(c*t._view.scale-m/2);return{scale:Math.min(Math.max(r,a),l),x:Math.min(Math.max(n,g),v),y:Math.min(Math.max(o,b),y)}})),M(this,"resetView",(function(){t.setView({scale:1,x:0,y:0})})),M(this,"setView",(function(e){var r=t.clampView(P({},t._view,e||{})),n=t._view,o=n.scale,i=n.x,a=n.y;return r.scale===o&&r.x===i&&r.y===a||(t._view=r,t._viewChangeListeners.forEach((function(e){return e&&e(r)}))),P({},t._view)})),M(this,"scaleAtClientPoint",(function(e,r){var n=t.clientPointToViewPoint(r),o=t.clampView(P({},t._view,{scale:t._view.scale+e})),i=t.viewPointToClientPoint(n,o);return o.x=t._view.x-(i.clientX-r.clientX),o.y=t._view.y-(i.clientY-r.clientY),t.setView(o)})),M(this,"clientPointToViewPoint",(function(e,r){var n=e.clientX,o=e.clientY;void 0===r&&(r=t._view);var i=t.canvasRect||T,a=n-i.left,l=o-i.top;return{x:(a-r.x)/r.scale,y:(l-r.y)/r.scale,relativeClientX:a,relativeClientY:l}})),M(this,"viewPointToClientPoint",(function(e,r){var n=e.x,o=e.y;void 0===r&&(r=t._view);var i=t.canvasRect||T,a=i.left,l=i.top,u=n*r.scale+r.x,s=o*r.scale+r.y,c=u+a,f=s+l;return{clientX:c,clientY:f,relativeX:u,relativeY:s,x:c,y:f}})),M(this,"attachViewChangeListener",(function(e){t._viewChangeListeners.add(e)})),this._scaleExtents=r,this._documentSize=n}var t,r,n;return t=e,(r=[{key:"canvas",get:function(){return this._canvas},set:function(e){this._canvas=e,this.setView()}},{key:"scale",get:function(){return this._view.scale}},{key:"x",get:function(){return this._view.x},set:function(e){this.setView({x:e})}},{key:"y",get:function(){return this._view.y},set:function(e){this.setView({y:e})}},{key:"view",get:function(){return P({},this._view)}},{key:"scaleExtents",get:function(){return P({},this._scaleExtents)},set:function(e){var t=e.min,r=e.max;this._scaleExtents={min:t,max:r},this.setView()}},{key:"documentSize",get:function(){return P({},this._documentSize)},set:function(e){var t=e.width,r=e.height;this._documentSize={width:t,height:r},this.setView()}},{key:"transformMatrix",get:function(){return{a:this._view.scale,b:0,c:0,d:this._view.scale,e:this._view.x,f:this._view.y}}},{key:"canvasBounds",get:function(){if(this._canvas){var e=this._canvas.getBoundingClientRect(),t=e.left,r=e.top,n=e.right,o=e.bottom;return{viewMin:this.clientPointToViewPoint({clientX:t,clientY:r}),viewMax:this.clientPointToViewPoint({clientX:n,clientY:o}),left:t,top:r,right:n,bottom:o,canvasWidth:this._canvas.width,canvasHeight:this._canvas.height}}}},{key:"canvasRect",get:function(){return this.canvas?this.canvas.getBoundingClientRect():void 0}}])&&L(t.prototype,r),n&&L(t,n),e}();function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D=function(e){e.preventDefault()},z=function(){var e=this;N(this,"handleMouseWheel",(function(t,r){var n=r.props,o=n.disabled,i=n.enablePanAndZoom,a=n.mouseZoomFactor;return o?new F:(i&&t.ctrlKey&&(t.preventDefault(),r.coordSystem.scaleAtClientPoint(a*t.deltaY,Y(t))),e)})),N(this,"handleDrawStart",(function(e,t){return t.props.disabled?new F:e.ctrlKey&&t.props.enablePanAndZoom?(new B).handleDrawStart(e,t):(new H).handleDrawStart(e,t)})),N(this,"handleDrawMove",(function(t,r){if(r.props.disabled)return new F;var n=K(r.coordSystem,t),o=n.x,i=n.y;return r.lazy.update({x:o,y:i}),e})),N(this,"handleDrawEnd",(function(t,r){return r.props.disabled?new F:e}))},F=function(){var e=this;N(this,"handleMouseWheel",(function(t,r){return r.props.disabled?e:(new z).handleMouseWheel(t,r)})),N(this,"handleDrawStart",(function(t,r){return r.props.disabled?e:(new z).handleDrawStart(t,r)})),N(this,"handleDrawMove",(function(t,r){return r.props.disabled?e:(new z).handleDrawMove(t,r)})),N(this,"handleDrawEnd",(function(t,r){return r.props.disabled?e:(new z).handleDrawEnd(t,r)}))},B=function(){var e=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(t,r){return t.preventDefault(),e.dragStart=Y(t),e.panStart={x:r.coordSystem.x,y:r.coordSystem.y},e})),N(this,"handleDrawMove",(function(t,r){t.preventDefault();var n=Y(t),o=n.clientX,i=n.clientY,a=o-e.dragStart.clientX,l=i-e.dragStart.clientY;return r.coordSystem.setView({x:e.panStart.x+a,y:e.panStart.y+l}),e})),N(this,"handleDrawEnd",(function(){return new z}))},H=function(){var e=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(t,r){var n=r.props.enablePanAndZoom;return t.preventDefault(),t.touches&&t.touches.length&&n?n&&t.touches&&t.touches.length>=2?(new U).handleDrawStart(t,r):e.handleDrawMove(t,r):(new q).handleDrawStart(t,r)})),N(this,"handleDrawMove",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length>=2)return(new U).handleDrawStart(t,r);var n=Y(t);if((e.deferredPoints.push(n),(new Date).valueOf()-e.startTimestamp<250)&&(null===e.startClientPoint&&(e.startClientPoint=n),Math.abs(n.clientX-e.startClientPoint.clientX)+Math.abs(n.clientY-e.startClientPoint.clientY)<10))return e;return e.issueDeferredPoints(r)})),N(this,"handleDrawEnd",(function(t,r){return e.issueDeferredPoints(r).handleDrawEnd(t,r)})),N(this,"issueDeferredPoints",(function(t){for(var r=new q,n=0;n<e.deferredPoints.length;n++){var o=e.deferredPoints[n],i=new G(o);r=(0===n?r.handleDrawStart:r.handleDrawMove)(i,t)}return r})),this.startClientPoint=null,this.startTimestamp=(new Date).valueOf(),this.deferredPoints=[]},U=function(){var e=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(t,r){return t.preventDefault(),!t.touches||t.touches.length<2?new z:(e.start=e.getTouchMetrics(t),e.panStart={x:r.coordSystem.x,y:r.coordSystem.y},e.scaleStart=r.coordSystem.scale,e)})),N(this,"handleDrawMove",(function(t,r){if(t.preventDefault(),!t.touches||t.touches.length<2)return new z;var n=e.recentMetrics=e.getTouchMetrics(t),o=n.centroid,i=n.distance;if(Math.abs(i-e.start.distance)>=10)return new V(e).handleDrawMove(t,r);var a=o.clientX-e.start.centroid.clientX,l=o.clientY-e.start.centroid.clientY;return Math.abs(a)+Math.abs(l)>=10?new W(e).handleDrawMove(t,r):e})),N(this,"handleDrawEnd",(function(){return new z})),N(this,"getTouchMetrics",(function(e){var t=Y(e.touches[0]),r=t.clientX,n=t.clientY,o=Y(e.touches[1]),i=o.clientX,a=o.clientY,l=i-r,u=a-n;return{t1:{clientX:r,clientY:n},t2:{clientX:i,clientY:a},distance:Math.sqrt(l*l+u*u),centroid:{clientX:(r+i)/2,clientY:(n+a)/2}}}))},W=function(e){var t=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(){return t})),N(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new z;var n=t.scaleOrPanState,o=n.recentMetrics=n.getTouchMetrics(e),i=o.centroid,a=(o.distance,i.clientX-n.start.centroid.clientX),l=i.clientY-n.start.centroid.clientY;return r.setView({x:n.panStart.x+a,y:n.panStart.y+l}),t})),N(this,"handleDrawEnd",(function(){return new z})),this.scaleOrPanState=e},V=function(e){var t=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(){return t})),N(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new z;var n=t.scaleOrPanState,o=n.recentMetrics=n.getTouchMetrics(e),i=o.centroid,a=o.distance,l=n.scaleStart*(a/n.start.distance)-r.coordSystem.scale;return r.coordSystem.scaleAtClientPoint(l,i),t})),N(this,"handleDrawEnd",(function(){return new z})),this.scaleOrPanState=e},q=function(){var e=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length){var n=K(r.coordSystem,t),o=n.x,i=n.y;r.lazy.update({x:o,y:i},{both:!0})}return e.handleDrawMove(t,r)})),N(this,"handleDrawMove",(function(t,r){t.preventDefault();var n=K(r.coordSystem,t),o=n.x,i=n.y;r.lazy.update({x:o,y:i});var a=!r.lazy.isEnabled();return e.isDrawing&&!a||(r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),e.isDrawing=!0),r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),r.drawPoints({points:r.points,brushColor:r.props.brushColor,brushRadius:r.props.brushRadius}),e})),N(this,"handleDrawEnd",(function(t,r){return t.preventDefault(),e.handleDrawMove(t,r),r.saveLine(),new z})),this.isDrawing=!1},G=function(e){var t=e.clientX,r=e.clientY;N(this,"preventDefault",(function(){})),this.clientX=t,this.clientY=r,this.touches=[{clientX:t,clientY:r}]};function Y(e){var t=e.clientX,r=e.clientY;return e.changedTouches&&e.changedTouches.length>0&&(t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY),{clientX:t,clientY:r}}function K(e,t){return e.clientPointToViewPoint(Y(t))}var $=!1;try{var Q={get passive(){return $=!0,!1}};window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch(e){$=!1}function Z(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},J.apply(this,arguments)}function ee(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function re(e,t){return{x:e.x+(t.x-e.x)/2,y:e.y+(t.y-e.y)/2}}var ne={display:"block",position:"absolute"},oe=["grid","drawing","temp","interface"],ie=function(e){var t,r;function n(t){var r;return te(ee(r=e.call(this,t)||this),"undo",(function(){var e=[];r.lines.length?e=r.lines.slice(0,-1):r.erasedLines.length&&(e=r.erasedLines.pop()),r.clearExceptErasedLines(),r.simulateDrawingLines({lines:e,immediate:!0}),r.triggerOnChange()})),te(ee(r),"eraseAll",(function(){r.erasedLines.push([].concat(r.lines)),r.clearExceptErasedLines(),r.triggerOnChange()})),te(ee(r),"clear",(function(){r.erasedLines=[],r.clearExceptErasedLines(),r.resetView()})),te(ee(r),"resetView",(function(){return r.coordSystem.resetView()})),te(ee(r),"setView",(function(e){return r.coordSystem.setView(e)})),te(ee(r),"getSaveData",(function(){return JSON.stringify({lines:r.lines,width:r.props.canvasWidth,height:r.props.canvasHeight})})),te(ee(r),"getDataURL",(function(e,t,n){var o=r.canvas.drawing,i=o.getContext("2d"),a=o.width,l=o.height,u=i.getImageData(0,0,a,l),s=i.globalCompositeOperation;if(i.globalCompositeOperation="destination-over",t){if(!r.props.imgSrc)return"Background image source not set";r.drawImage()}else null!=n&&(i.fillStyle=n,i.fillRect(0,0,a,l));e||(e="png");var c=o.toDataURL("image/"+e);return i.clearRect(0,0,a,l),i.putImageData(u,0,0),i.globalCompositeOperation=s,c})),te(ee(r),"loadSaveData",(function(e,t){if(void 0===t&&(t=r.props.immediateLoading),"string"!=typeof e)throw new Error("saveData needs to be of type string!");var n=JSON.parse(e),o=n.lines,i=n.width,a=n.height;if(!o||"function"!=typeof o.push)throw new Error("saveData.lines needs to be an array!");if(r.clear(),i===r.props.canvasWidth&&a===r.props.canvasHeight)r.simulateDrawingLines({lines:o,immediate:t});else{var l=r.props.canvasWidth/i,u=r.props.canvasHeight/a,s=(l+u)/2;r.simulateDrawingLines({lines:o.map((function(e){return J({},e,{points:e.points.map((function(e){return{x:e.x*l,y:e.y*u}})),brushRadius:e.brushRadius*s})})),immediate:t})}})),te(ee(r),"componentWillUnmount",(function(){r.canvasObserver.unobserve(r.canvasContainer),r.canvas.interface&&r.canvas.interface.removeEventListener("wheel",r.handleWheel)})),te(ee(r),"handleWheel",(function(e){r.interactionSM=r.interactionSM.handleMouseWheel(e,ee(r))})),te(ee(r),"handleDrawStart",(function(e){r.interactionSM=r.interactionSM.handleDrawStart(e,ee(r)),r.mouseHasMoved=!0})),te(ee(r),"handleDrawMove",(function(e){r.interactionSM=r.interactionSM.handleDrawMove(e,ee(r)),r.mouseHasMoved=!0})),te(ee(r),"handleDrawEnd",(function(e){r.interactionSM=r.interactionSM.handleDrawEnd(e,ee(r)),r.mouseHasMoved=!0})),te(ee(r),"applyView",(function(){if(r.ctx.drawing&&(oe.map((function(e){return r.ctx[e]})).forEach((function(e){r.clearWindow(e);var t=r.coordSystem.transformMatrix;e.setTransform(t.a,t.b,t.c,t.d,t.e,t.f)})),!r.deferRedrawOnViewChange)){r.drawGrid(r.ctx.grid),r.redrawImage(),r.loop({once:!0});var e=r.lines;r.lines=[],r.simulateDrawingLines({lines:e,immediate:!0})}})),te(ee(r),"handleCanvasResize",(function(e){var t=r.getSaveData();r.deferRedrawOnViewChange=!0;try{for(var n,o=Z(e);!(n=o()).done;){var i=n.value.contentRect,a=i.width,l=i.height;r.setCanvasSize(r.canvas.interface,a,l),r.setCanvasSize(r.canvas.drawing,a,l),r.setCanvasSize(r.canvas.temp,a,l),r.setCanvasSize(r.canvas.grid,a,l),r.coordSystem.documentSize={width:a,height:l},r.drawGrid(r.ctx.grid),r.drawImage(),r.loop({once:!0})}r.loadSaveData(t,!0)}finally{r.deferRedrawOnViewChange=!1}})),te(ee(r),"clampPointToDocument",(function(e){return r.props.clampLinesToDocument?{x:Math.max(Math.min(e.x,r.props.canvasWidth),0),y:Math.max(Math.min(e.y,r.props.canvasHeight),0)}:e})),te(ee(r),"redrawImage",(function(){r.image&&r.image.complete&&function(e){var t=void 0===e?{}:e,r=t.ctx,n=t.img,o=t.x,i=t.y,a=t.w,l=t.h,u=t.offsetX,s=t.offsetY;"number"!=typeof o&&(o=0),"number"!=typeof i&&(i=0),"number"!=typeof a&&(a=r.canvas.width),"number"!=typeof l&&(l=r.canvas.height),"number"!=typeof u&&(u=.5),"number"!=typeof s&&(s=.5),u<0&&(u=0),s<0&&(s=0),u>1&&(u=1),s>1&&(s=1);var c,f,d,p,h=n.width,m=n.height,v=Math.min(a/h,l/m),g=h*v,y=m*v,b=1;g<a&&(b=a/g),Math.abs(b-1)<1e-14&&y<l&&(b=l/y),(c=(h-(d=h/((g*=b)/a)))*u)<0&&(c=0),(f=(m-(p=m/((y*=b)/l)))*s)<0&&(f=0),d>h&&(d=h),p>m&&(p=m),r.drawImage(n,c,f,d,p,o,i,a,l)}({ctx:r.ctx.grid,img:r.image})})),te(ee(r),"simulateDrawingLines",(function(e){var t=e.lines,n=e.immediate,o=0,i=n?0:r.props.loadTimeOffset;t.forEach((function(e){var t=e.points,a=e.brushColor,l=e.brushRadius;if(n)return r.drawPoints({points:t,brushColor:a,brushRadius:l}),r.points=t,void r.saveLine({brushColor:a,brushRadius:l});for(var u=function(e){o+=i,window.setTimeout((function(){r.drawPoints({points:t.slice(0,e+1),brushColor:a,brushRadius:l})}),o)},s=1;s<t.length;s++)u(s);o+=i,window.setTimeout((function(){r.points=t,r.saveLine({brushColor:a,brushRadius:l})}),o)}))})),te(ee(r),"setCanvasSize",(function(e,t,r){e.width=t,e.height=r,e.style.width=t,e.style.height=r})),te(ee(r),"drawPoints",(function(e){var t=e.points,n=e.brushColor,o=e.brushRadius;r.ctx.temp.lineJoin="round",r.ctx.temp.lineCap="round",r.ctx.temp.strokeStyle=n,r.clearWindow(r.ctx.temp),r.ctx.temp.lineWidth=2*o;var i=t[0],a=t[1];r.ctx.temp.moveTo(a.x,a.y),r.ctx.temp.beginPath();for(var l=1,u=t.length;l<u;l++){var s=re(i,a);r.ctx.temp.quadraticCurveTo(i.x,i.y,s.x,s.y),i=t[l],a=t[l+1]}r.ctx.temp.lineTo(i.x,i.y),r.ctx.temp.stroke()})),te(ee(r),"saveLine",(function(e){var t=void 0===e?{}:e,n=t.brushColor,o=t.brushRadius;r.points.length<2||(r.lines.push({points:[].concat(r.points),brushColor:n||r.props.brushColor,brushRadius:o||r.props.brushRadius}),r.points.length=0,r.inClientSpace([r.ctx.drawing,r.ctx.temp],(function(){r.ctx.drawing.drawImage(r.canvas.temp,0,0,r.canvas.drawing.width,r.canvas.drawing.height)})),r.clearWindow(r.ctx.temp),r.triggerOnChange())})),te(ee(r),"triggerOnChange",(function(){r.props.onChange&&r.props.onChange(ee(r))})),te(ee(r),"clearWindow",(function(e){r.inClientSpace([e],(function(){return e.clearRect(0,0,e.canvas.width,e.canvas.height)}))})),te(ee(r),"clearExceptErasedLines",(function(){r.lines=[],r.valuesChanged=!0,r.clearWindow(r.ctx.drawing),r.clearWindow(r.ctx.temp)})),te(ee(r),"loop",(function(e){var t=(void 0===e?{}:e).once,n=void 0!==t&&t;if(r.mouseHasMoved||r.valuesChanged){var o=r.lazy.getPointerCoordinates(),i=r.lazy.getBrushCoordinates();r.drawInterface(r.ctx.interface,o,i),r.mouseHasMoved=!1,r.valuesChanged=!1}n||window.requestAnimationFrame((function(){r.loop()}))})),te(ee(r),"inClientSpace",(function(e,t){e.forEach((function(e){e.save(),e.setTransform(I.a,I.b,I.c,I.d,I.e,I.f)}));try{t()}finally{e.forEach((function(e){return e.restore()}))}})),te(ee(r),"drawImage",(function(){r.props.imgSrc&&(r.image=new Image,r.image.crossOrigin="anonymous",r.image.onload=r.redrawImage,r.image.src=r.props.imgSrc)})),te(ee(r),"drawGrid",(function(e){if(!r.props.hideGrid){r.clearWindow(e);var t=25,n=r.coordSystem.canvasBounds,o=n.viewMin,i=n.viewMax,a=Math.floor(o.x/t-1)*t,l=Math.floor(o.y/t-1)*t,u=i.x+t,s=i.y+t;if(e.beginPath(),e.setLineDash([5,1]),e.setLineDash([]),e.strokeStyle=r.props.gridColor,e.lineWidth=r.props.gridLineWidth,!r.props.hideGridX){for(var c=a,f=r.props.gridSizeX;c<u;)c+=f,e.moveTo(c,l),e.lineTo(c,s);e.stroke()}if(!r.props.hideGridY){for(var d=l,p=r.props.gridSizeY;d<s;)d+=p,e.moveTo(a,d),e.lineTo(u,d);e.stroke()}}})),te(ee(r),"drawInterface",(function(e,t,n){r.props.hideInterface||(r.clearWindow(e),e.beginPath(),e.fillStyle=r.props.brushColor,e.arc(n.x,n.y,r.props.brushRadius,0,2*Math.PI,!0),e.fill(),e.beginPath(),e.fillStyle=r.props.catenaryColor,e.arc(t.x,t.y,4,0,2*Math.PI,!0),e.fill(),r.lazy.isEnabled()&&(e.beginPath(),e.lineWidth=2,e.lineCap="round",e.setLineDash([2,4]),e.strokeStyle=r.props.catenaryColor,r.catenary.drawToCanvas(r.ctx.interface,n,t,r.chainLength),e.stroke()),e.beginPath(),e.fillStyle=r.props.catenaryColor,e.arc(n.x,n.y,2,0,2*Math.PI,!0),e.fill())})),r.canvas={},r.ctx={},r.catenary=new a.oT,r.points=[],r.lines=[],r.erasedLines=[],r.mouseHasMoved=!0,r.valuesChanged=!0,r.isDrawing=!1,r.isPressing=!1,r.deferRedrawOnViewChange=!1,r.interactionSM=new z,r.coordSystem=new R({scaleExtents:t.zoomExtents,documentSize:{width:t.canvasWidth,height:t.canvasHeight}}),r.coordSystem.attachViewChangeListener(r.applyView.bind(ee(r))),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var l=n.prototype;return l.componentDidMount=function(){var e,t=this;this.lazy=new i.xv({radius:this.props.lazyRadius*window.devicePixelRatio,enabled:!0,initialPoint:{x:window.innerWidth/2,y:window.innerHeight/2}}),this.chainLength=this.props.lazyRadius*window.devicePixelRatio,this.canvasObserver=new j((function(e,r){return t.handleCanvasResize(e,r)})),this.canvasObserver.observe(this.canvasContainer),this.drawImage(),this.loop(),window.setTimeout((function(){var e=window.innerWidth/2,r=window.innerHeight/2;t.lazy.update({x:e-t.chainLength/4,y:r},{both:!0}),t.lazy.update({x:e+t.chainLength/4,y:r},{both:!1}),t.mouseHasMoved=!0,t.valuesChanged=!0,t.clearExceptErasedLines(),t.props.saveData&&t.loadSaveData(t.props.saveData)}),100),this.canvas.interface&&this.canvas.interface.addEventListener("wheel",this.handleWheel,$?{passive:e}:e)},l.componentDidUpdate=function(e){e.lazyRadius!==this.props.lazyRadius&&(this.chainLength=this.props.lazyRadius*window.devicePixelRatio,this.lazy.setRadius(this.props.lazyRadius*window.devicePixelRatio)),e.saveData!==this.props.saveData&&this.loadSaveData(this.props.saveData),JSON.stringify(e)!==JSON.stringify(this.props)&&(this.valuesChanged=!0),this.coordSystem.scaleExtents=this.props.zoomExtents,this.props.enablePanAndZoom||this.coordSystem.resetView(),e.imgSrc!==this.props.imgSrc&&this.drawImage()},l.render=function(){var e=this;return o().createElement("div",{className:this.props.className,style:J({display:"block",background:this.props.backgroundColor,touchAction:"none",width:this.props.canvasWidth,height:this.props.canvasHeight},this.props.style),ref:function(t){t&&(e.canvasContainer=t)}},oe.map((function(t){var r="interface"===t;return o().createElement("canvas",{key:t,ref:function(n){n&&(e.canvas[t]=n,e.ctx[t]=n.getContext("2d"),r&&(e.coordSystem.canvas=n))},style:J({},ne),onMouseDown:r?e.handleDrawStart:void 0,onMouseMove:r?e.handleDrawMove:void 0,onMouseUp:r?e.handleDrawEnd:void 0,onMouseOut:r?e.handleDrawEnd:void 0,onTouchStart:r?e.handleDrawStart:void 0,onTouchMove:r?e.handleDrawMove:void 0,onTouchEnd:r?e.handleDrawEnd:void 0,onTouchCancel:r?e.handleDrawEnd:void 0})})))},n}(n.PureComponent);te(ie,"defaultProps",{onChange:null,loadTimeOffset:5,lazyRadius:12,brushRadius:10,brushColor:"#444",catenaryColor:"#0a0302",gridColor:"rgba(150,150,150,0.17)",backgroundColor:"#FFF",hideGrid:!1,canvasWidth:400,canvasHeight:400,disabled:!1,imgSrc:"",saveData:"",immediateLoading:!1,hideInterface:!1,gridSizeX:25,gridSizeY:25,gridLineWidth:.5,hideGridX:!1,hideGridY:!1,enablePanAndZoom:!1,mouseZoomFactor:.01,zoomExtents:{min:.33,max:3},clampLinesToDocument:!1}),ie.propTypes={}},40930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(r(87363)),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const l=e=>"object"==typeof e;var u=e=>!a(e)&&!Array.isArray(e)&&l(e)&&!i(e),s=e=>u(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,c=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function d(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!r&&!u(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=d(e[r]));else t=e}return t}var p=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,m=(e,t,r)=>{if(!t||!u(e))return r;const n=p(t.split(/[,[\].]+?/)).reduce(((e,t)=>a(e)?e:e[t]),e);return h(n)||n===e?h(e[t])?r:e[t]:n};const v="blur",g="onChange",y="onSubmit",b="all",w="pattern",_="required",x=n.default.createContext(null),S=()=>n.default.useContext(x);var k=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==b&&(t._proxyFormState[o]=!n||b),r&&(r[o]=!0),e[o]}});return o},O=e=>u(e)&&!Object.keys(e).length,E=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return O(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||b)))},C=e=>Array.isArray(e)?e:[e],j=(e,t,r)=>r&&t?e===t:!e||!t||e===t||C(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function P(e){const t=n.default.useRef(e);t.current=e,n.default.useEffect((()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}}),[e.disabled])}function L(e){const t=S(),{control:r=t.control,disabled:o,name:i,exact:a}=e||{},[l,u]=n.default.useState(r._formState),s=n.default.useRef(!0),c=n.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=n.default.useRef(i);return f.current=i,P({disabled:o,next:e=>s.current&&j(f.current,e.name,a)&&E(e,c.current,r._updateFormState)&&u({...r._formState,...e}),subject:r._subjects.state}),n.default.useEffect((()=>(s.current=!0,c.current.isValid&&r._updateValid(!0),()=>{s.current=!1})),[r]),k(l,r,c.current,!1)}var M=e=>"string"==typeof e,A=(e,t,r,n,o)=>M(e)?(n&&t.watch.add(e),m(r,e,o)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),m(r,e)))):(n&&(t.watchAll=!0),r);function T(e){const t=S(),{control:r=t.control,name:o,defaultValue:i,disabled:a,exact:l}=e||{},u=n.default.useRef(o);u.current=o,P({disabled:a,subject:r._subjects.values,next:e=>{j(u.current,e.name,l)&&c(d(A(u.current,r._names,e.values||r._formValues,!1,i)))}});const[s,c]=n.default.useState(r._getWatch(o,i));return n.default.useEffect((()=>r._removeUnmounted())),s}var I=e=>/^\w*$/.test(e),R=e=>p(e.replace(/["|']|\]/g,"").split(/\.|\[/));function N(e,t,r){let n=-1;const o=I(t)?[t]:R(t),i=o.length,a=i-1;for(;++n<i;){const t=o[n];let i=r;if(n!==a){const r=e[t];i=u(r)||Array.isArray(r)?r:isNaN(+o[n+1])?{}:[]}e[t]=i,e=e[t]}return e}function D(e){const t=S(),{name:r,control:o=t.control,shouldUnregister:i}=e,a=c(o._names.array,r),l=T({control:o,name:r,defaultValue:m(o._formValues,r,m(o._defaultValues,r,e.defaultValue)),exact:!0}),u=L({control:o,name:r}),f=n.default.useRef(o.register(r,{...e.rules,value:l}));return f.current=o.register(r,e.rules),n.default.useEffect((()=>{const e=o._options.shouldUnregister||i,t=(e,t)=>{const r=m(o._fields,e);r&&(r._f.mount=t)};if(t(r,!0),e){const e=d(m(o._options.defaultValues,r));N(o._defaultValues,r,e),h(m(o._formValues,r))&&N(o._formValues,r,e)}return()=>{(a?e&&!o._state.action:e)?o.unregister(r):t(r,!1)}}),[r,o,a,i]),{field:{name:r,value:l,onChange:n.default.useCallback((e=>f.current.onChange({target:{value:s(e),name:r},type:"change"})),[r]),onBlur:n.default.useCallback((()=>f.current.onBlur({target:{value:m(o._formValues,r),name:r},type:v})),[r,o]),ref:e=>{const t=m(o._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!m(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!m(u.touchedFields,r)},error:{enumerable:!0,get:()=>m(u.errors,r)}})}}const z="post";var F=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{};const B=(e,t,r)=>{for(const n of r||Object.keys(e)){const r=m(e,n);if(r){const{_f:e,...n}=r;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else u(n)&&B(n,t)}}};var H=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)}))},U=(e,t,r={})=>r.shouldFocus||h(r.shouldFocus)?r.focusName||`${e}.${h(r.focusIndex)?t:r.focusIndex}.`:"",W=e=>({isOnSubmit:!e||e===y,isOnBlur:"onBlur"===e,isOnChange:e===g,isOnAll:e===b,isOnTouch:"onTouched"===e}),V=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),q=(e,t,r)=>{const n=p(m(e,r));return N(n,"root",t[r]),N(e,r,n),e},G=e=>"boolean"==typeof e,Y=e=>"file"===e.type,K=e=>"function"==typeof e,$=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Q=e=>M(e),Z=e=>"radio"===e.type,X=e=>e instanceof RegExp;const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J};const re={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),re):re;function oe(e,t,r="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||G(e)&&!e)return{type:r,message:Q(e)?e:"",ref:t}}var ie=e=>u(e)&&!X(e)?e:{value:e,message:""},ae=async(e,t,r,n,i)=>{const{ref:l,refs:s,required:c,maxLength:f,minLength:d,min:p,max:v,pattern:g,validate:y,name:b,valueAsNumber:x,mount:S,disabled:k}=e._f,E=m(t,b);if(!S||k)return{};const C=s?s[0]:l,j=e=>{n&&C.reportValidity&&(C.setCustomValidity(G(e)?"":e||""),C.reportValidity())},P={},L=Z(l),A=o(l),T=L||A,I=(x||Y(l))&&h(l.value)&&h(E)||$(l)&&""===l.value||""===E||Array.isArray(E)&&!E.length,R=F.bind(null,b,r,P),N=(e,t,r,n="maxLength",o="minLength")=>{const i=e?t:r;P[b]={type:e?n:o,message:i,ref:l,...R(e?n:o,i)}};if(i?!Array.isArray(E)||!E.length:c&&(!T&&(I||a(E))||G(E)&&!E||A&&!te(s).isValid||L&&!ne(s).isValid)){const{value:e,message:t}=Q(c)?{value:!!c,message:c}:ie(c);if(e&&(P[b]={type:_,message:t,ref:C,...R(_,t)},!r))return j(t),P}if(!(I||a(p)&&a(v))){let e,t;const n=ie(v),o=ie(p);if(a(E)||isNaN(E)){const r=l.valueAsDate||new Date(E),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==l.type,u="week"==l.type;M(n.value)&&E&&(e=a?i(E)>i(n.value):u?E>n.value:r>new Date(n.value)),M(o.value)&&E&&(t=a?i(E)<i(o.value):u?E<o.value:r<new Date(o.value))}else{const r=l.valueAsNumber||(E?+E:E);a(n.value)||(e=r>n.value),a(o.value)||(t=r<o.value)}if((e||t)&&(N(!!e,n.message,o.message,"max","min"),!r))return j(P[b].message),P}if((f||d)&&!I&&(M(E)||i&&Array.isArray(E))){const e=ie(f),t=ie(d),n=!a(e.value)&&E.length>+e.value,o=!a(t.value)&&E.length<+t.value;if((n||o)&&(N(n,e.message,t.message),!r))return j(P[b].message),P}if(g&&!I&&M(E)){const{value:e,message:t}=ie(g);if(X(e)&&!E.match(e)&&(P[b]={type:w,message:t,ref:l,...R(w,t)},!r))return j(t),P}if(y)if(K(y)){const e=oe(await y(E,t),C);if(e&&(P[b]={...e,...R("validate",e.message)},!r))return j(e.message),P}else if(u(y)){let e={};for(const n in y){if(!O(e)&&!r)break;const o=oe(await y[n](E,t),C,n);o&&(e={...o,...R(n,o.message)},j(o.message),r&&(P[b]=e))}if(!O(e)&&(P[b]={ref:C,...e},!r))return P}return j(!0),P};function le(e,t){return[...e,...C(t)]}var ue=e=>Array.isArray(e)?e.map((()=>{})):void 0;function se(e,t,r){return[...e.slice(0,t),...C(r),...e.slice(t)]}var ce=(e,t,r)=>Array.isArray(e)?(h(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function fe(e,t){return[...C(t),...C(e)]}var de=(e,t)=>h(t)?[]:function(e,t){let r=0;const n=[...e];for(const e of t)n.splice(e-r,1),r++;return p(n).length?n:[]}(e,C(t).sort(((e,t)=>e-t))),pe=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function he(e,t){const r=Array.isArray(t)?t:I(t)?[t]:R(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=h(e)?n++:e[t[n++]];return e}(e,r),o=r.length-1,i=r[o];return n&&delete n[i],0!==o&&(u(n)&&O(n)||Array.isArray(n)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!h(e[t]))return!1;return!0}(n))&&he(e,r.slice(0,-1)),e}var me=(e,t,r)=>(e[t]=r,e);function ve(){let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var ge=e=>a(e)||!l(e);function ye(e,t){if(ge(e)||ge(t))return e===t;if(i(e)&&i(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const r=e[o];if(!n.includes(o))return!1;if("ref"!==o){const e=t[o];if(i(r)&&i(e)||u(r)&&u(e)||Array.isArray(r)&&Array.isArray(e)?!ye(r,e):r!==e)return!1}}return!0}var be=e=>"select-multiple"===e.type,we=e=>$(e)&&e.isConnected,_e=e=>{for(const t in e)if(K(e[t]))return!0;return!1};function xe(e,t={}){const r=Array.isArray(e);if(u(e)||r)for(const r in e)Array.isArray(e[r])||u(e[r])&&!_e(e[r])?(t[r]=Array.isArray(e[r])?[]:{},xe(e[r],t[r])):a(e[r])||(t[r]=!0);return t}function Se(e,t,r){const n=Array.isArray(e);if(u(e)||n)for(const n in e)Array.isArray(e[n])||u(e[n])&&!_e(e[n])?h(t)||ge(r[n])?r[n]=Array.isArray(e[n])?xe(e[n],[]):{...xe(e[n])}:Se(e[n],a(t)?{}:t[n],r[n]):r[n]=!ye(e[n],t[n]);return r}var ke=(e,t)=>Se(e,t,xe(t)),Oe=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>h(e)?e:t?""===e?NaN:e?+e:e:r&&M(e)?new Date(e):n?n(e):e;function Ee(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Y(t)?t.files:Z(t)?ne(e.refs).value:be(t)?[...t.selectedOptions].map((({value:e})=>e)):o(t)?te(e.refs).value:Oe(h(t.value)?e.ref.value:t.value,e)}var Ce=e=>h(e)?e:X(e)?e.source:u(e)?X(e.value)?e.value.source:e.value:e;function je(e,t,r){const n=m(e,r);if(n||I(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const n=o.join("."),i=m(t,n),a=m(e,n);if(i&&!Array.isArray(i)&&r!==n)return{name:r};if(a&&a.type)return{name:n,error:a};o.pop()}return{name:r}}const Pe={mode:y,reValidateMode:g,shouldFocusError:!0};function Le(e={},t){let r,n={...Pe,...e},l={submitCount:0,isDirty:!1,isLoading:K(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},g={},y=(u(n.defaultValues)||u(n.values))&&d(n.defaultValues||n.values)||{},w=n.shouldUnregister?{}:d(y),_={action:!1,mount:!1,watch:!1},x={mount:new Set,unMount:new Set,array:new Set,watch:new Set},S=0;const k={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={values:ve(),array:ve(),state:ve()},j=e.resetOptions&&e.resetOptions.keepDirtyValues,P=W(n.mode),L=W(n.reValidateMode),T=n.criteriaMode===b,I=async e=>{if(k.isValid||e){const e=n.resolver?O((await H()).errors):await U(g,!0);e!==l.isValid&&E.state.next({isValid:e})}},R=e=>k.isValidating&&E.state.next({isValidating:e}),D=(e,t,r,n)=>{const o=m(g,e);if(o){const i=m(w,e,h(r)?m(y,e):r);h(i)||n&&n.defaultChecked||t?N(w,e,t?i:Ee(o._f)):J(e,i),_.mount&&I()}},z=(e,t,r,n,o)=>{let i=!1,a=!1;const u={name:e};if(!r||n){k.isDirty&&(a=l.isDirty,l.isDirty=u.isDirty=Q(),i=a!==u.isDirty);const r=ye(m(y,e),t);a=m(l.dirtyFields,e),r?he(l.dirtyFields,e):N(l.dirtyFields,e,!0),u.dirtyFields=l.dirtyFields,i=i||k.dirtyFields&&a!==!r}if(r){const t=m(l.touchedFields,e);t||(N(l.touchedFields,e,r),u.touchedFields=l.touchedFields,i=i||k.touchedFields&&t!==r)}return i&&o&&E.state.next(u),i?u:{}},F=(t,n,o,i)=>{const a=m(l.errors,t),u=k.isValid&&G(n)&&l.isValid!==n;var s;if(e.delayError&&o?(s=()=>((e,t)=>{N(l.errors,e,t),E.state.next({errors:l.errors})})(t,o),r=e=>{clearTimeout(S),S=setTimeout(s,e)},r(e.delayError)):(clearTimeout(S),r=null,o?N(l.errors,t,o):he(l.errors,t)),(o?!ye(a,o):a)||!O(i)||u){const e={...i,...u&&G(n)?{isValid:n}:{},errors:l.errors,name:t};l={...l,...e},E.state.next(e)}R(!1)},H=async e=>n.resolver(w,n.context,((e,t,r,n)=>{const o={};for(const r of e){const e=m(t,r);e&&N(o,r,e._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}})(e||x.mount,g,n.criteriaMode,n.shouldUseNativeValidation)),U=async(e,t,r={valid:!0})=>{for(const o in e){const i=e[o];if(i){const{_f:e,...o}=i;if(e){const o=x.array.has(e.name),a=await ae(i,w,T,n.shouldUseNativeValidation&&!t,o);if(a[e.name]&&(r.valid=!1,t))break;!t&&(m(a,e.name)?o?q(l.errors,a,e.name):N(l.errors,e.name,a[e.name]):he(l.errors,e.name))}o&&await U(o,t,r)}}return r.valid},Q=(e,t)=>(e&&t&&N(w,e,t),!ye(oe(),y)),X=(e,t,r)=>A(e,x,{..._.mount?w:h(t)?y:M(e)?{[e]:t}:t},r,t),J=(e,t,r={})=>{const n=m(g,e);let i=t;if(n){const r=n._f;r&&(!r.disabled&&N(w,e,Oe(t,r)),i=$(r.ref)&&a(t)?"":t,be(r.ref)?[...r.ref.options].forEach((e=>e.selected=i.includes(e.value))):r.refs?o(r.ref)?r.refs.length>1?r.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):r.refs[0]&&(r.refs[0].checked=!!i):r.refs.forEach((e=>e.checked=e.value===i)):Y(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||E.values.next({name:e,values:{...w}})))}(r.shouldDirty||r.shouldTouch)&&z(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ne(e)},ee=(e,t,r)=>{for(const n in t){const o=t[n],a=`${e}.${n}`,l=m(g,a);!x.array.has(e)&&ge(o)&&(!l||l._f)||i(o)?J(a,o,r):ee(a,o,r)}},te=(e,r,n={})=>{const o=m(g,e),i=x.array.has(e),u=d(r);N(w,e,u),i?(E.array.next({name:e,values:{...w}}),(k.isDirty||k.dirtyFields)&&n.shouldDirty&&E.state.next({name:e,dirtyFields:ke(y,w),isDirty:Q(e,u)})):!o||o._f||a(u)?J(e,u,n):ee(e,u,n),V(e,x)&&E.state.next({...l}),E.values.next({name:e,values:{...w}}),!_.mount&&t()},re=async e=>{const t=e.target;let o=t.name,i=!0;const a=m(g,o);if(a){let c,f;const d=t.type?Ee(a._f):s(e),p=e.type===v||"focusout"===e.type,h=!((u=a._f).mount&&(u.required||u.min||u.max||u.maxLength||u.minLength||u.pattern||u.validate)||n.resolver||m(l.errors,o)||a._f.deps)||((e,t,r,n,o)=>!o.isOnAll&&(!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:!(r?n.isOnChange:o.isOnChange)||e))(p,m(l.touchedFields,o),l.isSubmitted,L,P),y=V(o,x,p);N(w,o,d),p?(a._f.onBlur&&a._f.onBlur(e),r&&r(0)):a._f.onChange&&a._f.onChange(e);const b=z(o,d,p,!1),_=!O(b)||y;if(!p&&E.values.next({name:o,type:e.type,values:{...w}}),h)return k.isValid&&I(),_&&E.state.next({name:o,...y?{}:b});if(!p&&y&&E.state.next({...l}),R(!0),n.resolver){const{errors:e}=await H([o]),t=je(l.errors,g,o),r=je(e,g,t.name||o);c=r.error,o=r.name,f=O(e)}else c=(await ae(a,w,T,n.shouldUseNativeValidation))[o],i=isNaN(d)||d===m(w,o,d),i&&(c?f=!1:k.isValid&&(f=await U(g,!0)));i&&(a._f.deps&&ne(a._f.deps),F(o,f,c,b))}var u},ne=async(e,t={})=>{let r,o;const i=C(e);if(R(!0),n.resolver){const t=await(async e=>{const{errors:t}=await H();if(e)for(const r of e){const e=m(t,r);e?N(l.errors,r,e):he(l.errors,r)}else l.errors=t;return t})(h(e)?e:i);r=O(t),o=e?!i.some((e=>m(t,e))):r}else e?(o=(await Promise.all(i.map((async e=>{const t=m(g,e);return await U(t&&t._f?{[e]:t}:t)})))).every(Boolean),(o||l.isValid)&&I()):o=r=await U(g);return E.state.next({...!M(e)||k.isValid&&r!==l.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:l.errors,isValidating:!1}),t.shouldFocus&&!o&&B(g,(e=>e&&m(l.errors,e)),e?i:x.mount),o},oe=e=>{const t={...y,..._.mount?w:{}};return h(e)?t:M(e)?m(t,e):e.map((e=>m(t,e)))},ie=(e,t)=>({invalid:!!m((t||l).errors,e),isDirty:!!m((t||l).dirtyFields,e),isTouched:!!m((t||l).touchedFields,e),error:m((t||l).errors,e)}),le=(e,t,r)=>{const n=(m(g,e,{_f:{}})._f||{}).ref;N(l.errors,e,{...t,ref:n}),E.state.next({name:e,errors:l.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},ue=(e,t={})=>{for(const r of e?C(e):x.mount)x.mount.delete(r),x.array.delete(r),t.keepValue||(he(g,r),he(w,r)),!t.keepError&&he(l.errors,r),!t.keepDirty&&he(l.dirtyFields,r),!t.keepTouched&&he(l.touchedFields,r),!n.shouldUnregister&&!t.keepDefaultValue&&he(y,r);E.values.next({values:{...w}}),E.state.next({...l,...t.keepDirty?{isDirty:Q()}:{}}),!t.keepIsValid&&I()},se=(e,t={})=>{let r=m(g,e);const i=G(t.disabled);return N(g,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),x.mount.add(e),r?i&&N(w,e,t.disabled?void 0:m(w,e,Ee(r._f))):D(e,!0,t.value),{...i?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:Ce(t.min),max:Ce(t.max),minLength:Ce(t.minLength),maxLength:Ce(t.maxLength),pattern:Ce(t.pattern)}:{},name:e,onChange:re,onBlur:re,ref:i=>{if(i){se(e,t),r=m(g,e);const n=h(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,a=(e=>Z(e)||o(e))(n),l=r._f.refs||[];if(a?l.find((e=>e===n)):n===r._f.ref)return;N(g,e,{_f:{...r._f,...a?{refs:[...l.filter(we),n,...Array.isArray(m(y,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),D(e,!1,void 0,n)}else r=m(g,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!c(x.array,e)||!_.action)&&x.unMount.add(e)}}},ce=()=>n.shouldFocusError&&B(g,(e=>e&&m(l.errors,e)),x.mount),fe=(e,t)=>async r=>{r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let o=d(w);if(E.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await H();l.errors=e,o=t}else await U(g);he(l.errors,"root"),O(l.errors)?(E.state.next({errors:{}}),await e(o,r)):(t&&await t({...l.errors},r),ce(),setTimeout(ce)),E.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(l.errors),submitCount:l.submitCount+1,errors:l.errors})},de=(r,n={})=>{const o=r||y,i=d(o),a=r&&!O(r)?i:y;if(n.keepDefaultValues||(y=o),!n.keepValues){if(n.keepDirtyValues||j)for(const e of x.mount)m(l.dirtyFields,e)?N(a,e,m(w,e)):te(e,m(a,e));else{if(f&&h(r))for(const e of x.mount){const t=m(g,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if($(e)){const t=e.closest("form");if(t){t.reset();break}}}}g={}}w=e.shouldUnregister?n.keepDefaultValues?d(y):{}:d(a),E.array.next({values:{...a}}),E.values.next({values:{...a}})}x={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!_.mount&&t(),_.mount=!k.isValid||!!n.keepIsValid,_.watch=!!e.shouldUnregister,E.state.next({submitCount:n.keepSubmitCount?l.submitCount:0,isDirty:n.keepDirty?l.isDirty:!(!n.keepDefaultValues||ye(r,y)),isSubmitted:!!n.keepIsSubmitted&&l.isSubmitted,dirtyFields:n.keepDirtyValues?l.dirtyFields:n.keepDefaultValues&&r?ke(y,r):{},touchedFields:n.keepTouched?l.touchedFields:{},errors:n.keepErrors?l.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},pe=(e,t)=>de(K(e)?e(w):e,t);return{control:{register:se,unregister:ue,getFieldState:ie,handleSubmit:fe,setError:le,_executeSchema:H,_getWatch:X,_getDirty:Q,_updateValid:I,_removeUnmounted:()=>{for(const e of x.unMount){const t=m(g,e);t&&(t._f.refs?t._f.refs.every((e=>!we(e))):!we(t._f.ref))&&ue(e)}x.unMount=new Set},_updateFieldArray:(e,t=[],r,n,o=!0,i=!0)=>{if(n&&r){if(_.action=!0,i&&Array.isArray(m(g,e))){const t=r(m(g,e),n.argA,n.argB);o&&N(g,e,t)}if(i&&Array.isArray(m(l.errors,e))){const t=r(m(l.errors,e),n.argA,n.argB);o&&N(l.errors,e,t),((e,t)=>{!p(m(e,t)).length&&he(e,t)})(l.errors,e)}if(k.touchedFields&&i&&Array.isArray(m(l.touchedFields,e))){const t=r(m(l.touchedFields,e),n.argA,n.argB);o&&N(l.touchedFields,e,t)}k.dirtyFields&&(l.dirtyFields=ke(y,w)),E.state.next({name:e,isDirty:Q(e,t),dirtyFields:l.dirtyFields,errors:l.errors,isValid:l.isValid})}else N(w,e,t)},_getFieldArray:t=>p(m(_.mount?w:y,t,e.shouldUnregister?m(y,t,[]):[])),_reset:de,_resetDefaultValues:()=>K(n.defaultValues)&&n.defaultValues().then((e=>{pe(e,n.resetOptions),E.state.next({isLoading:!1})})),_updateFormState:e=>{l={...l,...e}},_subjects:E,_proxyFormState:k,get _fields(){return g},get _formValues(){return w},get _state(){return _},set _state(e){_=e},get _defaultValues(){return y},get _names(){return x},set _names(e){x=e},get _formState(){return l},set _formState(e){l=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:ne,register:se,handleSubmit:fe,watch:(e,t)=>K(e)?E.values.subscribe({next:r=>e(X(void 0,t),r)}):X(e,t,!0),setValue:te,getValues:oe,reset:pe,resetField:(e,t={})=>{m(g,e)&&(h(t.defaultValue)?te(e,m(y,e)):(te(e,t.defaultValue),N(y,e,t.defaultValue)),t.keepTouched||he(l.touchedFields,e),t.keepDirty||(he(l.dirtyFields,e),l.isDirty=t.defaultValue?Q(e,m(y,e)):Q()),t.keepError||(he(l.errors,e),k.isValid&&I()),E.state.next({...l}))},clearErrors:e=>{e&&C(e).forEach((e=>he(l.errors,e))),E.state.next({errors:e?l.errors:{}})},unregister:ue,setError:le,setFocus:(e,t={})=>{const r=m(g,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ie}}t.Controller=e=>e.render(D(e)),t.Form=function(e){const t=S(),[r,o]=n.default.useState(!1),{control:i=t.control,onSubmit:a,children:l,action:u,method:s=z,headers:c,encType:f,onError:d,render:p,onSuccess:h,validateStatus:v,...g}=e,y=async t=>{let r=!1,n="";await i.handleSubmit((async e=>{const o=new FormData;let l="";try{l=JSON.stringify(e)}catch(e){}for(const t of i._names.mount)o.append(t,m(e,t));if(a&&a({data:e,event:t,method:s,formData:o,formDataJson:l}),u)try{const e=[c&&c["Content-Type"],f].some((e=>e&&e.includes("json"))),t=await fetch(u,{method:s,headers:{...c,...f?{"Content-Type":f}:{}},body:e?l:o});t&&(v?!v(t.status):t.status<200||t.status>=300)?(r=!0,d&&d({response:t}),n=String(t.status)):h&&h({response:t})}catch(e){r=!0,d&&d({error:e})}}))(t),r&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:n}))};return n.default.useEffect((()=>{o(!0)}),[]),p?n.default.createElement(n.default.Fragment,null,p({submit:y})):n.default.createElement("form",{noValidate:r,action:u,method:s,encType:f,onSubmit:y,...g},l)},t.FormProvider=e=>{const{children:t,...r}=e;return n.default.createElement(x.Provider,{value:r},t)},t.appendErrors=F,t.get=m,t.set=N,t.useController=D,t.useFieldArray=function(e){const t=S(),{control:r=t.control,name:o,keyName:i="id",shouldUnregister:a}=e,[l,u]=n.default.useState(r._getFieldArray(o)),s=n.default.useRef(r._getFieldArray(o).map(H)),c=n.default.useRef(l),f=n.default.useRef(o),p=n.default.useRef(!1);f.current=o,c.current=l,r._names.array.add(o),e.rules&&r.register(o,e.rules),P({next:({values:e,name:t})=>{if(t===f.current||!t){const t=m(e,f.current);Array.isArray(t)&&(u(t),s.current=t.map(H))}},subject:r._subjects.array});const h=n.default.useCallback((e=>{p.current=!0,r._updateFieldArray(o,e)}),[r,o]);return n.default.useEffect((()=>{if(r._state.action=!1,V(o,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!W(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([o]).then((e=>{const t=m(e.errors,o),n=m(r._formState.errors,o);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?N(r._formState.errors,o,t):he(r._formState.errors,o),r._subjects.state.next({errors:r._formState.errors}))}));else{const e=m(r._fields,o);e&&e._f&&ae(e,r._formValues,r._options.criteriaMode===b,r._options.shouldUseNativeValidation,!0).then((e=>!O(e)&&r._subjects.state.next({errors:q(r._formState.errors,e,o)})))}r._subjects.values.next({name:o,values:{...r._formValues}}),r._names.focus&&B(r._fields,(e=>!!e&&e.startsWith(r._names.focus||""))),r._names.focus="",r._updateValid()}),[l,o,r]),n.default.useEffect((()=>(!m(r._formValues,o)&&r._updateFieldArray(o),()=>{(r._options.shouldUnregister||a)&&r.unregister(o)})),[o,r,i,a]),{swap:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(o);pe(n,e,t),pe(s.current,e,t),h(n),u(n),r._updateFieldArray(o,n,pe,{argA:e,argB:t},!1)}),[h,o,r]),move:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(o);ce(n,e,t),ce(s.current,e,t),h(n),u(n),r._updateFieldArray(o,n,ce,{argA:e,argB:t},!1)}),[h,o,r]),prepend:n.default.useCallback(((e,t)=>{const n=C(d(e)),i=fe(r._getFieldArray(o),n);r._names.focus=U(o,0,t),s.current=fe(s.current,n.map(H)),h(i),u(i),r._updateFieldArray(o,i,fe,{argA:ue(e)})}),[h,o,r]),append:n.default.useCallback(((e,t)=>{const n=C(d(e)),i=le(r._getFieldArray(o),n);r._names.focus=U(o,i.length-1,t),s.current=le(s.current,n.map(H)),h(i),u(i),r._updateFieldArray(o,i,le,{argA:ue(e)})}),[h,o,r]),remove:n.default.useCallback((e=>{const t=de(r._getFieldArray(o),e);s.current=de(s.current,e),h(t),u(t),r._updateFieldArray(o,t,de,{argA:e})}),[h,o,r]),insert:n.default.useCallback(((e,t,n)=>{const i=C(d(t)),a=se(r._getFieldArray(o),e,i);r._names.focus=U(o,e,n),s.current=se(s.current,e,i.map(H)),h(a),u(a),r._updateFieldArray(o,a,se,{argA:e,argB:ue(t)})}),[h,o,r]),update:n.default.useCallback(((e,t)=>{const n=d(t),i=me(r._getFieldArray(o),e,n);s.current=[...i].map(((t,r)=>t&&r!==e?s.current[r]:H())),h(i),u([...i]),r._updateFieldArray(o,i,me,{argA:e,argB:n},!0,!1)}),[h,o,r]),replace:n.default.useCallback((e=>{const t=C(d(e));s.current=t.map(H),h([...t]),u([...t]),r._updateFieldArray(o,[...t],(e=>e),{},!0,!1)}),[h,o,r]),fields:n.default.useMemo((()=>l.map(((e,t)=>({...e,[i]:s.current[t]||H()})))),[l,i])}},t.useForm=function(e={}){const t=n.default.useRef(),[r,o]=n.default.useState({isDirty:!1,isValidating:!1,isLoading:K(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:K(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Le(e,(()=>o((e=>({...e}))))),formState:r});const i=t.current.control;return i._options=e,P({subject:i._subjects.state,next:e=>{E(e,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),n.default.useEffect((()=>{e.values&&!ye(e.values,i._defaultValues)?i._reset(e.values,i._options.resetOptions):i._resetDefaultValues()}),[e.values,i]),n.default.useEffect((()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),t.current.formState=k(r,i),t.current},t.useFormContext=S,t.useFormState=L,t.useWatch=T},69921:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case s:case d:case v:case m:case u:return e;default:return t}}case o:return t}}}function x(e){return _(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=u,t.Element=n,t.ForwardRef=d,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||_(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===s},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===l||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===s||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=_},59864:(e,t,r)=>{"use strict";e.exports=r(69921)},89144:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(94846)),l=i(r(79483)),u=i(r(2835)),s=i(r(34246)),c=i(r(54087)),f=i(r(27739)),d=i(r(87363)),p=i(r(45697)),h=1e3/60,m=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.wasAnimating=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyle=null,this.clearUnreadPropStyle=function(e){var t=!1,r=o.state,i=r.currentStyle,a=r.currentVelocity,l=r.lastIdealStyle,u=r.lastIdealVelocity;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var c=e[s];"number"==typeof c&&(t||(t=!0,i=n({},i),a=n({},a),l=n({},l),u=n({},u)),i[s]=c,a[s]=0,l[s]=c,u[s]=0)}t&&o.setState({currentStyle:i,currentVelocity:a,lastIdealStyle:l,lastIdealVelocity:u})},this.startAnimationIfNecessary=function(){o.animationID=c.default((function(e){var t=o.props.style;if(f.default(o.state.currentStyle,t,o.state.currentVelocity))return o.wasAnimating&&o.props.onRest&&o.props.onRest(),o.animationID=null,o.wasAnimating=!1,void(o.accumulatedTime=0);o.wasAnimating=!0;var r=e||s.default(),n=r-o.prevTime;if(o.prevTime=r,o.accumulatedTime=o.accumulatedTime+n,o.accumulatedTime>10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l={},c={},d={},p={};for(var m in t)if(Object.prototype.hasOwnProperty.call(t,m)){var v=t[m];if("number"==typeof v)d[m]=v,p[m]=0,l[m]=v,c[m]=0;else{for(var g=o.state.lastIdealStyle[m],y=o.state.lastIdealVelocity[m],b=0;b<a;b++){var w=u.default(h/1e3,g,y,v.val,v.stiffness,v.damping,v.precision);g=w[0],y=w[1]}var _=u.default(h/1e3,g,y,v.val,v.stiffness,v.damping,v.precision),x=_[0],S=_[1];d[m]=g+(x-g)*i,p[m]=y+(S-y)*i,l[m]=g,c[m]=y}}o.animationID=null,o.accumulatedTime-=a*h,o.setState({currentStyle:d,currentVelocity:p,lastIdealStyle:l,lastIdealVelocity:c}),o.unreadPropStyle=null,o.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyle:p.default.objectOf(p.default.number),style:p.default.objectOf(p.default.oneOfType([p.default.number,p.default.object])).isRequired,children:p.default.func.isRequired,onRest:p.default.func},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyle,r=e.style,n=t||l.default(r),o=a.default(n);return{currentStyle:n,currentVelocity:o,lastIdealStyle:n,lastIdealVelocity:o}},t.prototype.componentDidMount=function(){this.prevTime=s.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyle&&this.clearUnreadPropStyle(this.unreadPropStyle),this.unreadPropStyle=e.style,null==this.animationID&&(this.prevTime=s.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(c.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyle);return e&&d.default.Children.only(e)},t}(d.default.Component);t.default=m,e.exports=t.default},26506:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(94846)),l=i(r(79483)),u=i(r(2835)),s=i(r(34246)),c=i(r(54087)),f=i(r(27739)),d=i(r(87363)),p=i(r(45697)),h=1e3/60;var m=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=o.state,r=t.currentStyles,i=t.currentVelocities,a=t.lastIdealStyles,l=t.lastIdealVelocities,u=!1,s=0;s<e.length;s++){var c=e[s],f=!1;for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var p=c[d];"number"==typeof p&&(f||(f=!0,u=!0,r[s]=n({},r[s]),i[s]=n({},i[s]),a[s]=n({},a[s]),l[s]=n({},l[s])),r[s][d]=p,i[s][d]=0,a[s][d]=p,l[s][d]=0)}}u&&o.setState({currentStyles:r,currentVelocities:i,lastIdealStyles:a,lastIdealVelocities:l})},this.startAnimationIfNecessary=function(){o.animationID=c.default((function(e){var t=o.props.styles(o.state.lastIdealStyles);if(function(e,t,r){for(var n=0;n<e.length;n++)if(!f.default(e[n],t[n],r[n]))return!1;return!0}(o.state.currentStyles,t,o.state.currentVelocities))return o.animationID=null,void(o.accumulatedTime=0);var r=e||s.default(),n=r-o.prevTime;if(o.prevTime=r,o.accumulatedTime=o.accumulatedTime+n,o.accumulatedTime>10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l=[],c=[],d=[],p=[],m=0;m<t.length;m++){var v=t[m],g={},y={},b={},w={};for(var _ in v)if(Object.prototype.hasOwnProperty.call(v,_)){var x=v[_];if("number"==typeof x)g[_]=x,y[_]=0,b[_]=x,w[_]=0;else{for(var S=o.state.lastIdealStyles[m][_],k=o.state.lastIdealVelocities[m][_],O=0;O<a;O++){var E=u.default(h/1e3,S,k,x.val,x.stiffness,x.damping,x.precision);S=E[0],k=E[1]}var C=u.default(h/1e3,S,k,x.val,x.stiffness,x.damping,x.precision),j=C[0],P=C[1];g[_]=S+(j-S)*i,y[_]=k+(P-k)*i,b[_]=S,w[_]=k}}d[m]=g,p[m]=y,l[m]=b,c[m]=w}o.animationID=null,o.accumulatedTime-=a*h,o.setState({currentStyles:d,currentVelocities:p,lastIdealStyles:l,lastIdealVelocities:c}),o.unreadPropStyles=null,o.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:p.default.arrayOf(p.default.objectOf(p.default.number)),styles:p.default.func.isRequired,children:p.default.func.isRequired},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyles,r=e.styles,n=t||r().map(l.default),o=n.map((function(e){return a.default(e)}));return{currentStyles:n,currentVelocities:o,lastIdealStyles:n,lastIdealVelocities:o}},t.prototype.componentDidMount=function(){this.prevTime=s.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles),this.unreadPropStyles=e.styles(this.state.lastIdealStyles),null==this.animationID&&(this.prevTime=s.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(c.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyles);return e&&d.default.Children.only(e)},t}(d.default.Component);t.default=m,e.exports=t.default},921:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(94846)),l=i(r(79483)),u=i(r(2835)),s=i(r(48505)),c=i(r(34246)),f=i(r(54087)),d=i(r(27739)),p=i(r(87363)),h=i(r(45697)),m=1e3/60;function v(e,t,r){var n=t;return null==n?e.map((function(e,t){return{key:e.key,data:e.data,style:r[t]}})):e.map((function(e,t){for(var o=0;o<n.length;o++)if(n[o].key===e.key)return{key:n[o].key,data:n[o].data,style:r[t]};return{key:e.key,data:e.data,style:r[t]}}))}function g(e,t,r,n,o,i,l,u,c){for(var f=s.default(n,o,(function(e,n){var o=t(n);return null==o||d.default(i[e],o,l[e])?(r({key:n.key,data:n.data}),null):{key:n.key,data:n.data,style:o}})),p=[],h=[],m=[],v=[],g=0;g<f.length;g++){for(var y=f[g],b=null,w=0;w<n.length;w++)if(n[w].key===y.key){b=w;break}if(null==b){var _=e(y);p[g]=_,m[g]=_;var x=a.default(y.style);h[g]=x,v[g]=x}else p[g]=i[b],m[g]=u[b],h[g]=l[b],v[g]=c[b]}return[f,p,h,m,v]}var y=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.unmounting=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=g(o.props.willEnter,o.props.willLeave,o.props.didLeave,o.state.mergedPropsStyles,e,o.state.currentStyles,o.state.currentVelocities,o.state.lastIdealStyles,o.state.lastIdealVelocities),r=t[0],i=t[1],a=t[2],l=t[3],u=t[4],s=0;s<e.length;s++){var c=e[s].style,f=!1;for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var p=c[d];"number"==typeof p&&(f||(f=!0,i[s]=n({},i[s]),a[s]=n({},a[s]),l[s]=n({},l[s]),u[s]=n({},u[s]),r[s]={key:r[s].key,data:r[s].data,style:n({},r[s].style)}),i[s][d]=p,a[s][d]=0,l[s][d]=p,u[s][d]=0,r[s].style[d]=p)}}o.setState({currentStyles:i,currentVelocities:a,mergedPropsStyles:r,lastIdealStyles:l,lastIdealVelocities:u})},this.startAnimationIfNecessary=function(){o.unmounting||(o.animationID=f.default((function(e){if(!o.unmounting){var t=o.props.styles,r="function"==typeof t?t(v(o.state.mergedPropsStyles,o.unreadPropStyles,o.state.lastIdealStyles)):t;if(function(e,t,r,n){if(n.length!==t.length)return!1;for(var o=0;o<n.length;o++)if(n[o].key!==t[o].key)return!1;for(o=0;o<n.length;o++)if(!d.default(e[o],t[o].style,r[o]))return!1;return!0}(o.state.currentStyles,r,o.state.currentVelocities,o.state.mergedPropsStyles))return o.animationID=null,void(o.accumulatedTime=0);var n=e||c.default(),i=n-o.prevTime;if(o.prevTime=n,o.accumulatedTime=o.accumulatedTime+i,o.accumulatedTime>10*m&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var a=(o.accumulatedTime-Math.floor(o.accumulatedTime/m)*m)/m,l=Math.floor(o.accumulatedTime/m),s=g(o.props.willEnter,o.props.willLeave,o.props.didLeave,o.state.mergedPropsStyles,r,o.state.currentStyles,o.state.currentVelocities,o.state.lastIdealStyles,o.state.lastIdealVelocities),f=s[0],p=s[1],h=s[2],y=s[3],b=s[4],w=0;w<f.length;w++){var _=f[w].style,x={},S={},k={},O={};for(var E in _)if(Object.prototype.hasOwnProperty.call(_,E)){var C=_[E];if("number"==typeof C)x[E]=C,S[E]=0,k[E]=C,O[E]=0;else{for(var j=y[w][E],P=b[w][E],L=0;L<l;L++){var M=u.default(m/1e3,j,P,C.val,C.stiffness,C.damping,C.precision);j=M[0],P=M[1]}var A=u.default(m/1e3,j,P,C.val,C.stiffness,C.damping,C.precision),T=A[0],I=A[1];x[E]=j+(T-j)*a,S[E]=P+(I-P)*a,k[E]=j,O[E]=P}}y[w]=k,b[w]=O,p[w]=x,h[w]=S}o.animationID=null,o.accumulatedTime-=l*m,o.setState({currentStyles:p,currentVelocities:h,lastIdealStyles:y,lastIdealVelocities:b,mergedPropsStyles:f}),o.unreadPropStyles=null,o.startAnimationIfNecessary()}})))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:h.default.arrayOf(h.default.shape({key:h.default.string.isRequired,data:h.default.any,style:h.default.objectOf(h.default.number).isRequired})),styles:h.default.oneOfType([h.default.func,h.default.arrayOf(h.default.shape({key:h.default.string.isRequired,data:h.default.any,style:h.default.objectOf(h.default.oneOfType([h.default.number,h.default.object])).isRequired}))]).isRequired,children:h.default.func.isRequired,willEnter:h.default.func,willLeave:h.default.func,didLeave:h.default.func},enumerable:!0},{key:"defaultProps",value:{willEnter:function(e){return l.default(e.style)},willLeave:function(){return null},didLeave:function(){}},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyles,r=e.styles,n=e.willEnter,o=e.willLeave,i=e.didLeave,u="function"==typeof r?r(t):r,s=void 0;s=null==t?u:t.map((function(e){for(var t=0;t<u.length;t++)if(u[t].key===e.key)return u[t];return e}));var c=null==t?u.map((function(e){return l.default(e.style)})):t.map((function(e){return l.default(e.style)})),f=null==t?u.map((function(e){return a.default(e.style)})):t.map((function(e){return a.default(e.style)})),d=g(n,o,i,s,u,c,f,c,f),p=d[0];return{currentStyles:d[1],currentVelocities:d[2],lastIdealStyles:d[3],lastIdealVelocities:d[4],mergedPropsStyles:p}},t.prototype.componentDidMount=function(){this.prevTime=c.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles);var t=e.styles;this.unreadPropStyles="function"==typeof t?t(v(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.lastIdealStyles)):t,null==this.animationID&&(this.prevTime=c.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){this.unmounting=!0,null!=this.animationID&&(f.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=v(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.currentStyles),t=this.props.children(e);return t&&p.default.Children.only(t)},t}(p.default.Component);t.default=y,e.exports=t.default},94846:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=0);return t},e.exports=t.default},48505:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n={},o=0;o<e.length;o++)n[e[o].key]=o;var i={};for(o=0;o<t.length;o++)i[t[o].key]=o;var a=[];for(o=0;o<t.length;o++)a[o]=t[o];for(o=0;o<e.length;o++)if(!Object.prototype.hasOwnProperty.call(i,e[o].key)){var l=r(o,e[o]);null!=l&&a.push(l)}return a.sort((function(e,r){var o=i[e.key],a=i[r.key],l=n[e.key],u=n[r.key];if(null!=o&&null!=a)return i[e.key]-i[r.key];if(null!=l&&null!=u)return n[e.key]-n[r.key];if(null!=o){for(var s=0;s<t.length;s++){var c=t[s].key;if(Object.prototype.hasOwnProperty.call(n,c)){if(o<i[c]&&u>n[c])return-1;if(o>i[c]&&u<n[c])return 1}}return 1}for(s=0;s<t.length;s++){c=t[s].key;if(Object.prototype.hasOwnProperty.call(n,c)){if(a<i[c]&&l>n[c])return 1;if(a>i[c]&&l<n[c])return-1}}return-1}))},e.exports=t.default},72392:(e,t)=>{"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},37727:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var o=r(89144);t.Motion=n(o);var i=r(26506);t.StaggeredMotion=n(i);var a=r(921);t.TransitionMotion=n(a);var l=r(20124);t.spring=n(l);var u=r(72392);t.presets=n(u);var s=r(79483);t.stripStyle=n(s);var c=r(49566);t.reorderKeys=n(c)},49566:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){0};e.exports=t.default},27739:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(0!==r[n])return!1;var o="number"==typeof t[n]?t[n]:t[n].val;if(e[n]!==o)return!1}return!0},e.exports=t.default},20124:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=function(e,t){return n({},l,t,{val:e})};var o,i=r(72392),a=(o=i)&&o.__esModule?o:{default:o},l=n({},a.default.noWobble,{precision:.01});e.exports=t.default},2835:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,n,o,i,a,l){var u=n+(-i*(t-o)+-a*n)*e,s=t+u*e;if(Math.abs(u)<l&&Math.abs(s-o)<l)return r[0]=o,r[1]=0,r;return r[0]=s,r[1]=u,r};var r=[0,0];e.exports=t.default},79483:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]="number"==typeof e[r]?e[r]:e[r].val);return t},e.exports=t.default},34246:function(e){(function(){var t,r,n;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},r=process.hrtime,n=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},36113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Provider:()=>B,ReactReduxContext:()=>c,batch:()=>i.unstable_batchedUpdates,connect:()=>F,createDispatchHook:()=>W,createSelectorHook:()=>m,createStoreHook:()=>H,shallowEqual:()=>T,useDispatch:()=>V,useSelector:()=>v,useStore:()=>U});var n=r(61688),o=r(52798),i=r(61533);let a=function(e){e()};const l=()=>a;var u=r(87363),s=r.n(u);const c=(0,u.createContext)(null);function f(){return(0,u.useContext)(c)}const d=()=>{throw new Error("uSES not initialized!")};let p=d;const h=(e,t)=>e===t;function m(e=c){const t=e===c?f:()=>(0,u.useContext)(e);return function(e,r=h){const{store:n,subscription:o,getServerState:i}=t(),a=p(o.addNestedSub,n.getState,i||n.getState,e,r);return(0,u.useDebugValue)(a),a}}const v=m();function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function y(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var b=r(8679),w=r.n(b),_=r(72973);const x=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function S(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let l,u,s,c,f,d=!1;function p(d,p){const h=!i(p,u),m=!o(d,l,p,u);return l=d,u=p,h&&m?(s=e(l,u),t.dependsOnOwnProps&&(c=t(n,u)),f=r(s,c,u),f):h?(e.dependsOnOwnProps&&(s=e(l,u)),t.dependsOnOwnProps&&(c=t(n,u)),f=r(s,c,u),f):m?function(){const t=e(l,u),n=!a(t,s);return s=t,n&&(f=r(s,c,u)),f}():f}return function(o,i){return d?p(o,i):(l=o,u=i,s=e(l,u),c=t(n,u),f=r(s,c,u),d=!0,f)}}function k(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function O(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function E(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=O(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=O(o),o=n(t,r)),o},n}}function C(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function j(e,t,r){return g({},r,e,t)}const P={notify(){},get:()=>[]};function L(e,t){let r,n=P;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=t?t.addNestedSub(o):e.subscribe(o),n=function(){const e=l();let t=null,r=null;return{clear(){t=null,r=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const a={addNestedSub:function(e){return i(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=P)},getListeners:()=>n};return a}const M=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?u.useLayoutEffect:u.useEffect;function A(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(A(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!A(e[r[n]],t[r[n]]))return!1;return!0}const I=["reactReduxForwardedRef"];let R=d;const N=[null,null];function D(e,t,r,n,o,i){e.current=n,r.current=!1,o.current&&(o.current=null,i())}function z(e,t){return e===t}const F=function(e,t,r,{pure:n,areStatesEqual:o=z,areOwnPropsEqual:i=T,areStatePropsEqual:a=T,areMergedPropsEqual:l=T,forwardRef:f=!1,context:d=c}={}){const p=d,h=function(e){return e?"function"==typeof e?E(e):C(e,"mapStateToProps"):k((()=>({})))}(e),m=function(e){return e&&"object"==typeof e?k((t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t))):e?"function"==typeof e?E(e):C(e,"mapDispatchToProps"):k((e=>({dispatch:e})))}(t),v=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const l=e(t,r,a);return i?n(l,o)||(o=l):(i=!0,o=l),o}}}(e):C(e,"mergeProps"):()=>j}(r),b=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:b,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:h,initMapDispatchToProps:m,initMergeProps:v,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:l};function c(t){const[r,o,i]=(0,u.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,r=y(t,I);return[t.context,e,r]}),[t]),a=(0,u.useMemo)((()=>r&&r.Consumer&&(0,_.isContextConsumer)(s().createElement(r.Consumer,null))?r:p),[r,p]),l=(0,u.useContext)(a),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),f=Boolean(l)&&Boolean(l.store);const d=c?t.store:l.store,h=f?l.getServerState:d.getState,m=(0,u.useMemo)((()=>function(e,t){let{initMapStateToProps:r,initMapDispatchToProps:n,initMergeProps:o}=t,i=y(t,x);return S(r(e,i),n(e,i),o(e,i),e,i)}(d.dispatch,n)),[d]),[v,w]=(0,u.useMemo)((()=>{if(!b)return N;const e=L(d,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,c,l]),k=(0,u.useMemo)((()=>c?l:g({},l,{subscription:v})),[c,l,v]),O=(0,u.useRef)(),E=(0,u.useRef)(i),C=(0,u.useRef)(),j=(0,u.useRef)(!1),P=((0,u.useRef)(!1),(0,u.useRef)(!1)),A=(0,u.useRef)();M((()=>(P.current=!0,()=>{P.current=!1})),[]);const T=(0,u.useMemo)((()=>()=>C.current&&i===E.current?C.current:m(d.getState(),i)),[d,i]),z=(0,u.useMemo)((()=>e=>v?function(e,t,r,n,o,i,a,l,u,s,c){if(!e)return()=>{};let f=!1,d=null;const p=()=>{if(f||!l.current)return;const e=t.getState();let r,p;try{r=n(e,o.current)}catch(e){p=e,d=e}p||(d=null),r===i.current?a.current||s():(i.current=r,u.current=r,a.current=!0,c())};return r.onStateChange=p,r.trySubscribe(),p(),()=>{if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}(b,d,v,m,E,O,j,P,C,w,e):()=>{}),[v]);var F,B,H;let U;F=D,B=[E,O,j,i,C,w],M((()=>F(...B)),H);try{U=R(z,T,h?()=>m(h(),i):T)}catch(e){throw A.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${A.current.stack}\n\n`),e}M((()=>{A.current=void 0,C.current=void 0,O.current=U}));const W=(0,u.useMemo)((()=>s().createElement(e,g({},U,{ref:o}))),[o,e,U]);return(0,u.useMemo)((()=>b?s().createElement(a.Provider,{value:k},W):W),[a,W,k])}const d=s().memo(c);if(d.WrappedComponent=e,d.displayName=c.displayName=r,f){const t=s().forwardRef((function(e,t){return s().createElement(d,g({},e,{reactReduxForwardedRef:t}))}));return t.displayName=r,t.WrappedComponent=e,w()(t,e)}return w()(d,e)}};const B=function({store:e,context:t,children:r,serverState:n}){const o=(0,u.useMemo)((()=>{const t=L(e);return{store:e,subscription:t,getServerState:n?()=>n:void 0}}),[e,n]),i=(0,u.useMemo)((()=>e.getState()),[e]);M((()=>{const{subscription:t}=o;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),i!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[o,i]);const a=t||c;return s().createElement(a.Provider,{value:o},r)};function H(e=c){const t=e===c?f:()=>(0,u.useContext)(e);return function(){const{store:e}=t();return e}}const U=H();function W(e=c){const t=e===c?U:H(e);return function(){return t().dispatch}}const V=W();var q,G;q=o.useSyncExternalStoreWithSelector,p=q,(e=>{R=e})(n.useSyncExternalStore),G=i.unstable_batchedUpdates,a=G},88359:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case l:case a:case d:case p:return e;default:switch(e=e&&e.$$typeof){case c:case s:case f:case m:case h:case u:return e;default:return t}}case o:return t}}}r=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return g(e)===s}},72973:(e,t,r)=>{"use strict";e.exports=r(88359)},75251:(e,t,r)=>{"use strict";var n=r(87363),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,i={},s=null,c=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,n)&&!u.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:c,props:i,_owner:l.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},85893:(e,t,r)=>{"use strict";e.exports=r(75251)},14791:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}r.d(t,{Kf:()=>f,md:()=>b,DE:()=>g,UY:()=>m,qC:()=>y,MT:()=>p,jB:()=>h});var s="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},f={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function d(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function p(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(p)(e,t)}if("function"!=typeof e)throw new Error(u(2));var o=e,i=t,a=[],l=a,c=!1;function h(){l===a&&(l=a.slice())}function m(){if(c)throw new Error(u(3));return i}function v(e){if("function"!=typeof e)throw new Error(u(4));if(c)throw new Error(u(5));var t=!0;return h(),l.push(e),function(){if(t){if(c)throw new Error(u(6));t=!1,h();var r=l.indexOf(e);l.splice(r,1),a=null}}}function g(e){if(!d(e))throw new Error(u(7));if(void 0===e.type)throw new Error(u(8));if(c)throw new Error(u(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=l,r=0;r<t.length;r++){(0,t[r])()}return e}return g({type:f.INIT}),(n={dispatch:g,subscribe:v,getState:m,replaceReducer:function(e){if("function"!=typeof e)throw new Error(u(10));o=e,g({type:f.REPLACE})}})[s]=function(){var e,t=v;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(u(11));function r(){e.next&&e.next(m())}return r(),{unsubscribe:t(r)}}})[s]=function(){return this},e},n}var h=p;function m(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];0,"function"==typeof e[o]&&(r[o]=e[o])}var i,a=Object.keys(r);try{!function(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:f.INIT}))throw new Error(u(12));if(void 0===r(void 0,{type:f.PROBE_UNKNOWN_ACTION()}))throw new Error(u(13))}))}(r)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},l=0;l<a.length;l++){var s=a[l],c=r[s],f=e[s],d=c(f,t);if(void 0===d){t&&t.type;throw new Error(u(14))}o[s]=d,n=n||d!==f}return(n=n||a.length!==Object.keys(e).length)?o:e}}function v(e,t){return function(){return t(e.apply(this,arguments))}}function g(e,t){if("function"==typeof e)return v(e,t);if("object"!=typeof e||null===e)throw new Error(u(16));var r={};for(var n in e){var o=e[n];"function"==typeof o&&(r[n]=v(o,t))}return r}function y(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function b(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error(u(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return n=y.apply(void 0,i)(r.dispatch),l(l({},r),{},{dispatch:n})}}}},44815:(e,t,r)=>{"use strict";r.d(t,{PW:()=>i});var n="NOT_FOUND";var o=function(e,t){return e===t};function i(e,t){var r,i,a="object"==typeof t?t:{equalityCheck:t},l=a.equalityCheck,u=void 0===l?o:l,s=a.maxSize,c=void 0===s?1:s,f=a.resultEqualityCheck,d=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o<n;o++)if(!e(t[o],r[o]))return!1;return!0}}(u),p=1===c?(r=d,{get:function(e){return i&&r(i.key,e)?i.value:n},put:function(e,t){i={key:e,value:t}},getEntries:function(){return i?[i]:[]},clear:function(){i=void 0}}):function(e,t){var r=[];function o(e){var o=r.findIndex((function(r){return t(e,r.key)}));if(o>-1){var i=r[o];return o>0&&(r.splice(o,1),r.unshift(i)),i.value}return n}return{get:o,put:function(t,i){o(t)===n&&(r.unshift({key:t,value:i}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(c,d);function h(){var t=p.get(arguments);if(t===n){if(t=e.apply(null,arguments),f){var r=p.getEntries().find((function(e){return f(e.value,t)}));r&&(t=r.value)}p.put(arguments,t)}return t}return h.clearCache=function(){return p.clear()},h}},22222:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i,a=0,l={memoizeOptions:void 0},u=n.pop();if("object"==typeof u&&(l=u,u=n.pop()),"function"!=typeof u)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof u+"]");var s=l.memoizeOptions,c=void 0===s?r:s,f=Array.isArray(c)?c:[c],d=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var r=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}(n),p=e.apply(void 0,[function(){return a++,u.apply(null,arguments)}].concat(f)),h=e((function(){for(var e=[],t=d.length,r=0;r<t;r++)e.push(d[r].apply(null,arguments));return i=p.apply(null,e)}));return Object.assign(h,{resultFunc:u,memoizedResultFunc:p,dependencies:d,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),h}}r.d(t,{P1:()=>o});var o=n(r(44815).PW)},99543:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>x,SpinnerCircular:()=>h,SpinnerCircularFixed:()=>v,SpinnerCircularSplit:()=>y,SpinnerDiamond:()=>R,SpinnerDotted:()=>S,SpinnerInfinity:()=>w,SpinnerRomb:()=>I,SpinnerRound:()=>O,SpinnerRoundFilled:()=>M,SpinnerRoundOutlined:()=>j});var n=r(87363),o=r.n(n),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}var l={color:"#38ad48",enabled:!0,size:50,style:{}},u=function(e){return parseFloat(e.toString()).toString()===e.toString()?e+"px":e.toString()},s=function(e){var t=function(t){var r=t.color,n=t.enabled,l=t.size,s=t.style,c=a(t,["color","enabled","size","style"]),f=i(i({},c),{style:i({color:r,overflow:"visible",width:u(l)},s)});return n?o().createElement(e,i({},f)):null};return t.defaultProps=l,t},c={speed:100,still:!1,thickness:100},f=i(i({},c),{secondaryColor:"rgba(0,0,0,0.44)"});function d(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}d("@keyframes spinners-react-circular{0%{stroke-dashoffset:306}50%{stroke-dasharray:40,134}to{stroke-dasharray:1,174;stroke-dashoffset:132}}");var p=function(e){var t=e.secondaryColor,r=e.speed,n=e.still,l=e.thickness,u=a(e,["secondaryColor","speed","still","thickness"]),s=l/100*4,c=n?{}:{animation:"spinners-react-circular "+140/r+"s linear infinite"};return o().createElement("svg",i({fill:"none"},u,{viewBox:"0 0 66 66"}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:t,strokeWidth:s}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:"currentColor",strokeDasharray:"1, 174",strokeDashoffset:"306",strokeLinecap:"round",strokeWidth:s,style:c}))};p.defaultProps=f;var h=s(p);d("@keyframes spinners-react-circular-fixed{0%{stroke-dashoffset:325}to{stroke-dashoffset:151}}");var m=function(e){var t=e.secondaryColor,r=e.speed,n=e.still,l=e.thickness,u=a(e,["secondaryColor","speed","still","thickness"]),s=l/100*4,c=n?{}:{animation:"spinners-react-circular-fixed "+140/r+"s linear infinite"};return o().createElement("svg",i({fill:"none"},u,{viewBox:"0 0 66 66"}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:t,strokeWidth:s}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:"currentColor",strokeDasharray:"40, 134",strokeDashoffset:"325",strokeLinecap:"round",strokeWidth:s,style:c}))};m.defaultProps=f;var v=s(m);d("@keyframes spinners-react-circular-split{0%{stroke-dashoffset:1;stroke-dasharray:5,170}10%{stroke-dashoffset:13;stroke-dasharray:30,145}13%{stroke-dashoffset:-11;stroke-dasharray:5,145}50%{stroke-dasharray:5,0,5,165;stroke-dashoffset:-82}51%{stroke-dasharray:2,0,2,139;stroke-dashoffset:-85}61%{stroke-dasharray:15,0,15,165;stroke-dashoffset:-72}64%{stroke-dasharray:5,20,5,145;stroke-dashoffset:-72}}");var g=function(e){var t=e.secondaryColor,r=e.speed,n=e.still,l=e.thickness,u=a(e,["secondaryColor","speed","still","thickness"]),s=l/100*4,c=n?{}:{animation:"spinners-react-circular-split "+140/r+"s linear infinite"};return o().createElement("svg",i({fill:"none"},u,{viewBox:"0 0 66 66"}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:t,strokeWidth:s}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:"28",stroke:"currentColor",strokeDasharray:"5, 170",strokeDashoffset:"1",strokeLinecap:"round",strokeWidth:s,style:c,transform:"rotate(-90 33 33)"}))};g.defaultProps=f;var y=s(g);d("@keyframes spinners-react-infinity{0%{stroke-dasharray:1,347;stroke-dashoffset:75}25%,75%{stroke-dasharray:17,330}50%{stroke-dasharray:1,347}to{stroke-dasharray:1,347;stroke-dashoffset:423}}");var b=function(e){var t=e.secondaryColor,r=e.speed,n=e.still,l=e.thickness,u=a(e,["secondaryColor","speed","still","thickness"]),s=l/100*7,c=n?{}:{animation:"spinners-react-infinity "+140/r+"s linear infinite"};return o().createElement("svg",i({fill:"none",viewBox:"0 0 131 55"},u),o().createElement("defs",null,o().createElement("path",{d:"M46.57 45.5138C36.346 55.4954 19.8919 55.4954 9.66794 45.5138C-0.55598 35.5321 -0.55598 19.4678 9.66794 9.48624C19.8919 -0.495412 36.346 -0.495412 46.57 9.48624L84.4303 45.5138C94.6543 55.4954 111.108 55.4954 121.332 45.5138C131.556 35.5321 131.556 19.4678 121.332 9.48624C111.108 -0.495412 94.6543 -0.495412 84.4303 9.48624L46.57 45.5138Z",id:"spinners-react-infinity-path"})),o().createElement("use",{stroke:t,strokeWidth:s,xlinkHref:"#spinners-react-infinity-path"}),o().createElement("use",{fill:"none",stroke:"currentColor",strokeDasharray:"1, 347",strokeDashoffset:"75",strokeLinecap:"round",strokeWidth:s,style:c,xlinkHref:"#spinners-react-infinity-path"}))};b.defaultProps=f;var w=s(b);d("@keyframes spinners-react-dotted-center{0%,15%,85%,to{transform:scale(0)}40%,50%{transform:scale(1)}84%{transform:scale(.45)}}@keyframes spinners-react-dotted-shrink{50%{transform:translate(0)}}");var _=[{x:22,y:-20},{x:29,y:0},{x:22,y:20},{x:0,y:30},{x:-23,y:20},{x:-30,y:0},{x:-23,y:-20},{x:0,y:-30}],x=function(e){var t=e.speed,r=e.still,n=e.thickness,l=a(e,["speed","still","thickness"]),u=200/t,s=function(e){return r?{}:{animation:"spinners-react-dotted-shrink "+u+"s cubic-bezier(0, 0.9, 0, 0.9) "+u/20*e+"s infinite"}},c=r?{display:"none"}:{animation:"spinners-react-dotted-center "+u+"s ease-out infinite",transformOrigin:"center"};return o().createElement("svg",i({fill:"none",viewBox:"0 0 66 66"},l),_.map((function(e,t){return o().createElement("circle",{key:e.x+"-"+e.y,cx:"33",cy:"33",fill:"currentColor",r:n/100*3,style:i({transform:"translate("+e.x+"px, "+e.y+"px)"},s(t))})})),o().createElement("circle",{cx:"33",cy:"33",fill:"currentColor",r:n/100*6,style:c}))};x.defaultProps=c;var S=s(x);d("@keyframes spinners-react-round{27%,73%{r:2px;stroke-width:4}}");var k=function(e){var t=e.speed,r=e.still,n=e.thickness,l=a(e,["speed","still","thickness"]),u=n/100*3,s={animation:"spinners-react-round "+140/t+"s ease-in-out infinite",transformOrigin:"center"};return r&&(s.animation="none"),o().createElement("svg",i({fill:"none"},l,{viewBox:"0 0 66 66"}),o().createElement("circle",{cx:"33",cy:"33",fill:"none",r:28,stroke:"currentColor",strokeWidth:u,style:s}))};k.defaultProps=c;var O=s(k);d("@keyframes spinners-react-round-outlined{35%,65%{r:2px;stroke-width:4}}");var E=[{r:2},{name:"spinners-react-round-outlined",r:14},{name:"spinners-react-round-outlined",r:28}],C=function(e){var t=e.speed,r=e.still,n=e.thickness,l=a(e,["speed","still","thickness"]),u=n/100*3;return o().createElement("svg",i({fill:"none"},l,{viewBox:"0 0 66 66"}),E.map((function(e,n){return o().createElement("circle",{key:"spinner-round-outlined-r"+e.r,cx:"33",cy:"33",fill:"none",r:e.r,stroke:"currentColor",strokeWidth:n?u:4,style:e.name&&!r?{animation:e.name+" "+140/t+"s ease-in-out infinite"}:{}})})))};C.defaultProps=c;var j=s(C);d("@keyframes spinners-react-round-filled-outer{40%,60%{transform:scale(0)}}@keyframes spinners-react-round-filled-center{30%,70%{transform:scale(0)}}@keyframes spinners-react-round-filled-inner{20%,80%{transform:scale(0)}}");var P=[{r:4},{name:"spinners-react-round-filled-inner",r:12.66},{name:"spinners-react-round-filled-center",r:20.32},{name:"spinners-react-round-filled-outer",r:27.5}],L=function(e){var t=e.speed,r=e.still,n=e.thickness,l=a(e,["speed","still","thickness"]);return o().createElement("svg",i({fill:"none"},l,{viewBox:"0 0 66 66"}),P.map((function(e){return o().createElement("circle",{key:e.name||"still",cx:"33",cy:"33",fill:"currentColor",r:e.r*(e.name?n/100:1),style:{opacity:e.name?.25:1,transformOrigin:"center",animation:!e.name||r?"none":e.name+" "+140/t+"s ease-in-out infinite"}})})))};L.defaultProps=c;var M=s(L);d("@keyframes spinners-react-diamond{25%{transform:translate(30px,-30px)}50%{transform:translate(60px)}75%{transform:translate(30px,30px)}}");var A=[{x:3,y:48},{x:18,y:33},{x:18,y:48},{x:18,y:63},{x:33,y:48},{x:33,y:18},{x:33,y:33},{x:33,y:63},{x:33,y:78},{x:48,y:3},{x:48,y:18},{x:48,y:33},{x:48,y:48},{x:48,y:63},{x:48,y:78},{x:48,y:93},{x:63,y:18},{x:63,y:33},{x:63,y:48},{x:63,y:63},{x:63,y:78},{x:78,y:33},{x:78,y:48},{x:78,y:63},{x:93,y:48}],T=function(e){var t=e.secondaryColor,r=e.speed,n=e.still,l=e.thickness,u=a(e,["secondaryColor","speed","still","thickness"]),s={animation:"spinners-react-diamond "+140/r+"s steps(2, end) infinite"};return n&&(s.animation="none"),o().createElement("svg",i({fill:"currentColor"},u,{viewBox:"0 0 96 96"}),A.map((function(e){return o().createElement("circle",{key:e.x+"-"+e.y,cx:e.x,cy:e.y,fill:t,r:l/100*2.5})})),o().createElement("g",{style:s},A.filter((function(e,t){return t<5})).map((function(e){return o().createElement("circle",{key:"h-"+e.x+"-"+e.y,cx:e.x,cy:e.y,r:l/100*3.5})}))))};T.defaultProps=f;var I=s(T),R=s(T)},6641:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(93379),o=r.n(n),i=r(7795),a=r.n(i),l=r(90569),u=r.n(l),s=r(3565),c=r.n(s),f=r(19216),d=r.n(f),p=r(44589),h=r.n(p),m=r(4925),v={};v.styleTagTransform=h(),v.setAttributes=c(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();o()(m.Z,v);const g=m.Z&&m.Z.locals?m.Z.locals:void 0},93379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},a=[],l=0;l<e.length;l++){var u=e[l],s=n.base?u[0]+n.base:u[0],c=i[s]||0,f="".concat(s," ").concat(c);i[s]=c+1;var d=r(f),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var h=o(p,n);n.byIndex=l,t.splice(l,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function o(e,t){var r=t.domAPI(t);r.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var i=n(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var l=r(i[a]);t[l].references--}for(var u=n(e,o),s=0;s<i.length;s++){var c=r(i[s]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=u}}},90569:e=>{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},19216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},44589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},53250:(e,t,r)=>{"use strict";var n=r(87363);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,c=n[1];return l((function(){o.value=r,o.getSnapshot=t,s(o)&&c({inst:o})}),[e,r,t]),a((function(){return s(o)&&c({inst:o}),e((function(){s(o)&&c({inst:o})}))}),[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},50139:(e,t,r)=>{"use strict";var n=r(87363),o=r(61688);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,l=n.useRef,u=n.useEffect,s=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var f=l(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=s((function(){function e(e){if(!u){if(u=!0,a=e,e=n(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return l=t}return l=e}if(t=l,i(a,e))return t;var r=n(e);return void 0!==o&&o(t,r)?t:(a=e,l=r)}var a,l,u=!1,s=void 0===r?null:r;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,r,n,o]);var p=a(e,f[0],f[1]);return u((function(){d.hasValue=!0,d.value=p}),[p]),c(p),p}},61688:(e,t,r)=>{"use strict";e.exports=r(53250)},52798:(e,t,r)=>{"use strict";e.exports=r(50139)},94480:e=>{!function(){"use strict";var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=r.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],(function(){return r})):window.classNames=r}()},67045:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,r,n;try{t=Map}catch(e){t=function(){}}try{r=Set}catch(e){r=function(){}}try{n=Promise}catch(e){n=function(){}}function o(i,l,u,s,c){"object"==typeof l&&(u=l.depth,s=l.prototype,c=l.includeNonEnumerable,l=l.circular);var f=[],d=[],p="undefined"!=typeof Buffer;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function i(u,h){if(null===u)return null;if(0===h)return u;var m,v;if("object"!=typeof u)return u;if(e(u,t))m=new t;else if(e(u,r))m=new r;else if(e(u,n))m=new n((function(e,t){u.then((function(t){e(i(t,h-1))}),(function(e){t(i(e,h-1))}))}));else if(o.__isArray(u))m=[];else if(o.__isRegExp(u))m=new RegExp(u.source,a(u)),u.lastIndex&&(m.lastIndex=u.lastIndex);else if(o.__isDate(u))m=new Date(u.getTime());else{if(p&&Buffer.isBuffer(u))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(m),m;e(u,Error)?m=Object.create(u):void 0===s?(v=Object.getPrototypeOf(u),m=Object.create(v)):(m=Object.create(s),v=s)}if(l){var g=f.indexOf(u);if(-1!=g)return d[g];f.push(u),d.push(m)}for(var y in e(u,t)&&u.forEach((function(e,t){var r=i(t,h-1),n=i(e,h-1);m.set(r,n)})),e(u,r)&&u.forEach((function(e){var t=i(e,h-1);m.add(t)})),u){var b;v&&(b=Object.getOwnPropertyDescriptor(v,y)),b&&null==b.set||(m[y]=i(u[y],h-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(y=0;y<w.length;y++){var _=w[y];(!(S=Object.getOwnPropertyDescriptor(u,_))||S.enumerable||c)&&(m[_]=i(u[_],h-1),S.enumerable||Object.defineProperty(m,_,{enumerable:!1}))}}if(c){var x=Object.getOwnPropertyNames(u);for(y=0;y<x.length;y++){var S,k=x[y];(S=Object.getOwnPropertyDescriptor(u,k))&&S.enumerable||(m[k]=i(u[k],h-1),Object.defineProperty(m,k,{enumerable:!1}))}}return m}(i,u)}function i(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return o.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},o.__objToStr=i,o.__isDate=function(e){return"object"==typeof e&&"[object Date]"===i(e)},o.__isArray=function(e){return"object"==typeof e&&"[object Array]"===i(e)},o.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===i(e)},o.__getRegExpFlags=a,o}();e.exports&&(e.exports=t)},71443:(e,t,r)=>{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=n(e[t]))&&(o&&(o+=" "),o+=r);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(t=n(e))&&(o&&(o+=" "),o+=t);return o}r.r(t),r.d(t,{clsx:()=>o,default:()=>i});const i=o},36283:(e,t,r)=>{r(3458).defineExtension("colorpicker",(function(){var e,t,r,n,o,i,a,l,u,s,c,f,d,p,h,m,v,g,y,b,w,_,x,S,k,O,E,C,j,P,L,M,A,T,I,R,N,D,z,F={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},format:function(e,t){if("hex"==t){var r=e.r.toString(16);e.r<16&&(r="0"+r);var n=e.g.toString(16);e.g<16&&(n="0"+n);var o=e.b.toString(16);return e.b<16&&(o="0"+o),"#"+[r,n,o].join("")}return"rgb"==t?void 0===e.a?"rgb("+[e.r,e.g,e.b].join(",")+")":"rgba("+[e.r,e.g,e.b,e.a].join(",")+")":"hsl"==t?void 0===e.a?"hsl("+[e.h,e.s+"%",e.l+"%"].join(",")+")":"hsla("+[e.h,e.s+"%",e.l+"%",e.a].join(",")+")":e},parse:function(e){if("string"==typeof e){if(e.indexOf("rgb(")>-1){for(var t=0,r=(i=e.replace("rgb(","").replace(")","").split(",")).length;t<r;t++)i[t]=parseInt(F.trim(i[t]),10);return{type:"rgb",r:i[0],g:i[1],b:i[2],a:1}}if(e.indexOf("rgba(")>-1){for(t=0,r=(i=e.replace("rgba(","").replace(")","").split(",")).length;t<r;t++)i[t]=r-1==t?parseFloat(F.trim(i[t])):parseInt(F.trim(i[t]),10);return{type:"rgb",r:i[0],g:i[1],b:i[2],a:i[3]}}if(e.indexOf("hsl(")>-1){for(t=0,r=(i=e.replace("hsl(","").replace(")","").split(",")).length;t<r;t++)i[t]=parseInt(F.trim(i[t]),10);var n={type:"hsl",h:i[0],s:i[1],l:i[2],a:1},o=F.HSLtoRGB(n.h,n.s,n.l);return n.r=o.r,n.g=o.g,n.b=o.b,n}if(e.indexOf("hsla(")>-1){for(t=0,r=(i=e.replace("hsla(","").replace(")","").split(",")).length;t<r;t++)i[t]=r-1==t?parseFloat(F.trim(i[t])):parseInt(F.trim(i[t]),10);return n={type:"hsl",h:i[0],s:i[1],l:i[2],a:i[3]},o=F.HSLtoRGB(n.h,n.s,n.l),n.r=o.r,n.g=o.g,n.b=o.b,n}if(0==e.indexOf("#")){var i=[];if(3==(e=e.replace("#","")).length)for(t=0,r=e.length;t<r;t++){var a=e.substr(t,1);i.push(parseInt(a+a,16))}else for(t=0,r=e.length;t<r;t+=2)i.push(parseInt(e.substr(t,2),16));return{type:"hex",r:i[0],g:i[1],b:i[2],a:1}}}return e},HSVtoRGB:function(e,t,r){360==e&&(e=0);var n=t*r,o=n*(1-Math.abs(e/60%2-1)),i=r-n,a=[];return 0<=e&&e<60?a=[n,o,0]:60<=e&&e<120?a=[o,n,0]:120<=e&&e<180?a=[0,n,o]:180<=e&&e<240?a=[0,o,n]:240<=e&&e<300?a=[o,0,n]:300<=e&&e<360&&(a=[n,0,o]),{r:Math.ceil(255*(a[0]+i)),g:Math.ceil(255*(a[1]+i)),b:Math.ceil(255*(a[2]+i))}},RGBtoHSV:function(e,t,r){var n=e/255,o=t/255,i=r/255,a=Math.max(n,o,i),l=a-Math.min(n,o,i),u=0;return 0==l?u=0:a==n?u=(o-i)/l%6*60:a==o?u=60*((i-n)/l+2):a==i&&(u=60*((n-o)/l+4)),u<0&&(u=360+u),{h:u,s:0==a?0:l/a,v:a}},RGBtoHSL:function(e,t,r){e/=255,t/=255,r/=255;var n,o,i=Math.max(e,t,r),a=Math.min(e,t,r),l=(i+a)/2;if(i==a)n=o=0;else{var u=i-a;switch(o=l>.5?u/(2-i-a):u/(i+a),i){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:Math.round(360*n),s:Math.round(100*o),l:Math.round(100*l)}},HUEtoRGB:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},HSLtoRGB:function(e,t,r){var n,o,i;if(e/=360,r/=100,0==(t/=100))n=o=i=r;else{var a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;n=this.HUEtoRGB(l,a,e+1/3),o=this.HUEtoRGB(l,a,e),i=this.HUEtoRGB(l,a,e-1/3)}return{r:255*n,g:255*o,b:255*i}}},B=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],H=(ce(),function(){}),U=0,W={},V=!1,q=2e3,G={},Y=[{name:"Material",edit:!0,colors:["#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f"]},{name:"Custom",edit:!0,colors:[]},{name:"Pages",edit:!0,colors:["#fff","#f00","#0ff","#f0f"]}];function K(e,t,r){if("string"!=typeof e)this.el=e;else{var n=document.createElement(e);for(var o in this.uniqId=U++,n.className=t,r=r||{})n.setAttribute(o,r[o]);this.el=n}}function $(e,t,r){L.val(e),M.val(t),A.val(r),T.val(O)}function Q(e,t,r){I.val(e),R.val(t+"%"),N.val(r+"%"),D.val(O)}function Z(){return F.format({r:L.int(),g:M.int(),b:A.int()},"hex")}function X(){return F.HSVtoRGB(E,C,j)}function J(){return F.format(X(),"hex")}function ee(){var e=F.HSVtoRGB(E,C,j);return F.RGBtoHSL(e.r,e.g,e.b)}function te(e){if("rgb"==(e=e||"hex"))return(r=X()).a=1==O?void 0:O,F.format(r,"rgb");if("hsl"==e){var t=ee();return t.a=1==O?void 0:O,F.format(t,"hsl")}var r=X();return F.format(r,"hex")}function re(e){c.css("background-color",e)}function ne(){var e=g.data("format")||"hex",t=null;if("hex"==e)P.val(J());else if("rgb"==e)$((t=X()).r,t.g,t.b);else if("hsl"==e){var r=ee();Q(r.h,r.s,r.l)}re(te("rgb")),t=X(),fe(F.format(t,"rgb")),"function"==typeof H&&(isNaN(O)||H(te(e)))}function oe(e){e.preventDefault();var r=t.position(),o=n.width(),i=n.height(),l=e.clientX-r.left,u=e.clientY-r.top;l<0?l=0:l>o&&(l=o),u<0?u=0:u>i&&(u=i),a.css({left:l-5+"px",top:u-5+"px"}),a.data("pos",{x:l,y:u}),he(),ne()}function ie(e,t,r){var n={r:parseInt(e.r+(t.r-e.r)*r,10),g:parseInt(e.g+(t.g-e.g)*r,10),b:parseInt(e.b+(t.b-e.b)*r,10)};return F.format(n,"hex")}function ae(e){for(var t,r,n=0;n<B.length;n++)if(B[n].start>=e){t=B[n-1],r=B[n];break}return t&&r?ie(t,r,(e-t.start)/(r.start-t.start)):B[0].rgb}function le(e){n.css("background-color",e)}function ue(e){E=e}function se(e){var t,r=f.offset().left,n=r+f.width(),o=e?me(e).clientX:r+E/360*(n-r);t=o<r?0:o>n?100:(o-r)/(n-r)*100;var i=f.width()*(t/100);l.css({left:i-Math.ceil(l.width()/2)+"px"}),l.data("pos",{x:i}),le(ae(t/100)),ue(t/100*360),ne()}function ce(){for(var e="",t=["","-o-","-ms-","-moz-","-webkit-"],r=document.createElement("div"),n=0;n<t.length;n++)r.style.background=t[n]+"linear-gradient(#000000, #ffffff)",r.style.background&&(e=t[n]);return r=null,delete r,e}function fe(e){var t=F.parse(e);t.a=0;var r=F.format(t,"rgb");t.a=1;var n=F.format(t,"rgb");h.css("background","linear-gradient(to right, "+r+", "+n+")")}function de(e){var t,r=p.offset().left,n=r+p.width(),o=me(e).clientX;t=o<r?0:o>n?100:(o-r)/(n-r)*100;var i=p.width()*(t/100);v.css({left:i-Math.ceil(v.width()/2)+"px"}),v.data("pos",{x:i}),pe(),Fe(),ne()}function pe(){var e=v.data("pos")||{x:0},t=Math.round(e.x/p.width()*100)/100;O=isNaN(t)?1:t}function he(){var e=a.data("pos")||{x:0,y:0},t=l.data("pos")||{x:0},r=n.width(),o=n.height(),i=t.x/f.width()*360,u=e.x/r,s=(o-e.y)/o;0==r&&(i=0,u=0,s=0),E=i,C=u,j=s}function me(e){return e.touches&&e.touches[0]?e.touches[0]:e}function ve(e){var t=e.which,r=!1;return 37!=t&&39!=t&&8!=t&&46!=t&&9!=t||(r=!0),!(!r&&(t<48||t>57))}function ge(e){var t=L.val(),r=M.val(),n=A.val();""!=t&&""!=r&&""!=n&&(parseInt(t)>255?L.val(255):L.val(parseInt(t)),parseInt(r)>255?M.val(255):M.val(parseInt(r)),parseInt(n)>255?A.val(255):A.val(parseInt(n)),_e(Z()))}function ye(){var e=n.width()*C,t=n.height()*(1-j);a.css({left:e-5+"px",top:t-5+"px"}),a.data("pos",{x:e,y:t});var r=f.width()*(E/360);l.css({left:r-7.5+"px"}),l.data("pos",{x:r});var o=p.width()*(O||0);v.css({left:o-7.5+"px"}),v.data("pos",{x:o})}function be(e,t,r,n){O=n,E=e,C=t,j=r}function we(e){g.data("format",e),Be()}function _e(e){var t=e||"#FF0000",r=F.parse(t);we(r.type),le(t);var n=F.RGBtoHSV(r.r,r.g,r.b);be(n.h,n.s,n.v,r.a),ye(),se(),ne()}function xe(e,t,r){e.addEventListener(t,r)}function Se(e,t,r){e.removeEventListener(t,r)}function ke(e){n.data("isDown",!0),oe(e)}function Oe(e){n.data("isDown",!1)}function Ee(e){e.preventDefault(),r.data("isDown",!0)}function Ce(e){e.preventDefault(),d.data("isDown",!0)}function je(e){r.data("isDown",!0),se(e)}function Pe(e){d.data("isDown",!0),de(e)}function Le(e){if(e.which<65||e.which>70)return ve(e)}function Me(e){var t=P.val();"#"==t.charAt(0)&&7==t.length&&_e(t)}function Ae(e){He()}function Te(){xe(n.el,"mousedown",ke),xe(n.el,"mouseup",Oe),xe(l.el,"mousedown",Ee),xe(v.el,"mousedown",Ce),xe(f.el,"mousedown",je),xe(p.el,"mousedown",Pe),xe(P.el,"keydown",Le),xe(P.el,"keyup",Me),xe(L.el,"keydown",ve),xe(L.el,"keyup",ge),xe(M.el,"keydown",ve),xe(M.el,"keyup",ge),xe(A.el,"keydown",ve),xe(A.el,"keyup",ge),xe(document,"mouseup",Ne),xe(document,"mousemove",De),xe(m.el,"click",Ae)}function Ie(e){var t=new K(e).closest("codemirror-colorview"),r=new K(e).closest("codemirror-colorpicker"),n=new K(e).closest("CodeMirror");return e.nodeName,!!(r||t||n)}function Re(e){return"HTML"==e.nodeName}function Ne(e){n.data("isDown",!1),r.data("isDown",!1),d.data("isDown",!1),Re(e.target)||0==Ie(e.target)&&Xe()}function De(e){n.data("isDown")&&oe(e),r.data("isDown")&&se(e),d.data("isDown")&&de(e)}function ze(){Se(n.el,"mousedown",ke),Se(n.el,"mouseup",Oe),Se(l.el,"mousedown",Ee),Se(v.el,"mousedown",Ce),Se(f.el,"mousedown",je),Se(p.el,"mousedown",Pe),Se(P.el,"keydown",Le),Se(P.el,"keyup",Me),Se(L.el,"keydown",ve),Se(L.el,"keyup",ge),Se(M.el,"keydown",ve),Se(M.el,"keyup",ge),Se(A.el,"keydown",ve),Se(A.el,"keyup",ge),Se(document,"mouseup",Ne),Se(document,"mousemove",De),Se(m.el,"click",Ae),H=void 0}function Fe(){var e=g.data("format")||"hex";if(O<1&&"hex"==e){var t="rgb";g.removeClass(e),g.addClass(t),g.data("format",t),ne()}}function Be(){var e=g.data("format")||"hex";g.removeClass("hex"),g.removeClass("rgb"),g.removeClass("hsl"),g.addClass(e)}function He(){var e=g.data("format")||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t=1==O?"hex":"rgb"),g.removeClass(e),g.addClass(t),g.data("format",t),ne()}function Ue(e){var t=new K("div","information-item "+e);if("hex"==e){var r=new K("div","input-field hex");P=new K("input","input",{type:"text"}),r.append(P),r.append(new K("div","title").html("HEX")),t.append(r)}else"rgb"==e?(r=new K("div","input-field rgb-r"),L=new K("input","input",{type:"text"}),r.append(L),r.append(new K("div","title").html("R")),t.append(r),r=new K("div","input-field rgb-g"),M=new K("input","input",{type:"text"}),r.append(M),r.append(new K("div","title").html("G")),t.append(r),r=new K("div","input-field rgb-b"),A=new K("input","input",{type:"text"}),r.append(A),r.append(new K("div","title").html("B")),t.append(r),r=new K("div","input-field rgb-a"),T=new K("input","input",{type:"text"}),r.append(T),r.append(new K("div","title").html("A")),t.append(r)):"hsl"==e&&(r=new K("div","input-field hsl-h"),I=new K("input","input",{type:"text"}),r.append(I),r.append(new K("div","title").html("H")),t.append(r),r=new K("div","input-field hsl-s"),R=new K("input","input",{type:"text"}),r.append(R),r.append(new K("div","title").html("S")),t.append(r),r=new K("div","input-field hsl-l"),N=new K("input","input",{type:"text"}),r.append(N),r.append(new K("div","title").html("L")),t.append(r),r=new K("div","input-field hsl-a"),D=new K("input","input",{type:"text"}),r.append(D),r.append(new K("div","title").html("A")),t.append(r));return t}function We(e){G=e?Y.filter((function(t){return t.name==e}))[0]:Y[0]}function Ve(){for(var e=new K("div","current-color-sets"),t=0,r=G.colors.length;t<r;t++){var n=G.colors[t],o=new K("div","color-item",{"data-color":n}),i=new K("div","color-view");i.css({"background-color":n}),o.append(i),e.append(o)}return G.edit&&(o=new K("div","add-color-item").html("+"),e.append(o)),e}function qe(){We(),e=new K(document.body),t=new K("div","codemirror-colorpicker"),n=new K("div","color"),a=new K("div","drag-pointer"),o=new K("div","value"),i=new K("div","saturation"),u=new K("div","control"),s=new K("div","empty"),c=new K("div","color"),r=new K("div","hue"),f=new K("div","hue-container"),l=new K("div","drag-bar"),d=new K("div","opacity"),p=new K("div","opacity-container"),h=new K("div","color-bar"),v=new K("div","drag-bar2"),g=new K("div","information hex"),y=new K("div","information-change"),m=new K("button","format-change-button",{type:"button"}).html("\u2194"),y.append(m),g.append(Ue("hex")),g.append(Ue("rgb")),g.append(Ue("hsl")),g.append(y),o.append(a),i.append(o),n.append(i),f.append(l),r.append(f),p.append(h),p.append(v),d.append(p),u.append(r),u.append(d),u.append(s),u.append(c),b=new K("div","colorsets"),w=new K("div","menu"),_=new K("div","color-list"),b.append(w),b.append(_),k=new K("button","color-sets-choose-btn").html("+"),w.append(k),_.append(Ve()),x=new K("div","color-chooser"),S=new K("div","colorsets-list"),x.append(S),t.append(n),t.append(u),t.append(g),t.append(b),t.append(x),Ge(),_e()}function Ge(){for(var e=0,t=B.length;e<t;e++){var r=B[e],n=F.parse(r.rgb);r.r=n.r,r.g=n.g,r.b=n.b}}function Ye(e){if("object"==typeof e){if(!e.r||!e.g||!e.b)return;_e(F.format(e,"hex"))}else if("string"==typeof e){if("#"!=e.charAt(0))return;_e(e)}}function Ke(e){he();var t=X();return e?F.format(t,e):t}function $e(r){var n=t.width(),o=t.height(),i=r.left-e.el.scrollLeft;n+i>window.innerWidth&&(i-=n+i-window.innerWidth),i<0&&(i=0);var a=r.top-e.el.scrollTop;o+a>window.innerHeight&&(a-=o+a-window.innerHeight),a<0&&(a=0),t.css({left:i+"px",top:a+"px"})}function Qe(e,r,n){ze(),Te(),t.appendTo(document.body),t.css({position:"fixed",left:"-10000px",top:"-10000px"}),t.show(),$e(e),V=e.isShortCut||!1,_e(r),H=function(e){n(e)},(q=e.hideDelay||2e3)>0&&Ze(q)}function Ze(e){e=e||0,Se(t.el,"mouseenter"),Se(t.el,"mouseleave"),xe(t.el,"mouseenter",(function(){clearTimeout(z)})),xe(t.el,"mouseleave",(function(){clearTimeout(z),z=setTimeout(Xe,e)})),clearTimeout(z),z=setTimeout(Xe,e)}function Xe(){}return K.prototype.closest=function(e){for(var t=this,r=!1;!(r=t.hasClass(e));){if(!t.el.parentNode)return null;t=new K(t.el.parentNode)}return r?t:null},K.prototype.removeClass=function(e){this.el.className=F.trim((" "+this.el.className+" ").replace(" "+e+" "," "))},K.prototype.hasClass=function(e){return!!this.el.className&&(" "+this.el.className+" ").indexOf(" "+e+" ")>-1},K.prototype.addClass=function(e){this.hasClass(e)||(this.el.className=this.el.className+" "+e)},K.prototype.html=function(e){return this.el.innerHTML=e,this},K.prototype.empty=function(){return this.html("")},K.prototype.append=function(e){return"string"==typeof e?this.el.appendChild(document.createTextNode(e)):this.el.appendChild(e.el||e),this},K.prototype.appendTo=function(e){return(e.el?e.el:e).appendChild(this.el),this},K.prototype.remove=function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this},K.prototype.text=function(){return this.el.textContent},K.prototype.css=function(e,t){if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var r=e||{};for(var n in r)this.el.style[n]=r[n]}return this},K.prototype.offset=function(){var e=this.el.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},K.prototype.position=function(){return{top:parseFloat(this.el.style.top),left:parseFloat(this.el.style.left)}},K.prototype.width=function(){return this.el.offsetWidth},K.prototype.height=function(){return this.el.offsetHeight},K.prototype.dataKey=function(e){return this.uniqId+"."+e},K.prototype.data=function(e,t){if(2!=arguments.length){if(1==arguments.length)return W[this.dataKey(e)];var r=Object.keys(W),n=this.uniqId+".";return r.filter((function(e){return 0==e.indexOf(n)})).map((function(e){return W[e]}))}return W[this.dataKey(e)]=t,this},K.prototype.val=function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)},K.prototype.int=function(){return parseInt(this.val(),10)},K.prototype.show=function(){return this.css("display","block")},K.prototype.hide=function(){return this.css("display","none")},qe(),{isShortCut:function(){return V},$root:t,show:Qe,hide:Xe,setColor:Ye,getColor:Ke}}))},41347:(e,t,r)=>{!function(e){"use strict";var t={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},r="codemirror-colorview",n="codemirror-colorview-background",o=["comment","builtin"];function i(e,t){"setValue"==t.origin?(e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function a(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function l(e,t){i(e,{origin:"setValue"})}function u(e,t){e.state.colorpicker.keyup(t)}function s(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function c(e,t){i(e,{origin:"setValue"})}function f(e){e.state.colorpicker.close_color_picker()}function d(e,t){var r=void 0;return function(n,o){r&&clearTimeout(r),r=setTimeout((function(){e(n,o)}),t||300)}}function p(e,t){return!(!e||!e.className)&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function h(e,t){t="boolean"==typeof t?{mode:"view"}:Object.assign({mode:"view"},t||{}),this.opt=t,this.cm=e,this.markers={},o=this.opt.excluded_token||o,this.cm.colorpicker?this.colorpicker=this.cm.colorpicker():this.opt.colorpicker&&(this.colorpicker=this.opt.colorpicker),this.init_event()}e.defineOption("colorpicker",!1,(function(t,r,n){n&&n!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),r&&(t.state.colorpicker=new h(t,r))})),h.prototype.init_event=function(){var e,t;this.cm.on("mousedown",s),this.cm.on("keyup",u),this.cm.on("change",i),this.cm.on("update",a),this.cm.on("refresh",l),this.onPasteCallback=(e=this.cm,t=c,function(r){t.call(this,e,r)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",d(f,50))},h.prototype.is_edit_mode=function(){return"edit"==this.opt.mode},h.prototype.is_view_mode=function(){return"view"==this.opt.mode},h.prototype.destroy=function(){this.cm.off("mousedown",s),this.cm.off("keyup",u),this.cm.off("change",i),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll")},h.prototype.hasClass=function(e,t){return!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},h.prototype.check_mousedown=function(e){this.hasClass(e.target,n)?this.open_color_picker(e.target.parentNode):this.close_color_picker()},h.prototype.popup_color_picker=function(e){var t=this.cm.getCursor(),r=this,n={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){if(("#"+e).indexOf("#"+n.lineNo+":")>-1){var t=r.markers[e];t.ch<=n.ch&&n.ch<=t.ch+t.color.length&&(n.ch=t.ch,n.color=t.color,n.nameColor=t.nameColor)}})),this.open_color_picker(n)},h.prototype.open_color_picker=function(e){var t=e.lineNo,r=e.ch,n=e.nameColor,o=e.color;if(this.colorpicker){var i=this,a=o,l=this.cm.charCoords({line:t,ch:r});this.colorpicker.show({left:l.left,top:l.bottom,isShortCut:e.isShortCut||!1,hideDelay:i.opt.hideDelay||2e3},n||o,(function(e){i.cm.replaceRange(e,{line:t,ch:r},{line:t,ch:r+a.length},"*colorpicker"),a=e}))}},h.prototype.close_color_picker=function(e){this.colorpicker&&this.colorpicker.hide()},h.prototype.key=function(e,t){return[e,t].join(":")},h.prototype.keyup=function(e){this.colorpicker&&("Escape"==e.key||0==this.colorpicker.isShortCut())&&this.colorpicker.hide()},h.prototype.init_color_update=function(){this.markers={}},h.prototype.style_color_update=function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),r=0;r<t;r++)this.match(r)},h.prototype.empty_marker=function(e,t){for(var n=t.markedSpans||[],o=0,i=n.length;o<i;o++){var a=this.key(e,n[o].from);a&&p(n[o].marker.replacedWith,r)&&(delete this.markers[a],n[o].marker.clear())}},h.prototype.color_regexp=/(#(?:[\da-f]{3}){1,2}|rgb\((?:\s*\d{1,3},\s*){2}\d{1,3}\s*\)|rgba\((?:\s*\d{1,3},\s*){3}\d*\.?\d+\s*\)|hsl\(\s*\d{1,3}(?:,\s*\d{1,3}%){2}\s*\)|hsla\(\s*\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\s*\)|([\w_\-]+))/gi,h.prototype.match_result=function(e){return e.text.match(this.color_regexp)},h.prototype.submatch=function(e,r){this.empty_marker(e,r);var n=this.match_result(r);if(n&&n.length)for(var o={next:0},i=0,a=n.length;i<a;i++)if(n[i].indexOf("#")>-1||n[i].indexOf("rgb")>-1||n[i].indexOf("hsl")>-1)this.render(o,e,r,n[i]);else{var l=t[n[i]];l&&this.render(o,e,r,n[i],l)}},h.prototype.match=function(e){var t=this.cm.getLineHandle(e),r=this;this.cm.operation((function(){r.submatch(e,t)}))},h.prototype.make_element=function(){var e=document.createElement("div");return e.className=r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e},h.prototype.make_background_element=function(){var e=document.createElement("div");return e.className=n,e},h.prototype.set_state=function(e,t,r,n){var o=this.create_marker(e,t);return o.lineNo=e,o.ch=t,o.color=r,o.nameColor=n,o},h.prototype.create_marker=function(e,t){var r=this.key(e,t);return this.markers[r]||(this.markers[r]=this.make_element()),this.markers[r]},h.prototype.has_marker=function(e,t){var r=this.key(e,t);return!!this.markers[r]},h.prototype.update_element=function(e,t){e.back_element.style.backgroundColor=t},h.prototype.set_mark=function(e,t,r){this.cm.setBookmark({line:e,ch:t},{widget:r,handleMouseEvents:!0})},h.prototype.is_excluded_token=function(e,t){var r=this.cm.getTokenAt({line:e,ch:t},!0),n=r.type,i=r.state.state;if(null==n&&"block"==i)return!0;if(null==n&&"top"==i)return!0;for(var a=0,l=0,u=o.length;l<u;l++)if(n===o[l]){a++;break}return a>0},h.prototype.render=function(e,t,r,n,o){var i=r.text.indexOf(n,e.next);if(!0!==this.is_excluded_token(t,i)){if(e.next=i+n.length,this.has_marker(t,i))return this.update_element(this.create_marker(t,i),o||n),void this.set_state(t,i,n,o);var a=this.create_marker(t,i);this.update_element(a,o||n),this.set_state(t,i,n,o||n),this.set_mark(t,i,a)}}}(r(3458))},31528:(e,t,r)=>{!function(e){function t(t,r,n){var o,i=t.getWrapperElement();return(o=i.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof r?o.innerHTML=r:o.appendChild(r),e.addClass(i,"dialog-opened"),o}function r(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(n,o,i){i||(i={}),r(this,null);var a=t(this,n,i.bottom),l=!1,u=this;function s(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus(),i.onClose&&i.onClose(a)}}var c,f=a.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",(function(e){i.onInput(e,f.value,s)})),i.onKeyUp&&e.on(f,"keyup",(function(e){i.onKeyUp(e,f.value,s)})),e.on(f,"keydown",(function(t){i&&i.onKeyDown&&i.onKeyDown(t,f.value,s)||((27==t.keyCode||!1!==i.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),s()),13==t.keyCode&&o(f.value,t))})),!1!==i.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&s()}))):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){s(),u.focus()})),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s})),e.defineExtension("openConfirm",(function(n,o,i){r(this,null);var a=t(this,n,i&&i.bottom),l=a.getElementsByTagName("button"),u=!1,s=this,c=1;function f(){u||(u=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),s.focus())}l[0].focus();for(var d=0;d<l.length;++d){var p=l[d];!function(t){e.on(p,"click",(function(r){e.e_preventDefault(r),f(),t&&t(s)}))}(o[d]),e.on(p,"blur",(function(){--c,setTimeout((function(){c<=0&&f()}),200)})),e.on(p,"focus",(function(){++c}))}})),e.defineExtension("openNotification",(function(n,o){r(this,s);var i,a=t(this,n,o&&o.bottom),l=!1,u=o&&void 0!==o.duration?o.duration:5e3;function s(){l||(l=!0,clearTimeout(i),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(t){e.e_preventDefault(t),s()})),u&&(i=setTimeout(s,u)),s}))}(r(3458))},1691:(e,t,r)=>{!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){setTimeout((function(){var n=!1;if(1==e.lineCount()){var o=e.getInputField();n="TEXTAREA"==o.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)}n?r(e):t(e)}),20)}function o(e){a(e)&&r(e)}function i(e){var n=e.getWrapperElement(),o=a(e);n.className=n.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?r(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(r,a,l){var u=l&&l!=e.Init;if(a&&!u)r.on("blur",o),r.on("change",i),r.on("swapDoc",i),e.on(r.getInputField(),"compositionupdate",r.state.placeholderCompose=function(){n(r)}),i(r);else if(!a&&u){r.off("blur",o),r.off("change",i),r.off("swapDoc",i),e.off(r.getInputField(),"compositionupdate",r.state.placeholderCompose),t(r);var s=r.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}a&&!r.hasFocus()&&o(r)}))}(r(3458))},61413:(e,t,r)=>{!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,(function(t,r,a){a&&a!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),r&&(i(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(o))}));var o={Backspace:u,Enter:s};function i(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";o[n]||(o[n]=a(r))}}function a(e){return function(t){return d(t,e)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function u(t){var o=l(t);if(!o||t.getOption("disableInput"))return e.Pass;for(var i=n(o,"pairs"),a=t.listSelections(),u=0;u<a.length;u++){if(!a[u].empty())return e.Pass;var s=p(t,a[u].head);if(!s||i.indexOf(s)%2!=0)return e.Pass}for(u=a.length-1;u>=0;u--){var c=a[u].head;t.replaceRange("",r(c.line,c.ch-1),r(c.line,c.ch+1),"+delete")}}function s(t){var r=l(t),o=r&&n(r,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),a=0;a<i.length;a++){if(!i[a].empty())return e.Pass;var u=p(t,i[a].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),c(t,-1),i=t.listSelections();for(var r=0;r<i.length;r++){var n=i[r].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}}))}function c(e,t){for(var r=[],n=e.listSelections(),o=0,i=0;i<n.length;i++){var a=n[i];a.head==e.getCursor()&&(o=i);var l=a.head.ch||t>0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};r.push({anchor:l,head:l})}e.setSelections(r,o)}function f(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new r(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new r(t.head.line,t.head.ch+(n?1:-1))}}function d(t,o){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;var a=n(i,"pairs"),u=a.indexOf(o);if(-1==u)return e.Pass;for(var s,d=n(i,"closeBefore"),p=n(i,"triples"),m=a.charAt(u+1)==o,v=t.listSelections(),g=u%2==0,y=0;y<v.length;y++){var b,w=v[y],_=w.head,x=t.getRange(_,r(_.line,_.ch+1));if(g&&!w.empty())b="surround";else if(!m&&g||x!=o)if(m&&_.ch>1&&p.indexOf(o)>=0&&t.getRange(r(_.line,_.ch-2),_)==o+o){if(_.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(_.line,_.ch-2))))return e.Pass;b="addFour"}else if(m){var S=0==_.ch?" ":t.getRange(r(_.line,_.ch-1),_);if(e.isWordChar(x)||S==o||e.isWordChar(S))return e.Pass;b="both"}else{if(!g||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;b="both"}else b=m&&h(t,_)?"both":p.indexOf(o)>=0&&t.getRange(_,r(_.line,_.ch+3))==o+o+o?"skipThree":"skip";if(s){if(s!=b)return e.Pass}else s=b}var k=u%2?a.charAt(u-1):o,O=u%2?o:a.charAt(u+1);t.operation((function(){if("skip"==s)c(t,1);else if("skipThree"==s)c(t,3);else if("surround"==s){for(var e=t.getSelections(),r=0;r<e.length;r++)e[r]=k+e[r]+O;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),r=0;r<e.length;r++)e[r]=f(e[r]);t.setSelections(e)}else"both"==s?(t.replaceSelection(k+O,null),t.triggerElectric(k+O),c(t,-1)):"addFour"==s&&(t.replaceSelection(k+k+k+k,"before"),c(t,1))}))}function p(e,t){var n=e.getRange(r(t.line,t.ch-1),r(t.line,t.ch+1));return 2==n.length?n:null}function h(e,t){var n=e.getTokenAt(r(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(t.pairs+"`")}(r(3458))},87437:(e,t,r)=>{!function(e){e.defineOption("autoCloseTags",!1,(function(t,r,o){if(o!=e.Init&&o&&t.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};"object"==typeof r&&!1===r.whenClosing||(a["'/'"]=function(e){return i(e)}),"object"==typeof r&&!1===r.whenOpening||(a["'>'"]=function(e){return n(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function n(n){if(n.getOption("disableInput"))return e.Pass;for(var o=n.listSelections(),i=[],u=n.getOption("autoCloseTags"),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var c=o[s].head,f=n.getTokenAt(c),d=e.innerMode(n.getMode(),f.state),p=d.state,h=d.mode.xmlCurrentTag&&d.mode.xmlCurrentTag(p),m=h&&h.name;if(!m)return e.Pass;var v="html"==d.mode.configuration,g="object"==typeof u&&u.dontCloseTags||v&&t,y="object"==typeof u&&u.indentTags||v&&r;f.end>c.ch&&(m=m.slice(0,m.length-f.end+c.ch));var b=m.toLowerCase();if(!m||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&h.close||f.string.indexOf("/")==c.ch-f.start-1||g&&a(g,b)>-1||l(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p)||[],m,c,!0))return e.Pass;var w="object"==typeof u&&u.emptyTags;if(w&&a(w,m)>-1)i[s]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var _=y&&a(y,b)>-1;i[s]={indent:_,text:">"+(_?"\n\n":"")+"</"+m+">",newPos:_?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var x="object"==typeof u&&u.dontIndentOnAutoClose;for(s=o.length-1;s>=0;s--){var S=i[s];n.replaceRange(S.text,o[s].head,o[s].anchor,"+insert");var k=n.listSelections().slice(0);k[s]={head:S.newPos,anchor:S.newPos},n.setSelections(k),!x&&S.indent&&(n.indentLine(S.newPos.line,null,!0),n.indentLine(S.newPos.line+1,null,!0))}}function o(t,r){for(var n=t.listSelections(),o=[],i=r?"/":"</",a=t.getOption("autoCloseTags"),u="object"==typeof a&&a.dontIndentOnSlash,s=0;s<n.length;s++){if(!n[s].empty())return e.Pass;var c=n[s].head,f=t.getTokenAt(c),d=e.innerMode(t.getMode(),f.state),p=d.state;if(r&&("string"==f.type||"<"!=f.string.charAt(0)||f.start!=c.ch-1))return e.Pass;var h,m="xml"!=d.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==d.mode.name)h=i+"script";else if(m&&"css"==d.mode.name)h=i+"style";else{var v=d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p),g=v.length?v[v.length-1]:"";if(!v||v.length&&l(t,v,g,c))return e.Pass;h=i+g}">"!=t.getLine(c.line).charAt(f.end)&&(h+=">"),o[s]=h}if(t.replaceSelections(o),n=t.listSelections(),!u)for(s=0;s<n.length;s++)(s==n.length-1||n[s].head.line<n[s+1].head.line)&&t.indentLine(n[s].head.line)}function i(t){return t.getOption("disableInput")?e.Pass:o(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function l(t,r,n,o,i){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,o.line+500),l=e.scanForClosingTag(t,o,null,a);if(!l||l.tag!=n)return!1;for(var u=i?1:0,s=r.length-1;s>=0&&r[s]==n;s--)++u;for(o=l.to,s=1;s<u;s++){var c=e.scanForClosingTag(t,o,null,a);if(!c||c.tag!=n)return!1;o=c.to}return!0}e.commands.closeTag=function(e){return o(e)}}(r(3458),r(72895))},69805:(e,t,r)=>{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),r=e.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function i(e,t,i){var l=e.getLineHandle(t.line),u=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=o(i),f=!s&&u>=0&&c.test(l.text.charAt(u))&&n[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&n[l.text.charAt(++u)];if(!f)return null;var d=">"==f.charAt(1)?1:-1;if(i&&i.strict&&d>0!=(u==t.ch))return null;var p=e.getTokenTypeAt(r(t.line,u+1)),h=a(e,r(t.line,u+(d>0?1:0)),d,p,i);return null==h?null:{from:r(t.line,u),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:d>0}}function a(e,t,i,a,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],f=o(l),d=i>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),p=t.line;p!=d;p+=i){var h=e.getLine(p);if(h){var m=i>0?0:h.length-1,v=i>0?h.length:-1;if(!(h.length>u))for(p==t.line&&(m=t.ch-(i<0?1:0));m!=v;m+=i){var g=h.charAt(m);if(f.test(g)&&(void 0===a||(e.getTokenTypeAt(r(p,m+1))||"")==(a||""))){var y=n[g];if(y&&">"==y.charAt(1)==i>0)c.push(g);else{if(!c.length)return{pos:r(p,m),ch:g};c.pop()}}}}}return p-i!=(i>0?e.lastLine():e.firstLine())&&null}function l(e,n,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,l=o&&o.highlightNonMatching,u=[],s=e.listSelections(),c=0;c<s.length;c++){var f=s[c].empty()&&i(e,s[c].head,o);if(f&&(f.match||!1!==l)&&e.getLine(f.from.line).length<=a){var d=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";u.push(e.markText(f.from,r(f.from.line,f.from.ch+1),{className:d})),f.to&&e.getLine(f.to.line).length<=a&&u.push(e.markText(f.to,r(f.to.line,f.to.ch+1),{className:d}))}}if(u.length){t&&e.state.focused&&e.focus();var p=function(){e.operation((function(){for(var e=0;e<u.length;e++)u[e].clear()}))};if(!n)return p;setTimeout(p,800)}}function u(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=l(e,!1,e.state.matchBrackets)}))}function s(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,r,n){n&&n!=e.Init&&(t.off("cursorActivity",u),t.off("focus",u),t.off("blur",s),s(t)),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",u),t.on("focus",u),t.on("blur",s))})),e.defineExtension("matchBrackets",(function(){l(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,r){return(r||"boolean"==typeof t)&&(r?(r.strict=t,t=r):t=t?{strict:!0}:null),i(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,r,n){return a(this,e,t,r,n)}))}(r(3458))},35930:(e,t,r)=>{!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation((function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),o=r.getViewport();o.from=Math.min(o.from,n.line),o.to=Math.max(n.line+1,o.to);var i=e.findMatchingTag(r,n,o);if(i){if(r.state.matchBothTags){var a="open"==i.at?i.open:i.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==i.at?i.open:i.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}}))}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,(function(o,i,a){a&&a!=e.Init&&(o.off("cursorActivity",r),o.off("viewportChange",n),t(o)),i&&(o.state.matchBothTags="object"==typeof i&&i.bothTags,o.on("cursorActivity",r),o.on("viewportChange",n),r(o))})),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}}(r(3458),r(72895))},72895:(e,t,r)=>{!function(e){"use strict";var t=e.Pos;function r(e,t){return e.line-t.line||e.ch-t.ch}var n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function a(e,r){var n=e.cm.getTokenTypeAt(t(e.line,r));return n&&/\btag\b/.test(n)}function l(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function u(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(a(e,t+1)){o.lastIndex=t,e.ch=t;var r=o.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function f(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(l(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function p(e,r){for(var n=[];;){var o,i=f(e),a=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(o=s(e)))return;if("selfClose"!=o)if(i[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==i[2]){n.length=u;break}if(u<0&&(!r||r==i[2]))return{tag:i[2],from:t(a,l),to:t(e.line,e.ch)}}else n.push(i[2])}}function h(e,r){for(var n=[];;){var o=d(e);if(!o)return;if("selfClose"!=o){var i=e.line,a=e.ch,l=c(e);if(!l)return;if(l[1])n.push(l[2]);else{for(var u=n.length-1;u>=0;--u)if(n[u]==l[2]){n.length=u;break}if(u<0&&(!r||r==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(i,a)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,n){for(var o=new i(e,n.line,0);;){var a=f(o);if(!a||o.line!=n.line)return;var l=s(o);if(!l)return;if(!a[1]&&"selfClose"!=l){var u=t(o.line,o.ch),c=p(o,a[2]);return c&&r(c.from,u)>0?{from:u,to:c.from}:null}}})),e.findMatchingTag=function(e,n,o){var a=new i(e,n.line,n.ch,o);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var l=s(a),u=l&&t(a.line,a.ch),f=l&&c(a);if(l&&f&&!(r(a,n)>0)){var d={from:t(a.line,a.ch),to:u,tag:f[2]};return"selfClose"==l?{open:d,close:null,at:"open"}:f[1]?{open:h(a,f[2]),close:d,at:"close"}:{open:d,close:p(a=new i(e,u.line,u.ch,o),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var o=new i(e,t.line,t.ch,r);;){var a=h(o,n);if(!a)break;var l=p(new i(e,t.line,t.ch,r),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,t,r,n){return p(new i(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}(r(3458))},94491:(e,t,r)=>{!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var n=r.getCursor(),o=r.getTokenAt(n),i=e.innerMode(r.getMode(),o.state);if("css"==i.mode.name){if("keyword"==o.type&&0=="!important".indexOf(o.string))return{list:["!important"],from:e.Pos(n.line,o.start),to:e.Pos(n.line,o.end)};var a=o.start,l=n.ch,u=o.string.slice(0,l-a);/[^\w$_-]/.test(u)&&(u="",a=l=n.ch);var s=e.resolveMode("text/css"),c=[],f=i.state.state;return"pseudo"==f||"variable-3"==o.type?d(t):"block"==f||"maybeprop"==f?d(s.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(d(s.valueKeywords),d(s.colorKeywords)):"media"!=f&&"media_parens"!=f||(d(s.mediaTypes),d(s.mediaFeatures)),c.length?{list:c,from:e.Pos(n.line,a),to:e.Pos(n.line,l)}:void 0}function d(e){for(var t in e)u&&0!=t.lastIndexOf(u,0)||c.push(t)}}))}(r(3458),r(77530))},45812:(e,t,r)=>{!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),r=["_blank","_self","_top","_parent"],n=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],i=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],a=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],l={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:a,target:r,hreflang:t}},abbr:l,acronym:l,address:l,applet:l,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:a,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:l,aside:l,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:l,base:{attrs:{href:null,target:r}},basefont:l,bdi:l,bdo:l,big:l,blockquote:{attrs:{cite:null}},body:l,br:l,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:i,formmethod:o,formnovalidate:["","novalidate"],formtarget:r,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:l,center:l,cite:l,code:l,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:l,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:l,dir:l,div:l,dialog:{attrs:{open:null}},dl:l,dt:l,em:l,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:l,figure:l,font:l,footer:l,form:{attrs:{action:null,name:null,"accept-charset":n,autocomplete:["on","off"],enctype:i,method:o,novalidate:["","novalidate"],target:r}},frame:l,frameset:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:l,hgroup:l,hr:l,html:{attrs:{manifest:null},children:["head","body"]},i:l,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:i,formmethod:o,formnovalidate:["","novalidate"],formtarget:r,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:l,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:l,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:a,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:l,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:n,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:l,noframes:l,noscript:l,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:l,param:{attrs:{name:null,value:null}},pre:l,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:l,rt:l,ruby:l,s:l,samp:l,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:n}},section:l,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:l,source:{attrs:{src:null,type:null,media:null}},span:l,strike:l,strong:l,style:{attrs:{type:["text/css"],media:a,scoped:null}},sub:l,summary:l,sup:l,table:l,tbody:l,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:l,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:l,time:{attrs:{datetime:null}},title:l,tr:l,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:l,u:l,ul:l,var:l,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:l},s={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function c(e){for(var t in s)s.hasOwnProperty(t)&&(e.attrs[t]=s[t])}for(var f in c(l),u)u.hasOwnProperty(f)&&u[f]!=l&&c(u[f]);function d(t,r){var n={schemaInfo:u};if(r)for(var o in r)n[o]=r[o];return e.hint.xml(t,n)}e.htmlSchema=u,e.registerHelper("hint","html",d)}(r(3458),r(27321))},86728:(e,t,r)=>{!function(e){"use strict";var t="CodeMirror-hint",r="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var r=this;e.on("cursorActivity",this.activityFunc=function(){r.cursorActivity()})}}e.showHint=function(e,t,r){if(!t)return e.showHint(r);r&&r.async&&(t.async=!0);var n={hint:t};if(r)for(var o in r)n[o]=r[o];return e.showHint(n)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;o<r.length;o++)if(r[o].head.line!=r[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new n(this,t);i.options.hint&&(e.signal(this,"startCompletion",this),i.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var o=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},i=window.cancelAnimationFrame||clearTimeout;function a(e,t,r){var n=e.options.hintOptions,o={};for(var i in h)o[i]=h[i];if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}function l(e){return"string"==typeof e?e:e.text}function u(e,t){var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(r["Ctrl-P"]=function(){t.moveFocus(-1)},r["Ctrl-N"]=function(){t.moveFocus(1)});var n=e.options.customKeys,o=n?{}:r;function i(e,n){var i;i="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n,o[e]=i}if(n)for(var a in n)n.hasOwnProperty(a)&&i(a,n[a]);var l=e.options.extraKeys;if(l)for(var a in l)l.hasOwnProperty(a)&&i(a,l[a]);return o}function s(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function c(n,o){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=n,this.data=o,this.picked=!1;var i=this,a=n.cm,c=a.getInputField().ownerDocument,f=c.defaultView||c.parentWindow,d=this.hints=c.createElement("ul");d.setAttribute("role","listbox"),d.setAttribute("aria-expanded","true"),d.id=this.id;var p=n.cm.options.theme;d.className="CodeMirror-hints "+p,this.selectedHint=o.selectedHint||0;for(var h=o.list,m=0;m<h.length;++m){var v=d.appendChild(c.createElement("li")),g=h[m],y=t+(m!=this.selectedHint?"":" "+r);null!=g.className&&(y=g.className+" "+y),v.className=y,m==this.selectedHint&&v.setAttribute("aria-selected","true"),v.id=this.id+"-"+m,v.setAttribute("role","option"),g.render?g.render(v,o,g):v.appendChild(c.createTextNode(g.displayText||l(g))),v.hintId=m}var b=n.options.container||c.body,w=a.cursorCoords(n.options.alignWithWord?o.from:null),_=w.left,x=w.bottom,S=!0,k=0,O=0;if(b!==c.body){var E=-1!==["absolute","relative","fixed"].indexOf(f.getComputedStyle(b).position)?b:b.offsetParent,C=E.getBoundingClientRect(),j=c.body.getBoundingClientRect();k=C.left-j.left-E.scrollLeft,O=C.top-j.top-E.scrollTop}d.style.left=_-k+"px",d.style.top=x-O+"px";var P=f.innerWidth||Math.max(c.body.offsetWidth,c.documentElement.offsetWidth),L=f.innerHeight||Math.max(c.body.offsetHeight,c.documentElement.offsetHeight);b.appendChild(d),a.getInputField().setAttribute("aria-autocomplete","list"),a.getInputField().setAttribute("aria-owns",this.id),a.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var M,A=n.options.moveOnOverlap?d.getBoundingClientRect():new DOMRect,T=!!n.options.paddingForScrollbar&&d.scrollHeight>d.clientHeight+1;if(setTimeout((function(){M=a.getScrollInfo()})),A.bottom-L>0){var I=A.bottom-A.top;if(w.top-(w.bottom-A.top)-I>0)d.style.top=(x=w.top-I-O)+"px",S=!1;else if(I>L){d.style.height=L-5+"px",d.style.top=(x=w.bottom-A.top-O)+"px";var R=a.getCursor();o.from.ch!=R.ch&&(w=a.cursorCoords(R),d.style.left=(_=w.left-k)+"px",A=d.getBoundingClientRect())}}var N,D=A.right-P;if(T&&(D+=a.display.nativeBarWidth),D>0&&(A.right-A.left>P&&(d.style.width=P-5+"px",D-=A.right-A.left-P),d.style.left=(_=w.left-D-k)+"px"),T)for(var z=d.firstChild;z;z=z.nextSibling)z.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=u(n,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){i.pick()},data:o})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){N=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(N)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();M||(M=a.getScrollInfo());var r=x+M.top-e.top,o=r-(f.pageYOffset||(c.documentElement||c.body).scrollTop);if(S||(o+=d.offsetHeight),o<=t.top||o>=t.bottom)return n.close();d.style.top=r+"px",d.style.left=_+M.left-e.left+"px"}),e.on(d,"dblclick",(function(e){var t=s(d,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),i.pick())})),e.on(d,"click",(function(e){var t=s(d,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),n.options.completeOnSingleClick&&i.pick())})),e.on(d,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var F=this.getSelectedHintRange();return 0===F.from&&0===F.to||this.scrollToActive(),e.signal(o,"select",h[this.selectedHint],d.childNodes[this.selectedHint]),!0}function f(e,t){if(!e.somethingSelected())return t;for(var r=[],n=0;n<t.length;n++)t[n].supportsSelection&&r.push(t[n]);return r}function d(e,t,r,n){if(e.async)e(t,n,r);else{var o=e(t,r);o&&o.then?o.then(n):n(o)}}function p(t,r){var n,o=t.getHelpers(r,"hint");if(o.length){var i=function(e,t,r){var n=f(e,o);function i(o){if(o==n.length)return t(null);d(n[o],e,r,(function(e){e&&e.list.length>0?t(e):i(o+1)}))}i(0)};return i.async=!0,i.supportsSelection=!0,i}return(n=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:n})}:e.hint.anyword?function(t,r){return e.hint.anyword(t,r)}:function(){}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,r){var n=t.list[r],o=this;this.cm.operation((function(){n.hint?n.hint(o.cm,t,n):o.cm.replaceRange(l(n),n.from||t.from,n.to||t.to,"complete"),e.signal(t,"pick",n),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),r=this.cm.getLine(t.line);if(t.line!=this.startPos.line||r.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(r.charAt(t.ch-1)))this.close();else{var n=this;this.debounce=o((function(){n.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,r=++this.tick;d(this.options.hint,this.cm,this.options,(function(n){t.tick==r&&t.finishUpdate(n,e)}))}},finishUpdate:function(t,r){this.data&&e.signal(this.data,"update");var n=this.widget&&this.widget.picked||r&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(n&&1==t.list.length?this.pick(t,0):(this.widget=new c(this,t),e.signal(t,"shown")))}},c.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant"),e.removeAttribute("aria-owns");var t=this.completion.cm;this.completion.options.closeOnUnfocus&&(t.off("blur",this.onBlur),t.off("focus",this.onFocus)),t.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+r,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=t]).className+=" "+r,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],r=this.hints.childNodes[e.to],n=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-n.offsetTop:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,r){var n,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),l=o;i.start<o.ch&&/\w/.test(i.string.charAt(o.ch-i.start-1))?n=i.string.substr(0,o.ch-i.start):(n="",a=o);for(var u=[],s=0;s<r.words.length;s++){var c=r.words[s];c.slice(0,n.length)==n&&u.push(c)}if(u.length)return{list:u,from:a,to:l}})),e.commands.autocomplete=e.showHint;var h={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(r(3458))},27321:(e,t,r)=>{!function(e){"use strict";var t=e.Pos;function r(e,t,r){return r?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function n(n,o){var i=o&&o.schemaInfo,a=o&&o.quoteChar||'"',l=o&&o.matchInMiddle;if(i){var u=n.getCursor(),s=n.getTokenAt(u);if(s.end>u.ch&&(s.end=u.ch,s.string=s.string.slice(0,u.ch-s.start)),(b=e.innerMode(n.getMode(),s.state)).mode.xmlCurrentTag){var c,f,d=[],p=!1,h=/\btag\b/.test(s.type)&&!/>$/.test(s.string),m=h&&/^\w/.test(s.string);if(m){var v=n.getLine(u.line).slice(Math.max(0,s.start-2),s.start),g=/<\/$/.test(v)?"close":/<$/.test(v)?"open":null;g&&(f=s.start-("close"==g?2:1))}else h&&"<"==s.string?g="open":h&&"</"==s.string&&(g="close");var y=b.mode.xmlCurrentTag(b.state);if(!h&&!y||g){m&&(c=s.string),p=g;var b,w=b.mode.xmlCurrentContext?b.mode.xmlCurrentContext(b.state):[],_=(b=w.length&&w[w.length-1])&&i[b],x=b?_&&_.children:i["!top"];if(x&&"close"!=g)for(var S=0;S<x.length;++S)c&&!r(x[S],c,l)||d.push("<"+x[S]);else if("close"!=g)for(var k in i)!i.hasOwnProperty(k)||"!top"==k||"!attrs"==k||c&&!r(k,c,l)||d.push("<"+k);b&&(!c||"close"==g&&r(b,c,l))&&d.push("</"+b+">")}else{var O=(_=y&&i[y.name])&&_.attrs,E=i["!attrs"];if(!O&&!E)return;if(O){if(E){var C={};for(var j in E)E.hasOwnProperty(j)&&(C[j]=E[j]);for(var j in O)O.hasOwnProperty(j)&&(C[j]=O[j]);O=C}}else O=E;if("string"==s.type||"="==s.string){var P,L=(v=n.getRange(t(u.line,Math.max(0,u.ch-60)),t(u.line,"string"==s.type?s.start:s.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!L||!O.hasOwnProperty(L[1])||!(P=O[L[1]]))return;if("function"==typeof P&&(P=P.call(this,n)),"string"==s.type){c=s.string;var M=0;/['"]/.test(s.string.charAt(0))&&(a=s.string.charAt(0),c=s.string.slice(1),M++);var A=s.string.length;if(/['"]/.test(s.string.charAt(A-1))&&(a=s.string.charAt(A-1),c=s.string.substr(M,A-2)),M){var T=n.getLine(u.line);T.length>s.end&&T.charAt(s.end)==a&&s.end++}p=!0}var I=function(e){if(e)for(var t=0;t<e.length;++t)c&&!r(e[t],c,l)||d.push(a+e[t]+a);return N()};return P&&P.then?P.then(I):I(P)}for(var R in"attribute"==s.type&&(c=s.string,p=!0),O)!O.hasOwnProperty(R)||c&&!r(R,c,l)||d.push(R)}return N()}}function N(){return{list:d,from:p?t(u.line,null==f?s.start:f):u,to:p?t(u.line,s.end):u}}}e.registerHelper("hint","xml",n)}(r(3458))},49427:(e,t,r)=>{!function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var r=e.exec(t.string);if(r&&r.index==t.pos)return t.pos+=r[0].length||1,"searching";r?t.pos=r.index:t.skipToEnd()}}}function r(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new r)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,r){return e.getSearchCursor(t,r,{caseFold:o(t),multiline:!0})}function a(e,t,r,n,o){e.openDialog(t,n,{value:r,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:o,bottom:e.options.search.bottom})}function l(e,t,r,n,o){e.openDialog?e.openDialog(t,o,{value:n,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(r,n))}function u(e,t,r,n){e.openConfirm?e.openConfirm(t,n):confirm(r)&&n[0]()}function s(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function c(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=s(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,r,n){r.queryText=n,r.query=c(n),e.removeOverlay(r.overlay,o(r.query)),r.overlay=t(r.query,o(r.query)),e.addOverlay(r.overlay),e.showMatchesOnScrollbar&&(r.annotate&&(r.annotate.clear(),r.annotate=null),r.annotate=e.showMatchesOnScrollbar(r.query,o(r.query)))}function d(t,r,o,i){var u=n(t);if(u.query)return p(t,r);var s=t.getSelection()||u.lastQuery;if(s instanceof RegExp&&"x^"==s.source&&(s=null),o&&t.openDialog){var c=null,d=function(r,n){e.e_stop(n),r&&(r!=u.queryText&&(f(t,u,r),u.posFrom=u.posTo=t.getCursor()),c&&(c.style.opacity=1),p(t,n.shiftKey,(function(e,r){var n;r.line<3&&document.querySelector&&(n=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&n.getBoundingClientRect().bottom-4>t.cursorCoords(r,"window").top&&((c=n).style.opacity=.4)})))};a(t,v(t),s,d,(function(r,o){var i=e.keyName(r),a=t.getOption("extraKeys"),l=a&&a[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(r),f(t,n(t),o),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(r),d(o,r))})),i&&s&&(f(t,u,s),p(t,r))}else l(t,v(t),"Search for:",s,(function(e){e&&!u.query&&t.operation((function(){f(t,u,e),u.posFrom=u.posTo=t.getCursor(),p(t,r)}))}))}function p(t,r,o){t.operation((function(){var a=n(t),l=i(t,a.query,r?a.posFrom:a.posTo);(l.find(r)||(l=i(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),a.posFrom=l.from(),a.posTo=l.to(),o&&o(l.from(),l.to()))}))}function h(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var r=e?document.createElement(e):document.createDocumentFragment();for(var n in t)r[n]=t[n];for(var o=2;o<arguments.length;o++){var i=arguments[o];r.appendChild("string"==typeof i?document.createTextNode(i):i)}return r}function v(e){var t=m("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));return t.setAttribute("for","CodeMirror-search-field"),m("",null,t," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function g(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function b(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function w(e,t,r){e.operation((function(){for(var n=i(e,t);n.findNext();)if("string"!=typeof t){var o=e.getRange(n.from(),n.to()).match(t);n.replace(r.replace(/\$(\d)/g,(function(e,t){return o[t]})))}else n.replace(r)}))}function _(e,t){if(!e.getOption("readOnly")){var r=e.getSelection()||n(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),a=m("",null,m("span",{className:"CodeMirror-search-label"},o),g(e));l(e,a,o,r,(function(r){r&&(r=c(r),l(e,y(e),e.phrase("Replace with:"),"",(function(n){if(n=s(n),t)w(e,r,n);else{h(e);var o=i(e,r,e.getCursor("from")),a=function(){var t,s=o.from();!(t=o.findNext())&&(o=i(e,r),!(t=o.findNext())||s&&o.from().line==s.line&&o.from().ch==s.ch)||(e.setSelection(o.from(),o.to()),e.scrollIntoView({from:o.from(),to:o.to()}),u(e,b(e),e.phrase("Replace?"),[function(){l(t)},a,function(){w(e,r,n)}]))},l=function(e){o.replace("string"==typeof r?n:n.replace(/\$(\d)/g,(function(t,r){return e[r]}))),a()};a()}})))}))}}e.defineOption("search",{bottom:!1}),e.commands.find=function(e){h(e),d(e)},e.commands.findPersistent=function(e){h(e),d(e,!1,!0)},e.commands.findPersistentNext=function(e){d(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){d(e,!0,!0,!0)},e.commands.findNext=d,e.commands.findPrev=function(e){d(e,!0)},e.commands.clearSearch=h,e.commands.replace=_,e.commands.replaceAll=function(e){_(e,!0)}}(r(3458),r(41863),r(31528))},41863:(e,t,r)=>{!function(e){"use strict";var t,r,n=e.Pos;function o(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function i(e,t){for(var r=o(e),n=r,i=0;i<t.length;i++)-1==n.indexOf(t.charAt(i))&&(n+=t.charAt(i));return r==n?e:new RegExp(e.source,n)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function l(e,t,r){t=i(t,"g");for(var o=r.line,a=r.ch,l=e.lastLine();o<=l;o++,a=0){t.lastIndex=a;var u=e.getLine(o),s=t.exec(u);if(s)return{from:n(o,s.index),to:n(o,s.index+s[0].length),match:s}}}function u(e,t,r){if(!a(t))return l(e,t,r);t=i(t,"gm");for(var o,u=1,s=r.line,c=e.lastLine();s<=c;){for(var f=0;f<u&&!(s>c);f++){var d=e.getLine(s++);o=null==o?d:o+"\n"+d}u*=2,t.lastIndex=r.ch;var p=t.exec(o);if(p){var h=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),v=r.line+h.length-1,g=h[h.length-1].length;return{from:n(v,g),to:n(v+m.length-1,1==m.length?g+m[0].length:m[m.length-1].length),match:p}}}}function s(e,t,r){for(var n,o=0;o<=e.length;){t.lastIndex=o;var i=t.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-r)break;(!n||a>n.index+n[0].length)&&(n=i),o=i.index+1}return n}function c(e,t,r){t=i(t,"g");for(var o=r.line,a=r.ch,l=e.firstLine();o>=l;o--,a=-1){var u=e.getLine(o),c=s(u,t,a<0?0:u.length-a);if(c)return{from:n(o,c.index),to:n(o,c.index+c[0].length),match:c}}}function f(e,t,r){if(!a(t))return c(e,t,r);t=i(t,"gm");for(var o,l=1,u=e.getLine(r.line).length-r.ch,f=r.line,d=e.firstLine();f>=d;){for(var p=0;p<l&&f>=d;p++){var h=e.getLine(f--);o=null==o?h:h+"\n"+o}l*=2;var m=s(o,t,u);if(m){var v=o.slice(0,m.index).split("\n"),g=m[0].split("\n"),y=f+v.length,b=v[v.length-1].length;return{from:n(y,b),to:n(y+g.length-1,1==g.length?b+g[0].length:g[g.length-1].length),match:m}}}}function d(e,t,r,n){if(e.length==t.length)return r;for(var o=0,i=r+Math.max(0,e.length-t.length);;){if(o==i)return o;var a=o+i>>1,l=n(e.slice(0,a)).length;if(l==r)return a;l>r?i=a:o=a+1}}function p(e,o,i,a){if(!o.length)return null;var l=a?t:r,u=l(o).split(/\r|\n\r?/);e:for(var s=i.line,c=i.ch,f=e.lastLine()+1-u.length;s<=f;s++,c=0){var p=e.getLine(s).slice(c),h=l(p);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return i=d(p,h,m,l)+c,{from:n(s,d(p,h,m,l)+c),to:n(s,d(p,h,m+u[0].length,l)+c)}}var v=h.length-u[0].length;if(h.slice(v)==u[0]){for(var g=1;g<u.length-1;g++)if(l(e.getLine(s+g))!=u[g])continue e;var y=e.getLine(s+u.length-1),b=l(y),w=u[u.length-1];if(b.slice(0,w.length)==w)return{from:n(s,d(p,h,v,l)+c),to:n(s+u.length-1,d(y,b,w.length,l))}}}}function h(e,o,i,a){if(!o.length)return null;var l=a?t:r,u=l(o).split(/\r|\n\r?/);e:for(var s=i.line,c=i.ch,f=e.firstLine()-1+u.length;s>=f;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var h=l(p);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:n(s,d(p,h,m,l)),to:n(s,d(p,h,m+u[0].length,l))}}var v=u[u.length-1];if(h.slice(0,v.length)==v){var g=1;for(i=s-u.length+1;g<u.length-1;g++)if(l(e.getLine(i+g))!=u[g])continue e;var y=e.getLine(s+1-u.length),b=l(y);if(b.slice(b.length-u[0].length)==u[0])return{from:n(s+1-u.length,d(y,b,y.length-u[0].length,l)),to:n(s,d(p,h,v.length,l))}}}}function m(e,t,r,o){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,r=r?e.clipPos(r):n(0,0),this.pos={from:r,to:r},"object"==typeof o?a=o.caseFold:(a=o,o=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(r,n){return(r?h:p)(e,t,n,a)}):(t=i(t,"gm"),o&&!1===o.multiline?this.matches=function(r,n){return(r?c:l)(e,t,n)}:this.matches=function(r,n){return(r?f:u)(e,t,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},r=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},r=function(e){return e}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var r=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=n(r.line,r.ch),t?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||"").length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||"").length&&(r.ch=0,r.line++)),0!=e.cmpPos(r,this.doc.clipPos(r))))return this.atOccurrence=!1;var o=this.matches(t,r);if(this.afterEmptyMatch=o&&0==e.cmpPos(o.from,o.to),o)return this.pos=o,this.atOccurrence=!0,this.pos.match||!0;var i=n(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,r){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,r),this.pos.to=n(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new m(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new m(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,r){for(var n=[],o=this.getSearchCursor(t,this.getCursor("from"),r);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)n.push({anchor:o.from(),head:o.to()});n.length&&this.setSelections(n,0)}))}(r(3458))},79546:(e,t,r)=>{!function(e){"use strict";var t="CodeMirror-activeline",r="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function o(e){for(var o=0;o<e.state.activeLines.length;o++)e.removeLineClass(e.state.activeLines[o],"wrap",t),e.removeLineClass(e.state.activeLines[o],"background",r),e.removeLineClass(e.state.activeLines[o],"gutter",n)}function i(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function a(e,a){for(var l=[],u=0;u<a.length;u++){var s=a[u],c=e.getOption("styleActiveLine");if("object"==typeof c&&c.nonEmpty?s.anchor.line==s.head.line:s.empty()){var f=e.getLineHandleVisualStart(s.head.line);l[l.length-1]!=f&&l.push(f)}}i(e.state.activeLines,l)||e.operation((function(){o(e);for(var i=0;i<l.length;i++)e.addLineClass(l[i],"wrap",t),e.addLineClass(l[i],"background",r),e.addLineClass(l[i],"gutter",n);e.state.activeLines=l}))}function l(e,t){a(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,r,n){var i=n!=e.Init&&n;r!=i&&(i&&(t.off("beforeSelectionChange",l),o(t),delete t.state.activeLines),r&&(t.state.activeLines=[],a(t,t.listSelections()),t.on("beforeSelectionChange",l)))}))}(r(3458))},32384:(e,t,r)=>{!function(e){"use strict";var t=e.commands,r=e.Pos;function n(t,n,o){if(o<0&&0==n.ch)return t.clipPos(r(n.line-1));var i=t.getLine(n.line);if(o>0&&n.ch>=i.length)return t.clipPos(r(n.line+1,0));for(var a,l="start",u=n.ch,s=u,c=o<0?0:i.length,f=0;s!=c;s+=o,f++){var d=i.charAt(o<0?s-1:s),p="_"!=d&&e.isWordChar(d)?"w":"o";if("w"==p&&d.toUpperCase()==d&&(p="W"),"start"==l)"o"!=p?(l="in",a=p):u=s+o;else if("in"==l&&a!=p){if("w"==a&&"W"==p&&o<0&&s--,"W"==a&&"w"==p&&o>0){if(s==u+1){a="w";continue}s--}break}}return r(n.line,s)}function o(e,t){e.extendSelectionsBy((function(r){return e.display.shift||e.doc.extend||r.empty()?n(e.doc,r.head,t):t<0?r.from():r.to()}))}function i(t,n){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],i=-1,a=0;a<e;a++){var l=t.listSelections()[a].head;if(!(l.line<=i)){var u=r(l.line+(n?0:1),0);t.replaceRange("\n",u,null,"+insertLine"),t.indentLine(u.line,null,!0),o.push({head:u,anchor:u}),i=l.line+1}}t.setSelections(o)})),t.execCommand("indentAuto")}function a(t,n){for(var o=n.ch,i=o,a=t.getLine(n.line);o&&e.isWordChar(a.charAt(o-1));)--o;for(;i<a.length&&e.isWordChar(a.charAt(i));)++i;return{from:r(n.line,o),to:r(n.line,i),word:a.slice(o,i)}}function l(e,t){for(var r=e.listSelections(),n=[],o=0;o<r.length;o++){var i=r[o],a=e.findPosV(i.anchor,t,"line",i.anchor.goalColumn),l=e.findPosV(i.head,t,"line",i.head.goalColumn);a.goalColumn=null!=i.anchor.goalColumn?i.anchor.goalColumn:e.cursorCoords(i.anchor,"div").left,l.goalColumn=null!=i.head.goalColumn?i.head.goalColumn:e.cursorCoords(i.head,"div").left;var u={anchor:a,head:l};n.push(i),n.push(u)}e.setSelections(n)}function u(t,r,n){for(var o=0;o<t.length;o++)if(0==e.cmpPos(t[o].from(),r)&&0==e.cmpPos(t[o].to(),n))return!0;return!1}t.goSubwordLeft=function(e){o(e,-1)},t.goSubwordRight=function(e){o(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=r&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=r&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],o=0;o<t.length;o++)for(var i=t[o].from(),a=t[o].to(),l=i.line;l<=a.line;++l)a.line>i.line&&l==a.line&&0==a.ch||n.push({anchor:l==i.line?i:r(l,0),head:l==a.line?a:r(l)});e.setSelections(n,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),n=[],o=0;o<t.length;o++){var i=t[o];n.push({anchor:r(i.from().line,0),head:r(i.to().line+1,0)})}e.setSelections(n)},t.insertLineAfter=function(e){return i(e,!1)},t.insertLineBefore=function(e){return i(e,!0)},t.selectNextOccurrence=function(t){var n=t.getCursor("from"),o=t.getCursor("to"),i=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(n,o)){var l=a(t,n);if(!l.word)return;t.setSelection(l.from,l.to),i=!0}else{var s=t.getRange(n,o),c=i?new RegExp("\\b"+s+"\\b"):s,f=t.getSearchCursor(c,o),d=f.findNext();if(d||(d=(f=t.getSearchCursor(c,r(t.firstLine(),0))).findNext()),!d||u(t.listSelections(),f.from(),f.to()))return;t.addSelection(f.from(),f.to())}i&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(r){var n=r.getCursor("anchor"),o=r.getCursor("head");t.selectNextOccurrence(r),0!=e.cmpPos(n,o)&&r.doc.setSelections(r.doc.listSelections().filter((function(e){return e.anchor!=n||e.head!=o})))},t.addCursorToPrevLine=function(e){l(e,-1)},t.addCursorToNextLine=function(e){l(e,1)};var s="(){}[]";function c(t){for(var n=t.listSelections(),o=[],i=0;i<n.length;i++){var a=n[i],l=a.head,u=t.scanForBracket(l,-1);if(!u)return!1;for(;;){var c=t.scanForBracket(l,1);if(!c)return!1;if(c.ch==s.charAt(s.indexOf(u.ch)+1)){var f=r(u.pos.line,u.pos.ch+1);if(0!=e.cmpPos(f,a.from())||0!=e.cmpPos(c.pos,a.to())){o.push({anchor:f,head:c.pos});break}if(!(u=t.scanForBracket(u.pos,-1)))return!1}l=r(c.pos.line,c.pos.ch+1)}}return t.setSelections(o),!0}function f(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function d(t,n,o){if(t.isReadOnly())return e.Pass;for(var i,a=t.listSelections(),l=[],u=0;u<a.length;u++){var s=a[u];if(!s.empty()){for(var c=s.from().line,f=s.to().line;u<a.length-1&&a[u+1].from().line==f;)f=a[++u].to().line;a[u].to().ch||f--,l.push(c,f)}}l.length?i=!0:l.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],a=0;a<l.length;a+=2){var u=l[a],s=l[a+1],c=r(u,0),f=r(s),d=t.getRange(c,f,!1);n?d.sort((function(e,t){return e<t?-o:e==t?0:o})):d.sort((function(e,t){var r=e.toUpperCase(),n=t.toUpperCase();return r!=n&&(e=r,t=n),e<t?-o:e==t?0:o})),t.replaceRange(d,c,f),i&&e.push({anchor:c,head:r(s+1,0)})}i&&t.setSelections(e,0)}))}function p(t,r){t.operation((function(){for(var n=t.listSelections(),o=[],i=[],l=0;l<n.length;l++)(s=n[l]).empty()?(o.push(l),i.push("")):i.push(r(t.getRange(s.from(),s.to())));var u;for(t.replaceSelections(i,"around","case"),l=o.length-1;l>=0;l--){var s=n[o[l]];if(!(u&&e.cmpPos(s.head,u)>0)){var c=a(t,s.head);u=c.from,t.replaceRange(r(c.word),c.from,c.to)}}}))}function h(t){var r=t.getCursor("from"),n=t.getCursor("to");if(0==e.cmpPos(r,n)){var o=a(t,r);if(!o.word)return;r=o.from,n=o.to}return{from:r,to:n,query:t.getRange(r,n),word:o}}function m(e,t){var n=h(e);if(n){var o=n.query,i=e.getSearchCursor(o,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(o,t?r(e.firstLine(),0):e.clipPos(r(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}t.selectScope=function(e){c(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!c(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(n){var o=t.scanForBracket(n.head,1,f(t.getTokenTypeAt(n.head)));if(o&&0!=e.cmpPos(o.pos,n.head))return o.pos;var i=t.scanForBracket(n.head,-1,f(t.getTokenTypeAt(r(n.head.line,n.head.ch+1))));return i&&r(i.pos.line,i.pos.ch+1)||n.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],i=t.firstLine()-1,a=[],l=0;l<n.length;l++){var u=n[l],s=u.from().line-1,c=u.to().line;a.push({anchor:r(u.anchor.line-1,u.anchor.ch),head:r(u.head.line-1,u.head.ch)}),0!=u.to().ch||u.empty()||--c,s>i?o.push(s,c):o.length&&(o[o.length-1]=c),i=c}t.operation((function(){for(var e=0;e<o.length;e+=2){var n=o[e],i=o[e+1],l=t.getLine(n);t.replaceRange("",r(n,0),r(n+1,0),"+swapLine"),i>t.lastLine()?t.replaceRange("\n"+l,r(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",r(i,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],i=t.lastLine()+1,a=n.length-1;a>=0;a--){var l=n[a],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u<i?o.push(u,s):o.length&&(o[o.length-1]=s),i=s}t.operation((function(){for(var e=o.length-2;e>=0;e-=2){var n=o[e],i=o[e+1],a=t.getLine(n);n==t.lastLine()?t.replaceRange("",r(n-1),r(n),"+swapLine"):t.replaceRange("",r(n,0),r(n+1,0),"+swapLine"),t.replaceRange(a+"\n",r(i,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),n=[],o=0;o<t.length;o++){for(var i=t[o],a=i.from(),l=a.line,u=i.to().line;o<t.length-1&&t[o+1].from().line==u;)u=t[++o].to().line;n.push({start:l,end:u,anchor:!i.empty()&&a})}e.operation((function(){for(var t=0,o=[],i=0;i<n.length;i++){for(var a,l=n[i],u=l.anchor&&r(l.anchor.line-t,l.anchor.ch),s=l.start;s<=l.end;s++){var c=s-t;s==l.end&&(a=r(c,e.getLine(c).length+1)),c<e.lastLine()&&(e.replaceRange(" ",r(c),r(c+1,/^\s*/.exec(e.getLine(c+1))[0].length)),++t)}o.push({anchor:u||a,head:a})}e.setSelections(o,0)}))},t.duplicateLine=function(e){e.operation((function(){for(var t=e.listSelections().length,n=0;n<t;n++){var o=e.listSelections()[n];o.empty()?e.replaceRange(e.getLine(o.head.line)+"\n",r(o.head.line,0)):e.replaceRange(e.getRange(o.from(),o.to()),o.from())}e.scrollIntoView()}))},t.sortLines=function(e){d(e,!0,1)},t.reverseSortLines=function(e){d(e,!0,-1)},t.sortLinesInsensitive=function(e){d(e,!1,1)},t.reverseSortLinesInsensitive=function(e){d(e,!1,-1)},t.nextBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var r=t.shift(),n=r.find();if(n)return t.push(r),e.setSelection(n.from,n.to)}},t.prevBookmark=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var r=t[t.length-1].find();if(r)return e.setSelection(r.from,r.to);t.pop()}},t.toggleBookmark=function(e){for(var t=e.listSelections(),r=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),n=0;n<t.length;n++){for(var o=t[n].from(),i=t[n].to(),a=t[n].empty()?e.findMarksAt(o):e.findMarks(o,i),l=0;l<a.length;l++)if(a[l].sublimeBookmark){a[l].clear();for(var u=0;u<r.length;u++)r[u]==a[l]&&r.splice(u--,1);break}l==a.length&&r.push(e.markText(o,i,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},t.clearBookmarks=function(e){var t=e.state.sublimeBookmarks;if(t)for(var r=0;r<t.length;r++)t[r].clear();t.length=0},t.selectBookmarks=function(e){var t=e.state.sublimeBookmarks,r=[];if(t)for(var n=0;n<t.length;n++){var o=t[n].find();o?r.push({anchor:o.from,head:o.to}):t.splice(n--,0)}r.length&&e.setSelections(r,0)},t.smartBackspace=function(t){if(t.somethingSelected())return e.Pass;t.operation((function(){for(var n=t.listSelections(),o=t.getOption("indentUnit"),i=n.length-1;i>=0;i--){var a=n[i].head,l=t.getRange({line:a.line,ch:0},a),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(a,-1,"char",!1);if(l&&!/\S/.test(l)&&u%o==0){var c=new r(a.line,e.findColumn(l,u-o,o));c.ch!=a.ch&&(s=c)}t.replaceRange("",s,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,r(t[n].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var r=t.state.sublimeMark&&t.state.sublimeMark.find();if(r){var n=t.getCursor(),o=r;if(e.cmpPos(n,o)>0){var i=o;o=n,n=i}t.state.sublimeKilled=t.getRange(n,o),t.replaceRange("",n,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var r=e.getSearchCursor(t.query),n=[],o=-1;r.findNext();)n.push({anchor:r.from(),head:r.to()}),r.from().line<=t.from.line&&r.from().ch<=t.from.ch&&o++;e.setSelections(n,o)}};var v=e.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(v.pcSublime);var g=v.default==v.macDefault;v.sublime=g?v.macSublime:v.pcSublime}(r(3458),r(41863),r(69805))},3458:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=n||o||i,l=a&&(n?document.documentMode||6:+(i||o)[1]),u=!i&&/WebKit\//.test(e),s=u&&/Qt\/\d+\.\d+/.test(e),c=!i&&/Chrome\/(\d+)/.exec(e),f=c&&+c[1],d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),v=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),y=v||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),_=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,u=!0);var S=b&&(s||d&&(null==x||x<12.11)),k=r||a&&l>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,C=function(e,t){var r=e.className,n=O(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return j(e).appendChild(t)}function L(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function M(e,t,r,n){var o=L(e,t,r,n);return o.setAttribute("role","presentation"),o}function A(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function T(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function I(e,t){var r=e.className;O(t).test(r)||(e.className+=(r?" ":"")+t)}function R(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!O(r[n]).test(t)&&(t+=" "+r[n]);return t}E=document.createRange?function(e,t,r,n){var o=document.createRange();return o.setEnd(n||e,r),o.setStart(e,t),o}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var N=function(e){e.select()};function D(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function F(e,t,r,n,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=n||0,a=o||0;;){var l=e.indexOf("\t",i);if(l<0||l>=t)return a+(t-i);a+=l-i,a+=r-a%r,i=l+1}}v?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function H(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}B.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},B.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var U=50,W={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},q={origin:"*mouse"},G={origin:"+move"};function Y(e,t,r){for(var n=0,o=0;;){var i=e.indexOf("\t",n);-1==i&&(i=e.length);var a=i-n;if(i==e.length||o+a>=t)return n+Math.min(a,t-o);if(o+=i-n,n=i+1,(o+=r-o%r)>=t)return n}}var K=[""];function $(e){for(;K.length<=e;)K.push(Q(K)+" ");return K[e]}function Q(e){return e[e.length-1]}function Z(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function X(e,t,r){for(var n=0,o=r(t);n<e.length&&r(e[n])<=o;)n++;e.splice(n,0,t)}function J(){}function ee(e,t){var r;return Object.create?r=Object.create(e):(J.prototype=e,r=new J),t&&z(t,r),r}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ae(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:t<e.length)&&ae(e.charAt(t));)t+=r;return t}function ue(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var o=(t+r)/2,i=n<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",i),o=!0)}o||n(t,r,"ltr")}var ce=null;function fe(e,t,r){var n;ce=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==r?n=o:ce=o),i.from==t&&(i.from!=i.to&&"before"!=r?n=o:ce=o)}return null!=n?n:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,i=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function u(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d<c;++d)f.push(r(e.charCodeAt(d)));for(var p=0,h=s;p<c;++p){var m=f[p];"m"==m?f[p]=h:h=m}for(var v=0,g=s;v<c;++v){var y=f[v];"1"==y&&"r"==g?f[v]="n":i.test(y)&&(g=y,"r"==y&&(f[v]="R"))}for(var b=1,w=f[0];b<c-1;++b){var _=f[b];"+"==_&&"1"==w&&"1"==f[b+1]?f[b]="1":","!=_||w!=f[b+1]||"1"!=w&&"n"!=w||(f[b]=w),w=_}for(var x=0;x<c;++x){var S=f[x];if(","==S)f[x]="N";else if("%"==S){var k=void 0;for(k=x+1;k<c&&"%"==f[k];++k);for(var O=x&&"!"==f[x-1]||k<c&&"1"==f[k]?"1":"N",E=x;E<k;++E)f[E]=O;x=k-1}}for(var C=0,j=s;C<c;++C){var P=f[C];"L"==j&&"1"==P?f[C]="L":i.test(P)&&(j=P)}for(var L=0;L<c;++L)if(o.test(f[L])){var M=void 0;for(M=L+1;M<c&&o.test(f[M]);++M);for(var A="L"==(L?f[L-1]:s),T=A==("L"==(M<c?f[M]:s))?A?"L":"R":s,I=L;I<M;++I)f[I]=T;L=M-1}for(var R,N=[],D=0;D<c;)if(a.test(f[D])){var z=D;for(++D;D<c&&a.test(f[D]);++D);N.push(new u(0,z,D))}else{var F=D,B=N.length,H="rtl"==t?1:0;for(++D;D<c&&"L"!=f[D];++D);for(var U=F;U<D;)if(l.test(f[U])){F<U&&(N.splice(B,0,new u(1,F,U)),B+=H);var W=U;for(++U;U<D&&l.test(f[U]);++U);N.splice(B,0,new u(2,W,U)),B+=H,F=U}else++U;F<D&&N.splice(B,0,new u(1,F,D))}return"ltr"==t&&(1==N[0].level&&(R=e.match(/^\s+/))&&(N[0].from=R[0].length,N.unshift(new u(0,0,R[0].length))),1==Q(N).level&&(R=e.match(/\s+$/))&&(Q(N).to-=R[0].length,N.push(new u(0,c-R[0].length,c)))),"rtl"==t?N.reverse():N}}();function pe(e,t){var r=e.order;return null==r&&(r=e.order=de(e.text,t)),r}var he=[],me=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||he).concat(r)}};function ve(e,t){return e._handlers&&e._handlers[t]||he}function ge(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,o=n&&n[t];if(o){var i=H(o,r);i>-1&&(n[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ye(e,t){var r=ve(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<r.length;++o)r[o].apply(null,n)}function be(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,r||t.type,e,t),Oe(t)||t.codemirrorIgnore}function we(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==H(r,t[n])&&r.push(t[n])}function _e(e,t){return ve(e,t).length>0}function xe(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function Se(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){Se(e),ke(e)}function Ce(e){return e.target||e.srcElement}function je(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Pe,Le,Me=function(){if(a&&l<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Pe){var t=L("span","\u200b");P(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Pe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=Pe?L("span","\u200b"):L("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Te(e){if(null!=Le)return Le;var t=P(e,document.createTextNode("A\u062eA")),r=E(t,0,1).getBoundingClientRect(),n=E(t,1,2).getBoundingClientRect();return j(e),!(!r||r.left==r.right)&&(Le=n.right-r.right<3)}var Ie,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(r.push(i.slice(0,a)),t+=a+1):(r.push(i),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},De="oncopy"in(Ie=L("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),ze=null;function Fe(e){if(null!=ze)return ze;var t=P(e,L("span","x")),r=t.getBoundingClientRect(),n=E(t,0,1).getBoundingClientRect();return ze=Math.abs(r.left-n.left)>1}var Be={},He={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=t}function We(e,t){He[e]=t}function Ve(e){if("string"==typeof e&&He.hasOwnProperty(e))e=He[e];else if(e&&"string"==typeof e.name&&He.hasOwnProperty(e.name)){var t=He[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=Ve(t);var r=Be[t.name];if(!r)return qe(e,"text/plain");var n=r(e,t);if(Ge.hasOwnProperty(t.name)){var o=Ge[t.name];for(var i in o)o.hasOwnProperty(i)&&(n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=o[i])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ge={};function Ye(e,t){z(t,Ge.hasOwnProperty(e)?Ge[e]:Ge[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Qe(e,t,r){return!e.startState||e.startState(t,r)}var Ze=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],i=o.chunkSize();if(t<i){r=o;break}t-=i}return r.lines[t]}function Je(e,t,r){var n=[],o=t.line;return e.iter(t.line,r.line+1,(function(e){var i=e.text;o==r.line&&(i=i.slice(0,r.ch)),o==t.line&&(i=i.slice(t.ch)),n.push(i),++o})),n}function et(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function tt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function rt(e){if(null==e.parent)return null;for(var t=e.parent,r=H(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)r+=n.children[o].chunkSize();return r+t.first}function nt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],i=o.height;if(t<i){e=o;continue e}t-=i,r+=o.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return r+a}function ot(e,t){return t>=e.first&&t<e.first+e.size}function it(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function at(e,t,r){if(void 0===r&&(r=null),!(this instanceof at))return new at(e,t,r);this.line=e,this.ch=t,this.sticky=r}function lt(e,t){return e.line-t.line||e.ch-t.ch}function ut(e,t){return e.sticky==t.sticky&&0==lt(e,t)}function st(e){return at(e.line,e.ch)}function ct(e,t){return lt(e,t)<0?t:e}function ft(e,t){return lt(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first)return at(e.first,0);var r=e.first+e.size-1;return t.line>r?at(r,Xe(e,r).text.length):ht(t,Xe(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?at(e.line,t):r<0?at(e.line,0):e}function mt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=pt(e,t[n]);return r}Ze.prototype.eol=function(){return this.pos>=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ze.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ze.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ze.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function yt(e,t,r,n){var o=[e.state.modeGen],i={};Ct(e,t.text,e.doc.mode,r,(function(e,t){return o.push(e,t)}),i,n);for(var a=r.state,l=function(n){r.baseTokens=o;var l=e.state.overlays[n],u=1,s=0;r.state=!0,Ct(e,t.text,l.mode,r,(function(e,t){for(var r=u;s<e;){var n=o[u];n>e&&o.splice(u,1,e,o[u+1],n),u+=2,s=Math.min(e,n)}if(t)if(l.opaque)o.splice(r,u-r,e,"overlay "+t),u=r+2;else for(;r<u;r+=2){var i=o[r+1];o[r+1]=(i?i+" ":"")+"overlay "+t}}),i),r.state=a,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function bt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=wt(e,rt(t)),o=t.text.length>e.options.maxHighlightLength&&Ke(e.doc.mode,n.state),i=yt(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wt(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new gt(n,!0,t);var i=jt(e,t,r),a=i>n.first&&Xe(n,i-1).stateAfter,l=a?gt.fromSaved(n,a,i):new gt(n,Qe(n.mode),i);return n.iter(i,t,(function(r){_t(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=o.viewFrom&&n<o.viewTo?l.save():null,l.nextLine()})),r&&(n.modeFrontier=l.line),l}function _t(e,t,r,n){var o=e.doc.mode,i=new Ze(t,e.options.tabSize,r);for(i.start=i.pos=n||0,""==t&&xt(o,r.state);!i.eol();)St(o,i,r.state),i.start=i.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=$e(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function St(e,t,r,n){for(var o=0;o<10;o++){n&&(n[0]=$e(e,r).mode);var i=e.token(t,r);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,r){return t instanceof vt?new gt(e,Ke(e.mode,t.state),r,t.lookAhead):new gt(e,Ke(e.mode,t),r)},gt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ot(e,t,r,n){var o,i,a=e.doc,l=a.mode,u=Xe(a,(t=pt(a,t)).line),s=wt(e,t.line,r),c=new Ze(u.text,e.options.tabSize,s);for(n&&(i=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=St(l,c,s.state),n&&i.push(new kt(c,o,Ke(a.mode,s.state)));return n?i:new kt(c,o,s.state)}function Et(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Ct(e,t,r,n,o,i,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var u,s=0,c=null,f=new Ze(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&Et(xt(r,n.state),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(l=!1,a&&_t(e,t,n,f.pos),f.pos=t.length,u=null):u=Et(St(r,f,n.state,d),i),d){var p=d[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!l||c!=u){for(;s<f.start;)o(s=Math.min(f.start,s+5e3),c);c=u}f.start=f.pos}for(;s<f.pos;){var h=Math.min(f.pos,s+5e3);o(h,c),s=h}}function jt(e,t,r){for(var n,o,i=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=i.first)return i.first;var u=Xe(i,l-1),s=u.stateAfter;if(s&&(!r||l+(s instanceof vt?s.lookAhead:0)<=i.modeFrontier))return l;var c=F(u.text,null,e.options.tabSize);(null==o||n>c)&&(o=l-1,n=c)}return o}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var o=Xe(e,n).stateAfter;if(o&&(!(o instanceof vt)||n+o.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Lt=!1,Mt=!1;function At(){Lt=!0}function Tt(){Mt=!0}function It(e,t,r){this.marker=e,this.from=t,this.to=r}function Rt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Nt(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Dt(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function zt(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!r||!i.marker.insertLeft)){var l=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(n||(n=[])).push(new It(a,i.from,l?null:i.to))}}return n}function Ft(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!r||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(n||(n=[])).push(new It(a,l?null:i.from-t,null==i.to?null:i.to-t))}}return n}function Bt(e,t){if(t.full)return null;var r=ot(e,t.from.line)&&Xe(e,t.from.line).markedSpans,n=ot(e,t.to.line)&&Xe(e,t.to.line).markedSpans;if(!r&&!n)return null;var o=t.from.ch,i=t.to.ch,a=0==lt(t.from,t.to),l=zt(r,o,a),u=Ft(n,i,a),s=1==t.text.length,c=Q(t.text).length+(s?o:0);if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null==d.to){var p=Rt(u,d.marker);p?s&&(d.to=null==p.to?null:p.to+c):d.to=o}}if(u)for(var h=0;h<u.length;++h){var m=u[h];null!=m.to&&(m.to+=c),null==m.from?Rt(l,m.marker)||(m.from=c,s&&(l||(l=[])).push(m)):(m.from+=c,s&&(l||(l=[])).push(m))}l&&(l=Ht(l)),u&&u!=l&&(u=Ht(u));var v=[l];if(!s){var g,y=t.text.length-2;if(y>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(g||(g=[])).push(new It(l[b].marker,null,null));for(var w=0;w<y;++w)v.push(g);v.push(u)}return v}function Ht(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ut(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=H(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var o=[{from:t,to:r}],i=0;i<n.length;++i)for(var a=n[i],l=a.find(0),u=0;u<o.length;++u){var s=o[u];if(!(lt(s.to,l.from)<0||lt(s.from,l.to)>0)){var c=[u,1],f=lt(s.from,l.from),d=lt(s.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:s.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:s.to}),o.splice.apply(o,c),u+=c.length-3}}return o}function Wt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Vt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function qt(e){return e.inclusiveLeft?-1:0}function Gt(e){return e.inclusiveRight?1:0}function Yt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),o=t.find(),i=lt(n.from,o.from)||qt(e)-qt(t);if(i)return-i;var a=lt(n.to,o.to)||Gt(e)-Gt(t);return a||t.id-e.id}function Kt(e,t){var r,n=Mt&&e.markedSpans;if(n)for(var o=void 0,i=0;i<n.length;++i)(o=n[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!r||Yt(r,o.marker)<0)&&(r=o.marker);return r}function $t(e){return Kt(e,!0)}function Qt(e){return Kt(e,!1)}function Zt(e,t){var r,n=Mt&&e.markedSpans;if(n)for(var o=0;o<n.length;++o){var i=n[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!r||Yt(r,i.marker)<0)&&(r=i.marker)}return r}function Xt(e,t,r,n,o){var i=Xe(e,t),a=Mt&&i.markedSpans;if(a)for(var l=0;l<a.length;++l){var u=a[l];if(u.marker.collapsed){var s=u.marker.find(0),c=lt(s.from,r)||qt(u.marker)-qt(o),f=lt(s.to,n)||Gt(u.marker)-Gt(o);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.to,r)>=0:lt(s.to,r)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.from,n)<=0:lt(s.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function er(e){for(var t;t=Qt(e);)e=t.find(1,!0).line;return e}function tr(e){for(var t,r;t=Qt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function rr(e,t){var r=Xe(e,t),n=Jt(r);return r==n?t:rt(n)}function nr(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!or(e,n))return t;for(;r=Qt(n);)n=r.find(1,!0).line;return rt(n)+1}function or(e,t){var r=Mt&&t.markedSpans;if(r)for(var n=void 0,o=0;o<r.length;++o)if((n=r[o]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ir(e,t,n))return!0}}function ir(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ir(e,n.line,Rt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==r.to&&(null==o.to||o.to!=r.from)&&(o.marker.inclusiveLeft||r.marker.inclusiveRight)&&ir(e,t,o))return!0}function ar(e){for(var t=0,r=(e=Jt(e)).parent,n=0;n<r.lines.length;++n){var o=r.lines[n];if(o==e)break;t+=o.height}for(var i=r.parent;i;i=(r=i).parent)for(var a=0;a<i.children.length;++a){var l=i.children[a];if(l==r)break;t+=l.height}return t}function lr(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=$t(n);){var o=t.find(0,!0);n=o.from.line,r+=o.from.ch-o.to.ch}for(n=e;t=Qt(n);){var i=t.find(0,!0);r-=n.text.length-i.from.ch,r+=(n=i.to.line).text.length-i.to.ch}return r}function ur(e){var t=e.display,r=e.doc;t.maxLine=Xe(r,r.first),t.maxLineLength=lr(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=lr(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function cr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Wt(e),Vt(e,r);var o=n?n(e):1;o!=e.height&&tt(e,o)}function fr(e){e.parent=null,Wt(e)}sr.prototype.lineNo=function(){return rt(this)},xe(sr);var dr={},pr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?pr:dr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function mr(e,t){var r=M("span",null,null,u?"padding-right: .1px":null),n={pre:M("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;n.pos=0,n.addToken=gr,Te(e.display.measure)&&(a=pe(i,e.doc.direction))&&(n.addToken=br(n.addToken,a)),n.map=[],_r(i,n,bt(e,i,t!=e.display.externalMeasured&&rt(i))),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=R(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=R(i.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ae(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=R(n.pre.className,n.textClass||"")),n}function vr(e){var t=L("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gr(e,t,r,n,o,i,u){if(t){var s,c=e.splitSpaces?yr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){s=document.createDocumentFragment();for(var p=0;;){f.lastIndex=p;var h=f.exec(t),m=h?h.index-p:t.length-p;if(m){var v=document.createTextNode(c.slice(p,p+m));a&&l<9?s.appendChild(L("span",[v])):s.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var g=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=s.appendChild(L("span",$(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((g=s.appendChild(L("span","\r"==h[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&l<9?s.appendChild(L("span",[g])):s.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),a&&l<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||o||d||i||u){var w=r||"";n&&(w+=n),o&&(w+=o);var _=L("span",[s],w,i);if(u)for(var x in u)u.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&_.setAttribute(x,u[x]);return e.content.appendChild(_)}e.content.appendChild(s)}}function yr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!r||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i="\xa0"),n+=i,r=" "==i}return n}function br(e,t){return function(r,n,o,i,a,l,u){o=o?o+" cm-force-border":"cm-force-border";for(var s=r.pos,c=s+n.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>s&&f.from<=s);d++);if(f.to>=c)return e(r,n,o,i,a,l,u);e(r,n.slice(0,f.to-s),o,i,null,l,u),i=null,n=n.slice(f.to-s),s=f.to}}}function wr(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function _r(e,t,r){var n=e.markedSpans,o=e.text,i=0;if(n)for(var a,l,u,s,c,f,d,p=o.length,h=0,m=1,v="",g=0;;){if(g==h){u=s=c=l="",d=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var _=n[w],x=_.marker;if("bookmark"==x.type&&_.from==h&&x.widgetNode)y.push(x);else if(_.from<=h&&(null==_.to||_.to>h||x.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&g>_.to&&(g=_.to,s=""),x.className&&(u+=" "+x.className),x.css&&(l=(l?l+";":"")+x.css),x.startStyle&&_.from==h&&(c+=" "+x.startStyle),x.endStyle&&_.to==g&&(b||(b=[])).push(x.endStyle,_.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var S in x.attributes)(d||(d={}))[S]=x.attributes[S];x.collapsed&&(!f||Yt(f.marker,x)<0)&&(f=_)}else _.from>h&&g>_.from&&(g=_.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==g&&(s+=" "+b[k]);if(!f||f.from==h)for(var O=0;O<y.length;++O)wr(t,0,y[O]);if(f&&(f.from||0)==h){if(wr(t,(null==f.to?p+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=p)break;for(var E=Math.min(p,g);;){if(v){var C=h+v.length;if(!f){var j=C>E?v.slice(0,E-h):v;t.addToken(t,j,a?a+u:u,c,h+j.length==g?s:"",l,d)}if(C>=E){v=v.slice(E-h),h=E;break}h=C,c=""}v=o.slice(i,i=r[m++]),a=hr(r[m++],t.cm.options)}}else for(var P=1;P<r.length;P+=2)t.addToken(t,o.slice(i,i=r[P]),hr(r[P+1],t.cm.options))}function xr(e,t,r){this.line=t,this.rest=tr(t),this.size=this.rest?rt(Q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=or(e,t)}function Sr(e,t,r){for(var n,o=[],i=t;i<r;i=n){var a=new xr(e.doc,Xe(e.doc,i),i);n=i+a.size,o.push(a)}return o}var kr=null;function Or(e){kr?kr.ops.push(e):e.ownsGroup=kr={ops:[e],delayedCallbacks:[]}}function Er(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(r<t.length)}function Cr(e,t){var r=e.ownsGroup;if(r)try{Er(r)}finally{kr=null,t(r)}}var jr=null;function Pr(e,t){var r=ve(e,t);if(r.length){var n,o=Array.prototype.slice.call(arguments,2);kr?n=kr.delayedCallbacks:jr?n=jr:(n=jr=[],setTimeout(Lr,0));for(var i=function(e){n.push((function(){return r[e].apply(null,o)}))},a=0;a<r.length;++a)i(a)}}function Lr(){var e=jr;jr=null;for(var t=0;t<e.length;++t)e[t]()}function Mr(e,t,r,n){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?Rr(e,t):"gutter"==i?Dr(e,t,r,n):"class"==i?Nr(e,t):"widget"==i&&zr(e,t,n)}t.changes=null}function Ar(e){return e.node==e.text&&(e.node=L("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function Tr(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Ar(t);t.background=n.insertBefore(L("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ir(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):mr(e,t)}function Rr(e,t){var r=t.text.className,n=Ir(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Nr(e,t)):r&&(t.text.className=r)}function Nr(e,t){Tr(e,t),t.line.wrapClass?Ar(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Dr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Ar(t);t.gutterBackground=L("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=Ar(t),l=t.gutter=L("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(L("div",it(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var u=0;u<e.display.gutterSpecs.length;++u){var s=e.display.gutterSpecs[u].className,c=i.hasOwnProperty(s)&&i[s];c&&l.appendChild(L("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[s]+"px; width: "+n.gutterWidth[s]+"px"))}}}function zr(e,t,r){t.alignable&&(t.alignable=null);for(var n=O("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);Br(e,t,r)}function Fr(e,t,r,n){var o=Ir(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Nr(e,t),Dr(e,t,r,n),Br(e,t,n),t.node}function Br(e,t,r){if(Hr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Hr(e,t.rest[n],t,r,!1)}function Hr(e,t,r,n,o){if(t.widgets)for(var i=Ar(r),a=0,l=t.widgets;a<l.length;++a){var u=l[a],s=L("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||s.setAttribute("cm-ignore-events","true"),Ur(u,s,r,n),e.display.input.setUneditable(s),o&&u.above?i.insertBefore(s,r.gutter||r.text):i.appendChild(s),Pr(u,"redraw")}}function Ur(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Wr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!A(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),P(t.display.measure,L("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Vr(e,t){for(var r=Ce(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function qr(e){return e.lineSpace.offsetTop}function Gr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Yr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=P(e.measure,L("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Kr(e){return U-e.display.nativeBarWidth}function $r(e){return e.display.scroller.clientWidth-Kr(e)-e.display.barWidth}function Qr(e){return e.display.scroller.clientHeight-Kr(e)-e.display.barHeight}function Zr(e,t,r){var n=e.options.lineWrapping,o=n&&$r(e);if(!t.measure.heights||n&&t.measure.width!=o){var i=t.measure.heights=[];if(n){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var u=a[l],s=a[l+1];Math.abs(u.bottom-s.bottom)>2&&i.push((u.bottom+s.top)/2-r.top)}}i.push(r.bottom-r.top)}}function Xr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(rt(e.rest[o])>r)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Jr(e,t){var r=rt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var o=n.built=mr(e,n);return n.text=o.pre,P(e.display.lineMeasure,o.pre),n}function en(e,t,r,n){return nn(e,rn(e,t),r,n)}function tn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Dn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function rn(e,t){var r=rt(t),n=tn(e,r);n&&!n.text?n=null:n&&n.changes&&(Mr(e,n,r,An(e)),e.curOp.forceUpdate=!0),n||(n=Jr(e,t));var o=Xr(n,t,r);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function nn(e,t,r,n,o){t.before&&(r=-1);var i,a=r+(n||"");return t.cache.hasOwnProperty(a)?i=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zr(e,t.view,t.rect),t.hasHeights=!0),(i=sn(e,t,r,n)).bogus||(t.cache[a]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var on,an={left:0,right:0,top:0,bottom:0};function ln(e,t,r){for(var n,o,i,a,l,u,s=0;s<e.length;s+=3)if(l=e[s],u=e[s+1],t<l?(o=0,i=1,a="left"):t<u?i=1+(o=t-l):(s==e.length-3||t==u&&e[s+3]>t)&&(o=(i=u-l)-1,t>=u&&(a="right")),null!=o){if(n=e[s+2],l==u&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)n=e[2+(s-=3)],a="left";if("right"==r&&o==u-l)for(;s<e.length-3&&e[s+3]==e[s+4]&&!e[s+5].insertLeft;)n=e[(s+=3)+2],a="right";break}return{node:n,start:o,end:i,collapse:a,coverStart:l,coverEnd:u}}function un(e,t){var r=an;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var o=e.length-1;o>=0&&(r=e[o]).left==r.right;o--);return r}function sn(e,t,r,n){var o,i=ln(t.map,r,n),u=i.node,s=i.start,c=i.end,f=i.collapse;if(3==u.nodeType){for(var d=0;d<4;d++){for(;s&&ae(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+c<i.coverEnd&&ae(t.line.text.charAt(i.coverStart+c));)++c;if((o=a&&l<9&&0==s&&c==i.coverEnd-i.coverStart?u.parentNode.getBoundingClientRect():un(E(u,s,c).getClientRects(),n)).left||o.right||0==s)break;c=s,s-=1,f="right"}a&&l<11&&(o=cn(e.display.measure,o))}else{var p;s>0&&(f=n="right"),o=e.options.lineWrapping&&(p=u.getClientRects()).length>1?p["right"==n?p.length-1:0]:u.getBoundingClientRect()}if(a&&l<9&&!s&&(!o||!o.left&&!o.right)){var h=u.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+Mn(e.display),top:h.top,bottom:h.bottom}:an}for(var m=o.top-t.rect.top,v=o.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(g<y[b]);b++);var w=b?y[b-1]:0,_=y[b],x={left:("right"==f?o.right:o.left)-t.rect.left,right:("left"==f?o.left:o.right)-t.rect.left,top:w,bottom:_};return o.left||o.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=m,x.rbottom=v),x}function cn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Fe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function dn(e){e.display.externalMeasure=null,j(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)fn(e.display.view[t])}function pn(e){dn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function hn(){return c&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mn(){return c&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function vn(e){var t=Jt(e).widgets,r=0;if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=Wr(t[n]));return r}function gn(e,t,r,n,o){if(!o){var i=vn(t);r.top+=i,r.bottom+=i}if("line"==n)return r;n||(n="local");var a=ar(t);if("local"==n?a+=qr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:mn());var u=l.left+("window"==n?0:hn());r.left+=u,r.right+=u}return r.top+=a,r.bottom+=a,r}function yn(e,t,r){if("div"==r)return t;var n=t.left,o=t.top;if("page"==r)n-=hn(),o-=mn();else if("local"==r||!r){var i=e.display.sizer.getBoundingClientRect();n+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:o-a.top}}function bn(e,t,r,n,o){return n||(n=Xe(e.doc,t.line)),gn(e,n,en(e,n,t.ch,o),r)}function wn(e,t,r,n,o,i){function a(t,a){var l=nn(e,o,t,a?"right":"left",i);return a?l.left=l.right:l.right=l.left,gn(e,n,l,r)}n=n||Xe(e.doc,t.line),o||(o=rn(e,n));var l=pe(n,e.doc.direction),u=t.ch,s=t.sticky;if(u>=n.text.length?(u=n.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return a("before"==s?u-1:u,"before"==s);function c(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var f=fe(l,u,s),d=ce,p=c(u,f,"before"==s);return null!=d&&(p.other=c(u,d,"before"!=s)),p}function _n(e,t){var r=0;t=pt(e.doc,t),e.options.lineWrapping||(r=Mn(e.display)*t.ch);var n=Xe(e.doc,t.line),o=ar(n)+qr(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function xn(e,t,r,n,o){var i=at(e,t,r);return i.xRel=o,n&&(i.outside=n),i}function Sn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var o=nt(n,r),i=n.first+n.size-1;if(o>i)return xn(n.first+n.size-1,Xe(n,i).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(n,o);;){var l=Cn(e,a,o,t,r),u=Zt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==o)return s;a=Xe(n,o=s.line)}}function kn(e,t,r,n){n-=vn(t);var o=t.text.length,i=ue((function(t){return nn(e,r,t-1).bottom<=n}),o,0);return{begin:i,end:o=ue((function(t){return nn(e,r,t).top>n}),i,o)}}function On(e,t,r,n){return r||(r=rn(e,t)),kn(e,t,r,gn(e,t,nn(e,r,n),"line").top)}function En(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Cn(e,t,r,n,o){o-=ar(t);var i=rn(e,t),a=vn(t),l=0,u=t.text.length,s=!0,c=pe(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Pn:jn)(e,t,r,i,c,n,o);l=(s=1!=f.level)?f.from:f.to-1,u=s?f.to:f.from-1}var d,p,h=null,m=null,v=ue((function(t){var r=nn(e,i,t);return r.top+=a,r.bottom+=a,!!En(r,n,o,!1)&&(r.top<=o&&r.left<=n&&(h=t,m=r),!0)}),l,u),g=!1;if(m){var y=n-m.left<m.right-n,b=y==s;v=h+(b?0:1),p=b?"after":"before",d=y?m.left:m.right}else{s||v!=u&&v!=l||v++,p=0==v?"after":v==t.text.length?"before":nn(e,i,v-(s?1:0)).bottom+a<=o==s?"after":"before";var w=wn(e,at(r,v,p),"line",t,i);d=w.left,g=o<w.top?-1:o>=w.bottom?1:0}return xn(r,v=le(t.text,v,1),p,g,n-d)}function jn(e,t,r,n,o,i,a){var l=ue((function(l){var u=o[l],s=1!=u.level;return En(wn(e,at(r,s?u.to:u.from,s?"before":"after"),"line",t,n),i,a,!0)}),0,o.length-1),u=o[l];if(l>0){var s=1!=u.level,c=wn(e,at(r,s?u.from:u.to,s?"after":"before"),"line",t,n);En(c,i,a,!0)&&c.top>a&&(u=o[l-1])}return u}function Pn(e,t,r,n,o,i,a){var l=kn(e,t,n,a),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,f=null,d=0;d<o.length;d++){var p=o[d];if(!(p.from>=s||p.to<=u)){var h=nn(e,n,1!=p.level?Math.min(s,p.to)-1:Math.max(u,p.from)).right,m=h<i?i-h+1e9:h-i;(!c||f>m)&&(c=p,f=m)}}return c||(c=o[o.length-1]),c.from<u&&(c={from:u,to:c.to,level:c.level}),c.to>s&&(c={from:c.from,to:s,level:c.level}),c}function Ln(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==on){on=L("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)on.appendChild(document.createTextNode("x")),on.appendChild(L("br"));on.appendChild(document.createTextNode("x"))}P(e.measure,on);var r=on.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),j(e.measure),r||1}function Mn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),r=L("pre",[t],"CodeMirror-line-like");P(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function An(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=i.offsetLeft+i.clientLeft+o,n[l]=i.clientWidth}return{fixedPos:Tn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Tn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function In(e){var t=Ln(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Mn(e.display)-3);return function(o){if(or(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return r?i+(Math.ceil(o.text.length/n)||1)*t:i+t}}function Rn(e){var t=e.doc,r=In(e);t.iter((function(e){var t=r(e);t!=e.height&&tt(e,t)}))}function Nn(e,t,r,n){var o=e.display;if(!r&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var i,a,l=o.lineSpace.getBoundingClientRect();try{i=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var u,s=Sn(e,i,a);if(n&&s.xRel>0&&(u=Xe(e.doc,s.line).text).length==s.ch){var c=F(u,u.length,e.options.tabSize)-u.length;s=at(s.line,Math.max(0,Math.round((i-Yr(e.display).left)/Mn(e.display))-c))}return s}function Dn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function zn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&r<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Mt&&rr(e.doc,t)<o.viewTo&&Bn(e);else if(r<=o.viewFrom)Mt&&nr(e.doc,r+n)>o.viewFrom?Bn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)Bn(e);else if(t<=o.viewFrom){var i=Hn(e,r,r+n,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=n):Bn(e)}else if(r>=o.viewTo){var a=Hn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Bn(e)}else{var l=Hn(e,t,t,-1),u=Hn(e,r,r+n,1);l&&u?(o.view=o.view.slice(0,l.index).concat(Sr(e,l.lineN,u.lineN)).concat(o.view.slice(u.index)),o.viewTo+=n):Bn(e)}var s=o.externalMeasured;s&&(r<s.lineN?s.lineN+=n:t<s.lineN+s.size&&(o.externalMeasured=null))}function Fn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var i=n.view[Dn(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==H(a,r)&&a.push(r)}}}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hn(e,t,r,n){var o,i=Dn(e,t),a=e.display.view;if(!Mt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u<i;u++)l+=a[u].size;if(l!=t){if(n>0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;rr(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Un(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Sr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Sr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Dn(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Sr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Dn(e,r)))),n.viewTo=r}function Wn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var o=t[n];o.hidden||o.node&&!o.changes||++r}return r}function Vn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function qn(e,t){void 0===t&&(t=!0);var r=e.doc,n={},o=n.cursors=document.createDocumentFragment(),i=n.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var u=r.sel.ranges[l];if(!(u.from().line>=e.display.viewTo||u.to().line<e.display.viewFrom)){var s=u.empty();if(a){var c=a(e,u);c&&Gn(e,c,o)}else(s||e.options.showCursorWhenSelecting)&&Gn(e,u.head,o);s||Kn(e,u,i)}}return n}function Gn(e,t,r){var n=wn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(L("div","\xa0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var i=bn(e,t,"div",null,null),a=i.right-i.left;o.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(L("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Yn(e,t){return e.top-t.top||e.left-t.left}function Kn(e,t,r){var n=e.display,o=e.doc,i=document.createDocumentFragment(),a=Yr(e.display),l=a.left,u=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-a.right,s="ltr"==o.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(L("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?u-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var i,a,f=Xe(o,t),d=f.text.length;function p(r,n){return bn(e,at(t,r),"div",f,n)}function h(t,r,n){var o=On(e,f,null,t),i="ltr"==r==("after"==n)?"left":"right";return p("after"==n?o.begin:o.end-(/\s/.test(f.text.charAt(o.end-1))?2:1),i)[i]}var m=pe(f,o.direction);return se(m,r||0,null==n?d:n,(function(e,t,o,f){var v="ltr"==o,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,_=0==f,x=!m||f==m.length-1;if(y.top-g.top<=3){var S=(s?w:b)&&x,k=(s?b:w)&&_?l:(v?g:y).left,O=S?u:(v?y:g).right;c(k,g.top,O-k,g.bottom)}else{var E,C,j,P;v?(E=s&&b&&_?l:g.left,C=s?u:h(e,o,"before"),j=s?l:h(t,o,"after"),P=s&&w&&x?u:y.right):(E=s?h(e,o,"before"):l,C=!s&&b&&_?u:g.right,j=!s&&w&&x?l:y.left,P=s?h(t,o,"after"):u),c(E,g.top,C-E,g.bottom),g.bottom<y.top&&c(l,g.bottom,null,y.top),c(j,y.top,P-j,y.bottom)}(!i||Yn(g,i)<0)&&(i=g),Yn(y,i)<0&&(i=y),(!a||Yn(g,a)<0)&&(a=g),Yn(y,a)<0&&(a=y)})),{start:i,end:a}}var d=t.from(),p=t.to();if(d.line==p.line)f(d.line,d.ch,p.ch);else{var h=Xe(o,d.line),m=Xe(o,p.line),v=Jt(h)==Jt(m),g=f(d.line,d.ch,v?h.text.length+1:null).end,y=f(p.line,v?0:null,p.ch).start;v&&(g.top<y.top-2?(c(g.right,g.top,null,g.bottom),c(l,y.top,y.left,y.bottom)):c(g.right,g.top,y.left-g.right,g.bottom)),g.bottom<y.top&&c(l,g.bottom,null,y.top)}r.appendChild(i)}function $n(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xn(e))}function Zn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Xn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function eo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,u=0;u<t.view.length;u++){var s=t.view[u],c=e.options.lineWrapping,f=void 0,d=0;if(!s.hidden){if(o+=s.line.height,a&&l<8){var p=s.node.offsetTop+s.node.offsetHeight;f=p-r,r=p}else{var h=s.node.getBoundingClientRect();f=h.bottom-h.top,!c&&s.text.firstChild&&(d=s.text.firstChild.getBoundingClientRect().right-h.left-1)}var m=s.line.height-f;if((m>.005||m<-.005)&&(o<n&&(i-=m),tt(s.line,f),to(s.line),s.rest))for(var v=0;v<s.rest.length;v++)to(s.rest[v]);if(d>e.display.sizerWidth){var g=Math.ceil(d/Mn(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function to(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ro(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-qr(e));var o=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,i=nt(t,n),a=nt(t,o);if(r&&r.ensure){var l=r.ensure.from.line,u=r.ensure.to.line;l<i?(i=l,a=nt(t,ar(Xe(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=a&&(i=nt(t,ar(Xe(t,u))-e.wrapper.clientHeight),a=u)}return{from:i,to:Math.max(a,i+1)}}function no(e,t){if(!be(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var i=L("div","\u200b",null,"position: absolute;\n top: "+(t.top-r.viewOffset-qr(e.display))+"px;\n height: "+(t.bottom-t.top+Kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function oo(e,t,r,n){var o;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?at(t.line,t.ch+1,"before"):t,t=t.ch?at(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,l=wn(e,t),u=r&&r!=t?wn(e,r):l,s=ao(e,o={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=s.scrollTop&&(ho(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=s.scrollLeft&&(vo(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}function io(e,t){var r=ao(e,t);null!=r.scrollTop&&ho(e,r.scrollTop),null!=r.scrollLeft&&vo(e,r.scrollLeft)}function ao(e,t){var r=e.display,n=Ln(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,i=Qr(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Gr(r),u=t.top<n,s=t.bottom>l-n;if(t.top<o)a.scrollTop=u?0:t.top;else if(t.bottom>o+i){var c=Math.min(t.top,(s?l:t.bottom)-i);c!=o&&(a.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,p=$r(e)-r.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+f-(h?0:10)):t.right>p+d-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function lo(e,t){null!=t&&(fo(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function uo(e){fo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function so(e,t,r){null==t&&null==r||fo(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function co(e,t){fo(e),e.curOp.scrollToPos=t}function fo(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,po(e,_n(e,t.from),_n(e,t.to),t.margin))}function po(e,t,r,n){var o=ao(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});so(e,o.scrollLeft,o.scrollTop)}function ho(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||qo(e,{top:t}),mo(e,t,!0),r&&qo(e),Do(e,100))}function mo(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vo(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,$o(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function go(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Gr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var yo=function(e,t,r){this.cm=r;var n=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),me(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),me(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},yo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yo.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},yo.prototype.enableZeroWidthBar=function(e,t,r){function n(){var o=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},yo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bo=function(){};function wo(e,t){t||(t=go(e));var r=e.display.barWidth,n=e.display.barHeight;_o(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&eo(e),_o(e,go(e)),r=e.display.barWidth,n=e.display.barHeight}function _o(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}bo.prototype.update=function(){return{bottom:0,right:0}},bo.prototype.setScrollLeft=function(){},bo.prototype.setScrollTop=function(){},bo.prototype.clear=function(){};var xo={native:yo,null:bo};function So(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xo[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?vo(e,t):ho(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var ko=0;function Oo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ko,markArrays:null},Or(e.curOp)}function Eo(e){var t=e.curOp;t&&Cr(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Co(e)}))}function Co(e){for(var t=e.ops,r=0;r<t.length;r++)jo(t[r]);for(var n=0;n<t.length;n++)Po(t[n]);for(var o=0;o<t.length;o++)Lo(t[o]);for(var i=0;i<t.length;i++)Mo(t[i]);for(var a=0;a<t.length;a++)Ao(t[a])}function jo(e){var t=e.cm,r=t.display;Bo(t),e.updateMaxLine&&ur(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Fo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Po(e){e.updatedDisplay=e.mustUpdate&&Wo(e.cm,e.update)}function Lo(e){var t=e.cm,r=t.display;e.updatedDisplay&&eo(t),e.barMeasure=go(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=en(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Mo(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&vo(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==T();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&wo(t,e.barMeasure),e.updatedDisplay&&Ko(t,e.barMeasure),e.selectionChanged&&$n(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Qn(e.cm)}function Ao(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&Vo(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&mo(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&vo(t,e.scrollLeft,!0,!0),e.scrollToPos&&no(t,oo(t,pt(n,e.scrollToPos.from),pt(n,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(i)for(var l=0;l<i.length;++l)i[l].lines.length&&ye(i[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function To(e,t){if(e.curOp)return t();Oo(e);try{return t()}finally{Eo(e)}}function Io(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Oo(e);try{return t.apply(e,arguments)}finally{Eo(e)}}}function Ro(e){return function(){if(this.curOp)return e.apply(this,arguments);Oo(this);try{return e.apply(this,arguments)}finally{Eo(this)}}}function No(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Oo(t);try{return e.apply(this,arguments)}finally{Eo(t)}}}function Do(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,D(zo,e))}function zo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=wt(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(n.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?Ke(t.mode,n.state):null,u=yt(e,i,n,!0);l&&(n.state=l),i.styles=u.styles;var s=i.styleClasses,c=u.classes;c?i.styleClasses=c:s&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),d=0;!f&&d<a.length;++d)f=a[d]!=i.styles[d];f&&o.push(n.line),i.stateAfter=n.save(),n.nextLine()}else i.text.length<=e.options.maxHighlightLength&&_t(e,i.text,n),i.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Do(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&To(e,(function(){for(var t=0;t<o.length;t++)Fn(e,o[t],"text")}))}}var Fo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ro(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=$r(e),this.force=r,this.dims=An(e),this.events=[]};function Bo(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kr(e)+"px",t.scrollbarsClipped=!0)}function Ho(e){if(e.hasFocus())return null;var t=T();if(!t||!A(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&A(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Uo(e){if(e&&e.activeElt&&e.activeElt!=T()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Wo(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Bn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Wn(e))return!1;Qo(e)&&(Bn(e),t.dims=An(e));var o=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFrom<i&&i-r.viewFrom<20&&(i=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),Mt&&(i=rr(e.doc,i),a=nr(e.doc,a));var l=i!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Un(e,i,a),r.viewOffset=ar(Xe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=Wn(e);if(!l&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var s=Ho(e);return u>4&&(r.lineDiv.style.display="none"),Go(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Uo(s),j(r.cursorDiv),j(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Do(e,400)),r.updateLineNumbers=null,!0}function Vo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ro(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Gr(e.display)-Qr(e),r.top)}),t.visible=ro(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Wo(e,t))break;eo(e);var o=go(e);Vn(e),wo(e,o),Ko(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qo(e,t){var r=new Fo(e,t);if(Wo(e,r)){eo(e),Vo(e,r);var n=go(e);Vn(e),wo(e,n),Ko(e,n),r.finish()}}function Go(e,t,r){var n=e.display,o=e.options.lineNumbers,i=n.lineDiv,a=i.firstChild;function l(t){var r=t.nextSibling;return u&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var s=n.view,c=n.viewFrom,f=0;f<s.length;f++){var d=s[f];if(d.hidden);else if(d.node&&d.node.parentNode==i){for(;a!=d.node;)a=l(a);var p=o&&null!=t&&t<=c&&d.lineNumber;d.changes&&(H(d.changes,"gutter")>-1&&(p=!1),Mr(e,d,c,r)),p&&(j(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),a=d.node.nextSibling}else{var h=Fr(e,d,c,r);i.insertBefore(h,a)}c+=d.size}for(;a;)a=l(a)}function Yo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Pr(e,"gutterChanged",e)}function Ko(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kr(e)+"px"}function $o(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Tn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=i),r[a].gutterBackground&&(r[a].gutterBackground.style.left=i));var l=r[a].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Qo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=it(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var o=n.measure.appendChild(L("div",[L("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(i,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Yo(e.display),!0}return!1}function Zo(e,t){for(var r=[],n=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;n=!0}r.push({className:i,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Xo(e){var t=e.gutters,r=e.gutterSpecs;j(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var o=r[n],i=o.className,a=o.style,l=t.appendChild(L("div",null,"CodeMirror-gutter "+i));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Yo(e)}function Jo(e){Xo(e.display),zn(e),$o(e)}function ei(e,t,n,o){var i=this;this.input=n,i.scrollbarFiller=L("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=L("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=M("div",null,"CodeMirror-code"),i.selectionDiv=L("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=L("div",null,"CodeMirror-cursors"),i.measure=L("div",null,"CodeMirror-measure"),i.lineMeasure=L("div",null,"CodeMirror-measure"),i.lineSpace=M("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var s=M("div",[i.lineSpace],"CodeMirror-lines");i.mover=L("div",[s],null,"position: relative"),i.sizer=L("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=L("div",null,null,"position: absolute; height: "+U+"px; width: 1px;"),i.gutters=L("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=L("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=L("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),i.wrapper.setAttribute("translate","no"),a&&l<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),u||r&&y||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Zo(o.gutters,o.lineNumbers),Xo(i),n.init(i)}Fo.prototype.signal=function(e,t){_e(e,t)&&this.events.push(arguments)},Fo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var ti=0,ri=null;function ni(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function oi(e){var t=ni(e);return t.x*=ri,t.y*=ri,t}function ii(e,t){c&&f>=102&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=ni(t),o=n.x,i=n.y,a=ri;0===t.deltaMode&&(o=t.deltaX,i=t.deltaY,a=1);var l=e.display,s=l.scroller,p=s.scrollWidth>s.clientWidth,h=s.scrollHeight>s.clientHeight;if(o&&p||i&&h){if(i&&b&&u)e:for(var m=t.target,v=l.view;m!=s;m=m.parentNode)for(var g=0;g<v.length;g++)if(v[g].node==m){e.display.currentWheelTarget=m;break e}if(o&&!r&&!d&&null!=a)return i&&h&&ho(e,Math.max(0,s.scrollTop+i*a)),vo(e,Math.max(0,s.scrollLeft+o*a)),(!i||i&&h)&&Se(t),void(l.wheelStartX=null);if(i&&null!=a){var y=i*a,w=e.doc.scrollTop,_=w+l.wrapper.clientHeight;y<0?w=Math.max(0,w+y-50):_=Math.min(e.doc.height,_+y+50),qo(e,{top:w,bottom:_})}ti<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=o,l.wheelDY=i,setTimeout((function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(ri=(ri*ti+r)/(ti+1),++ti)}}),200)):(l.wheelDX+=o,l.wheelDY+=i))}}a?ri=-.53:r?ri=15:c?ri=-.7:p&&(ri=-1/3);var ai=function(e,t){this.ranges=e,this.primIndex=t};ai.prototype.primary=function(){return this.ranges[this.primIndex]},ai.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ut(r.anchor,n.anchor)||!ut(r.head,n.head))return!1}return!0},ai.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new li(st(this.ranges[t].anchor),st(this.ranges[t].head));return new ai(e,this.primIndex)},ai.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ai.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(lt(t,n.from())>=0&<(e,n.to())<=0)return r}return-1};var li=function(e,t){this.anchor=e,this.head=t};function ui(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=H(t,o);for(var i=1;i<t.length;i++){var a=t[i],l=t[i-1],u=lt(l.to(),a.from());if(n&&!a.empty()?u>0:u>=0){var s=ft(l.from(),a.from()),c=ct(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;i<=r&&--r,t.splice(--i,2,new li(f?c:s,f?s:c))}}return new ai(t,r)}function si(e,t){return new ai([new li(e,t||e)],0)}function ci(e){return e.text?at(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function fi(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return ci(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ci(t).ch-t.to.ch),at(r,n)}function di(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];r.push(new li(fi(o.anchor,t),fi(o.head,t)))}return ui(e.cm,r,e.sel.primIndex)}function pi(e,t,r){return e.line==t.line?at(r.line,e.ch-t.ch+r.ch):at(r.line+(e.line-t.line),e.ch)}function hi(e,t,r){for(var n=[],o=at(e.first,0),i=o,a=0;a<t.length;a++){var l=t[a],u=pi(l.from,o,i),s=pi(ci(l),o,i);if(o=l.to,i=s,"around"==r){var c=e.sel.ranges[a],f=lt(c.head,c.anchor)<0;n[a]=new li(f?s:u,f?u:s)}else n[a]=new li(u,u)}return new ai(n,e.sel.primIndex)}function mi(e){e.doc.mode=qe(e.options,e.doc.modeOption),vi(e)}function vi(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Do(e,100),e.state.modeGen++,e.curOp&&zn(e)}function gi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function yi(e,t,r,n){function o(e){return r?r[e]:null}function i(e,r,o){cr(e,r,o,n),Pr(e,"change",e,t)}function a(e,t){for(var r=[],i=e;i<t;++i)r.push(new sr(s[i],o(i),n));return r}var l=t.from,u=t.to,s=t.text,c=Xe(e,l.line),f=Xe(e,u.line),d=Q(s),p=o(s.length-1),h=u.line-l.line;if(t.full)e.insert(0,a(0,s.length)),e.remove(s.length,e.size-s.length);else if(gi(e,t)){var m=a(0,s.length-1);i(f,f.text,p),h&&e.remove(l.line,h),m.length&&e.insert(l.line,m)}else if(c==f)if(1==s.length)i(c,c.text.slice(0,l.ch)+d+c.text.slice(u.ch),p);else{var v=a(1,s.length-1);v.push(new sr(d+c.text.slice(u.ch),p,n)),i(c,c.text.slice(0,l.ch)+s[0],o(0)),e.insert(l.line+1,v)}else if(1==s.length)i(c,c.text.slice(0,l.ch)+s[0]+f.text.slice(u.ch),o(0)),e.remove(l.line+1,h);else{i(c,c.text.slice(0,l.ch)+s[0],o(0)),i(f,d+f.text.slice(u.ch),p);var g=a(1,s.length-1);h>1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}Pr(e,"change",e,t)}function bi(e,t,r){function n(e,o,i){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=o){var u=i&&l.sharedHist;r&&!u||(t(l.doc,u),n(l.doc,e,u))}}}n(e,null,!0)}function wi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Rn(e),mi(e),_i(e),e.options.direction=t.direction,e.options.lineWrapping||ur(e),e.options.mode=t.modeOption,zn(e)}function _i(e){("rtl"==e.doc.direction?I:C)(e.display.lineDiv,"CodeMirror-rtl")}function xi(e){To(e,(function(){_i(e),zn(e)}))}function Si(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function ki(e,t){var r={from:st(t.from),to:ci(t),text:Je(e,t.from,t.to)};return Mi(e,r,t.from.line,t.to.line+1),bi(e,(function(e){return Mi(e,r,t.from.line,t.to.line+1)}),!0),r}function Oi(e){for(;e.length&&Q(e).ranges;)e.pop()}function Ei(e,t){return t?(Oi(e.done),Q(e.done)):e.done.length&&!Q(e.done).ranges?Q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}function Ci(e,t,r,n){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=Ei(o,o.lastOp==n)))a=Q(i.changes),0==lt(t.from,t.to)&&0==lt(t.from,a.to)?a.to=ci(t):i.changes.push(ki(e,t));else{var u=Q(o.done);for(u&&u.ranges||Li(e.sel,o.done),i={changes:[ki(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function ji(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pi(e,t,r,n){var o=e.history,i=n&&n.origin;r==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||ji(e,i,Q(o.done),t))?o.done[o.done.length-1]=t:Li(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=r,n&&!1!==n.clearRedo&&Oi(o.undone)}function Li(e,t){var r=Q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Mi(e,t,r,n){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=r.markedSpans),++i}))}function Ai(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Ti(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(Ai(r[o]));return n}function Ii(e,t){var r=Ti(e,t),n=Bt(e,t);if(!r)return n;if(!n)return r;for(var o=0;o<r.length;++o){var i=r[o],a=n[o];if(i&&a)e:for(var l=0;l<a.length;++l){for(var u=a[l],s=0;s<i.length;++s)if(i[s].marker==u.marker)continue e;i.push(u)}else a&&(r[o]=a)}return r}function Ri(e,t,r){for(var n=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)n.push(r?ai.prototype.deepCopy.call(i):i);else{var a=i.changes,l=[];n.push({changes:l});for(var u=0;u<a.length;++u){var s=a[u],c=void 0;if(l.push({from:s.from,to:s.to,text:s.text}),t)for(var f in s)(c=f.match(/^spans_(\d+)$/))&&H(t,Number(c[1]))>-1&&(Q(l)[f]=s[f],delete s[f])}}}return n}function Ni(e,t,r,n){if(n){var o=e.anchor;if(r){var i=lt(t,o)<0;i!=lt(r,o)<0?(o=t,t=r):i!=lt(t,r)<0&&(t=r)}return new li(o,t)}return new li(r||t,t)}function Di(e,t,r,n,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Wi(e,new ai([Ni(e.sel.primary(),t,r,o)],0),n)}function zi(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)n[i]=Ni(e.sel.ranges[i],t[i],null,o);Wi(e,ui(e.cm,n,e.sel.primIndex),r)}function Fi(e,t,r,n){var o=e.sel.ranges.slice(0);o[t]=r,Wi(e,ui(e.cm,o,e.sel.primIndex),n)}function Bi(e,t,r,n){Wi(e,si(t,r),n)}function Hi(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new li(pt(e,t[r].anchor),pt(e,t[r].head))},origin:r&&r.origin};return ye(e,"beforeSelectionChange",e,n),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?ui(e.cm,n.ranges,n.ranges.length-1):t}function Ui(e,t,r){var n=e.history.done,o=Q(n);o&&o.ranges?(n[n.length-1]=t,Vi(e,t,r)):Wi(e,t,r)}function Wi(e,t,r){Vi(e,t,r),Pi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Vi(e,t,r){(_e(e,"beforeSelectionChange")||e.cm&&_e(e.cm,"beforeSelectionChange"))&&(t=Hi(e,t,r));var n=r&&r.bias||(lt(t.primary().head,e.sel.primary().head)<0?-1:1);qi(e,Yi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||uo(e.cm)}function qi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,we(e.cm)),Pr(e,"cursorActivity",e))}function Gi(e){qi(e,Yi(e,e.sel,null,!1))}function Yi(e,t,r,n){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],u=$i(e,a.anchor,l&&l.anchor,r,n),s=$i(e,a.head,l&&l.head,r,n);(o||u!=a.anchor||s!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new li(u,s))}return o?ui(e.cm,o,t.primIndex):t}function Ki(e,t,r,n,o){var i=Xe(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var l=i.markedSpans[a],u=l.marker,s="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,c="selectRight"in u?!u.selectRight:u.inclusiveRight;if((null==l.from||(s?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?l.to>=t.ch:l.to>t.ch))){if(o&&(ye(u,"beforeCursorEnter"),u.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!u.atomic)continue;if(r){var f=u.find(n<0?1:-1),d=void 0;if((n<0?c:s)&&(f=Qi(e,f,-n,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Ki(e,f,t,n,o)}var p=u.find(n<0?-1:1);return(n<0?s:c)&&(p=Qi(e,p,n,p.line==t.line?i:null)),p?Ki(e,p,t,n,o):null}}return t}function $i(e,t,r,n,o){var i=n||1,a=Ki(e,t,r,i,o)||!o&&Ki(e,t,r,i,!0)||Ki(e,t,r,-i,o)||!o&&Ki(e,t,r,-i,!0);return a||(e.cantEdit=!0,at(e.first,0))}function Qi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?pt(e,at(t.line-1)):null:r>0&&t.ch==(n||Xe(e,t.line)).text.length?t.line<e.first+e.size-1?at(t.line+1,0):null:new at(t.line,t.ch+r)}function Zi(e){e.setSelection(at(e.firstLine(),0),at(e.lastLine()),V)}function Xi(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,o,i){t&&(n.from=pt(e,t)),r&&(n.to=pt(e,r)),o&&(n.text=o),void 0!==i&&(n.origin=i)}),ye(e,"beforeChange",e,n),e.cm&&ye(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ji(e,t,r){if(e.cm){if(!e.cm.curOp)return Io(e.cm,Ji)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"))||(t=Xi(e,t,!0))){var n=Lt&&!r&&Ut(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)ea(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else ea(e,t)}}function ea(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=di(e,t);Ci(e,t,r,e.cm?e.cm.curOp.id:NaN),na(e,t,r,Bt(e,t));var n=[];bi(e,(function(e,r){r||-1!=H(n,e.history)||(ua(e.history,t),n.push(e.history)),na(e,t,null,Bt(e,t))}))}}function ta(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,u="undo"==t?i.undone:i.done,s=0;s<l.length&&(o=l[s],r?!o.ranges||o.equals(e.sel):o.ranges);s++);if(s!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=l.pop()).ranges){if(n)return void l.push(o);break}if(Li(o,u),r&&!o.equals(e.sel))return void Wi(e,o,{clearRedo:!1});a=o}var c=[];Li(a,u),u.push({changes:c,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var f=_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"),d=function(r){var n=o.changes[r];if(n.origin=t,f&&!Xi(e,n,!1))return l.length=0,{};c.push(ki(e,n));var i=r?di(e,n):Q(l);na(e,n,i,Ii(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:ci(n)});var a=[];bi(e,(function(e,t){t||-1!=H(a,e.history)||(ua(e.history,n),a.push(e.history)),na(e,n,null,Ii(e,n))}))},p=o.changes.length-1;p>=0;--p){var h=d(p);if(h)return h.v}}}}function ra(e,t){if(0!=t&&(e.first+=t,e.sel=new ai(Z(e.sel.ranges,(function(e){return new li(at(e.anchor.line+t,e.anchor.ch),at(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Fn(e.cm,n,"gutter")}}function na(e,t,r,n){if(e.cm&&!e.cm.curOp)return Io(e.cm,na)(e,t,r,n);if(t.to.line<e.first)ra(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);ra(e,o),t={from:at(e.first,0),to:at(t.to.line+o,t.to.ch),text:[Q(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:at(i,Xe(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=di(e,t)),e.cm?oa(e.cm,t,n):yi(e,t,n),Vi(e,r,V),e.cantEdit&&$i(e,at(e.firstLine(),0))&&(e.cantEdit=!1)}}function oa(e,t,r){var n=e.doc,o=e.display,i=t.from,a=t.to,l=!1,u=i.line;e.options.lineWrapping||(u=rt(Jt(Xe(n,i.line))),n.iter(u,a.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&we(e),yi(n,t,r,In(e)),e.options.lineWrapping||(n.iter(u,i.line+t.text.length,(function(e){var t=lr(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Pt(n,i.line),Do(e,400);var s=t.text.length-(a.line-i.line)-1;t.full?zn(e):i.line!=a.line||1!=t.text.length||gi(e.doc,t)?zn(e,i.line,a.line+1,s):Fn(e,i.line,"text");var c=_e(e,"changes"),f=_e(e,"change");if(f||c){var d={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Pr(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function ia(e,t,r,n,o){var i;n||(n=r),lt(n,r)<0&&(r=(i=[n,r])[0],n=i[1]),"string"==typeof t&&(t=e.splitLines(t)),Ji(e,{from:r,to:n,text:t,origin:o})}function aa(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function la(e,t,r,n){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var l=0;l<i.ranges.length;l++)aa(i.ranges[l].anchor,t,r,n),aa(i.ranges[l].head,t,r,n)}else{for(var u=0;u<i.changes.length;++u){var s=i.changes[u];if(r<s.from.line)s.from=at(s.from.line+n,s.from.ch),s.to=at(s.to.line+n,s.to.ch);else if(t<=s.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function ua(e,t){var r=t.from.line,n=t.to.line,o=t.text.length-(n-r)-1;la(e.done,r,n,o),la(e.undone,r,n,o)}function sa(e,t,r,n){var o=t,i=t;return"number"==typeof t?i=Xe(e,dt(e,t)):o=rt(t),null==o?null:(n(i,o)&&e.cm&&Fn(e.cm,o,r),i)}function ca(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function fa(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),r+=o.height,o.parent=this}this.size=t,this.height=r,this.parent=null}li.prototype.from=function(){return ft(this.anchor,this.head)},li.prototype.to=function(){return ct(this.anchor,this.head)},li.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var o=this.lines[r];this.height-=o.height,fr(o),Pr(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},fa.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<o){var i=Math.min(t,o-e),a=n.height;if(n.removeInner(e,i),this.height-=a-n.height,o==i&&(this.children.splice(r--,1),n.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var l=[];this.collapse(l),this.children=[new ca(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var u=new ca(o.lines.slice(l,l+=25));o.height-=u.height,this.children.splice(++n,0,u),u.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new fa(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=H(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new fa(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var o=this.children[n],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var da=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function pa(e,t,r){ar(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&lo(e,r)}function ha(e,t,r,n){var o=new da(e,r,n),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),sa(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==o.insertAt?r.push(o):r.splice(Math.min(r.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!or(e,t)){var n=ar(t)<e.scrollTop;tt(t,t.height+Wr(o)),n&&lo(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&Pr(i,"lineWidgetAdded",i,o,"number"==typeof t?t:rt(t)),o}da.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=rt(r);if(null!=n&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(r.widgets=null);var i=Wr(this);tt(r,Math.max(0,r.height-i)),e&&(To(e,(function(){pa(e,r,-i),Fn(e,n,"widget")})),Pr(e,"lineWidgetCleared",e,this,n))}},da.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var o=Wr(this)-t;o&&(or(this.doc,n)||tt(n,n.height+o),r&&To(r,(function(){r.curOp.forceUpdate=!0,pa(r,n,o),Pr(r,"lineWidgetChanged",r,e,rt(n))})))},xe(da);var ma=0,va=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};function ga(e,t,r,n,o){if(n&&n.shared)return ba(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return Io(e.cm,ga)(e,t,r,n,o);var i=new va(e,o),a=lt(t,r);if(n&&z(n,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=M("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Xt(e,t.line,t,r,i)||t.line!=r.line&&Xt(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt()}i.addToHistory&&Ci(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,r.line+1,(function(n){s&&i.collapsed&&!s.options.lineWrapping&&Jt(n)==s.display.maxLine&&(l=!0),i.collapsed&&u!=t.line&&tt(n,0),Dt(n,new It(i,u==t.line?t.ch:null,u==r.line?r.ch:null),e.cm&&e.cm.curOp),++u})),i.collapsed&&e.iter(t.line,r.line+1,(function(t){or(e,t)&&tt(t,0)})),i.clearOnEnter&&me(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(At(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ma,i.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),i.collapsed)zn(s,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var c=t.line;c<=r.line;c++)Fn(s,c,"text");i.atomic&&Gi(s.doc),Pr(s,"markerAdded",s,i)}return i}va.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Oo(e),_e(this,"clear")){var r=this.find();r&&Pr(this,"clear",r.from,r.to)}for(var n=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],l=Rt(a.markedSpans,this);e&&!this.collapsed?Fn(e,rt(a),"text"):e&&(null!=l.to&&(o=rt(a)),null!=l.from&&(n=rt(a))),a.markedSpans=Nt(a.markedSpans,l),null==l.from&&this.collapsed&&!or(this.doc,a)&&e&&tt(a,Ln(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var s=Jt(this.lines[u]),c=lr(s);c>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&zn(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gi(e.doc)),e&&Pr(e,"markerCleared",e,this,n,o),t&&Eo(e),this.parent&&this.parent.clear()}},va.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=Rt(i.markedSpans,this);if(null!=a.from&&(r=at(t?i:rt(i),a.from),-1==e))return r;if(null!=a.to&&(n=at(t?i:rt(i),a.to),1==e))return n}return r&&{from:r,to:n}},va.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&To(n,(function(){var o=t.line,i=rt(t.line),a=tn(n,i);if(a&&(fn(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!or(r.doc,o)&&null!=r.height){var l=r.height;r.height=null;var u=Wr(r)-l;u&&tt(o,o.height+u)}Pr(n,"markerChanged",n,e)}))},va.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=H(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},va.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(va);var ya=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function ba(e,t,r,n,o){(n=z(n)).shared=!1;var i=[ga(e,t,r,n,o)],a=i[0],l=n.widgetNode;return bi(e,(function(e){l&&(n.widgetNode=l.cloneNode(!0)),i.push(ga(e,pt(e,t),pt(e,r),n,o));for(var u=0;u<e.linked.length;++u)if(e.linked[u].isParent)return;a=Q(i)})),new ya(i,a)}function wa(e){return e.findMarks(at(e.first,0),e.clipPos(at(e.lastLine())),(function(e){return e.parent}))}function _a(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(lt(i,a)){var l=ga(e,i,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function xa(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];bi(r.primary.doc,(function(e){return n.push(e)}));for(var o=0;o<r.markers.length;o++){var i=r.markers[o];-1==H(n,i.doc)&&(i.parent=null,r.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}ya.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Pr(this,"clear")}},ya.prototype.find=function(e,t){return this.primary.find(e,t)},xe(ya);var Sa=0,ka=function(e,t,r,n,o){if(!(this instanceof ka))return new ka(e,t,r,n,o);null==r&&(r=0),fa.call(this,[new ca([new sr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var i=at(r,0);this.sel=si(i),this.history=new Si(null),this.id=++Sa,this.modeOption=t,this.lineSep=n,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),yi(this,{from:i,to:i,text:e}),Wi(this,si(i),V)};ka.prototype=ee(fa.prototype,{constructor:ka,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=et(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:No((function(e){var t=at(this.first,0),r=this.first+this.size-1;Ji(this,{from:t,to:at(r,Xe(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&so(this.cm,0,0),Wi(this,si(t),V)})),replaceRange:function(e,t,r,n){ia(this,e,t=pt(this,t),r=r?pt(this,r):t,n)},getRange:function(e,t,r){var n=Je(this,pt(this,e),pt(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ot(this,e))return Xe(this,e)},getLineNumber:function(e){return rt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Xe(this,e)),Jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:No((function(e,t,r){Bi(this,pt(this,"number"==typeof e?at(e,t||0):e),null,r)})),setSelection:No((function(e,t,r){Bi(this,pt(this,e),pt(this,t||e),r)})),extendSelection:No((function(e,t,r){Di(this,pt(this,e),t&&pt(this,t),r)})),extendSelections:No((function(e,t){zi(this,mt(this,e),t)})),extendSelectionsBy:No((function(e,t){zi(this,mt(this,Z(this.sel.ranges,e)),t)})),setSelections:No((function(e,t,r){if(e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new li(pt(this,e[o].anchor),pt(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Wi(this,ui(this.cm,n,t),r)}})),addSelection:No((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new li(pt(this,e),pt(this,t||e))),Wi(this,ui(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var o=Je(this,r[n].from(),r[n].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var o=Je(this,r[n].from(),r[n].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,r){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:No((function(e,t,r){for(var n=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];n[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:r}}for(var l=t&&"end"!=t&&hi(this,n,t),u=n.length-1;u>=0;u--)Ji(this,n[u]);l?Ui(this,l):this.cm&&uo(this.cm)})),undo:No((function(){ta(this,"undo")})),redo:No((function(){ta(this,"redo")})),undoSelection:No((function(){ta(this,"undo",!0)})),redoSelection:No((function(){ta(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Si(this.history),bi(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ri(this.history.done),undone:Ri(this.history.undone)}},setHistory:function(e){var t=this.history=new Si(this.history);t.done=Ri(e.done.slice(0),null,!0),t.undone=Ri(e.undone.slice(0),null,!0)},setGutterMarker:No((function(e,t,r){return sa(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&oe(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:No((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&sa(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,oe(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!ot(this,e))return null;if(t=e,!(e=Xe(this,e)))return null}else if(null==(t=rt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:No((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(O(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:No((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[n];if(!o)return!1;if(null==r)e[n]=null;else{var i=o.match(O(r));if(!i)return!1;var a=i.index+i[0].length;e[n]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:No((function(e,t,r){return ha(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ga(this,pt(this,e),pt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ga(this,e=pt(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Xe(this,(e=pt(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var o=r[n];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=pt(this,e),t=pt(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;l++){var u=a[l];null!=u.to&&o==e.line&&e.ch>=u.to||null==u.from&&o!=e.line||null!=u.from&&o==t.line&&u.from>=t.ch||r&&!r(u.marker)||n.push(u.marker.parent||u.marker)}++o})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+n;if(i>e)return t=e,!0;e-=i,++r})),pt(this,at(r,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new ka(et(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ka(et(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_a(n,wa(this)),n},unlinkDoc:function(e){if(e instanceof zl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xa(wa(this));break}if(e.history==this.history){var r=[e.id];bi(e,(function(e){return r.push(e.id)}),!0),e.history=new Si(null),e.history.done=Ri(this.history.done,r),e.history.undone=Ri(this.history.undone,r)}},iterLinkedDocs:function(e){bi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Re(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:No((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&xi(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Oa=0;function Ea(e){var t=this;if(Pa(t),!be(t,e)&&!Vr(t.display,e)){Se(e),a&&(Oa=+new Date);var r=Nn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,i=Array(o),l=0,u=function(){++l==o&&Io(t,(function(){var e={from:r=pt(t.doc,r),to:r,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Ji(t.doc,e),Ui(t.doc,si(pt(t.doc,r),pt(t.doc,ci(e))))}))()},s=function(e,r){if(t.options.allowDropFileTypes&&-1==H(t.options.allowDropFileTypes,e.type))u();else{var n=new FileReader;n.onerror=function(){return u()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[r]=e),u()},n.readAsText(e)}},c=0;c<n.length;c++)s(n[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vi(t.doc,si(r,r)),d)for(var p=0;p<d.length;++p)ia(t.doc,"",d[p].anchor,d[p].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ca(e,t){if(a&&(!e.state.draggingText||+new Date-Oa<100))Ee(t);else if(!be(e,t)&&!Vr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var r=L("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}function ja(e,t){var r=Nn(e,t);if(r){var n=document.createDocumentFragment();Gn(e,r,n),e.display.dragCursor||(e.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),P(e.display.dragCursor,n)}}function Pa(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function La(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&r.push(o)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Ma=!1;function Aa(){Ma||(Ta(),Ma=!0)}function Ta(){var e;me(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,La(Ia)}),100))})),me(window,"blur",(function(){return La(Jn)}))}function Ia(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Ra={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Na=0;Na<10;Na++)Ra[Na+48]=Ra[Na+96]=String(Na);for(var Da=65;Da<=90;Da++)Ra[Da]=String.fromCharCode(Da);for(var za=1;za<=12;za++)Ra[za+111]=Ra[za+63235]="F"+za;var Fa={};function Ba(e){var t,r,n,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var l=i[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Ha(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var o=Z(r.split(" "),Ba),i=0;i<o.length;i++){var a=void 0,l=void 0;i==o.length-1?(l=o.join(" "),a=n):(l=o.slice(0,i+1).join(" "),a="...");var u=t[l];if(u){if(u!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var s in t)e[s]=t[s];return e}function Ua(e,t,r,n){var o=(t=Ga(t)).call?t.call(e,n):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ua(e,t.fallthrough,r,n);for(var i=0;i<t.fallthrough.length;i++){var a=Ua(e,t.fallthrough[i],r,n);if(a)return a}}}function Wa(e){var t="string"==typeof e?e:Ra[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Va(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(S?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(S?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function qa(e,t){if(d&&34==e.keyCode&&e.char)return!1;var r=Ra[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Va(r,e,t))}function Ga(e){return"string"==typeof e?Fa[e]:e}function Ya(e,t){for(var r=e.doc.sel.ranges,n=[],o=0;o<r.length;o++){for(var i=t(r[o]);n.length&<(i.from,Q(n).to)<=0;){var a=n.pop();if(lt(a.from,i.from)<0){i.from=a.from;break}}n.push(i)}To(e,(function(){for(var t=n.length-1;t>=0;t--)ia(e.doc,"",n[t].from,n[t].to,"+delete");uo(e)}))}function Ka(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $a(e,t,r){var n=Ka(e,t.ch,r);return null==n?null:new at(t.line,n,r<0?"after":"before")}function Qa(e,t,r,n,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=pe(r,t.doc.direction);if(i){var a,l=o<0?Q(i):i[0],u=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var s=rn(t,r);a=o<0?r.text.length-1:0;var c=nn(t,s,a).top;a=ue((function(e){return nn(t,s,e).top==c}),o<0==(1==l.level)?l.from:l.to-1,a),"before"==u&&(a=Ka(r,a,1))}else a=o<0?l.to:l.from;return new at(n,a,u)}}return new at(n,o<0?r.text.length:0,o<0?"before":"after")}function Za(e,t,r,n){var o=pe(t,e.doc.direction);if(!o)return $a(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var i=fe(o,r.ch,r.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return $a(t,r,n);var l,u=function(e,r){return Ka(t,e instanceof at?e.ch:e,r)},s=function(r){return e.options.lineWrapping?(l=l||rn(e,t),On(e,t,l,r)):{begin:0,end:t.text.length}},c=s("before"==r.sticky?u(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==n<0,d=u(r,f?1:-1);if(null!=d&&(f?d<=a.to&&d<=c.end:d>=a.from&&d>=c.begin)){var p=f?"before":"after";return new at(r.line,d,p)}}var h=function(e,t,n){for(var i=function(e,t){return t?new at(r.line,u(e,1),"before"):new at(r.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],l=t>0==(1!=a.level),s=l?n.begin:u(n.end,-1);if(a.from<=s&&s<a.to)return i(s,l);if(s=l?a.from:u(a.to,-1),n.begin<=s&&s<n.end)return i(s,l)}},m=h(i+n,n,c);if(m)return m;var v=n>0?c.end:u(c.begin,-1);return null==v||n>0&&v==t.text.length||!(m=h(n>0?0:o.length-1,n,s(v)))?null:m}Fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fa.default=b?Fa.macDefault:Fa.pcDefault;var Xa={selectAll:Zi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Ya(e,(function(t){if(t.empty()){var r=Xe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:at(t.head.line+1,0)}:{from:t.head,to:at(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ya(e,(function(t){return{from:at(t.from().line,0),to:pt(e.doc,at(t.to().line+1,0))}}))},delLineLeft:function(e){return Ya(e,(function(e){return{from:at(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ya(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ya(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(at(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(at(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Ja(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return tl(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return el(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),G)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),G)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?tl(e,t.head):n}),G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,o=0;o<r.length;o++){var i=r[o].from(),a=F(e.getLine(i.line),i.ch,n);t.push($(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return To(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var o=t[n].head,i=Xe(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new at(o.line,o.ch-1)),o.ch>0)o=new at(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),at(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Xe(e.doc,o.line-1).text;a&&(o=new at(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),at(o.line-1,a.length-1),o,"+transpose"))}r.push(new li(o,o))}e.setSelections(r)}))},newlineAndIndent:function(e){return To(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);uo(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ja(e,t){var r=Xe(e.doc,t),n=Jt(r);return n!=r&&(t=rt(n)),Qa(!0,e,n,t,1)}function el(e,t){var r=Xe(e.doc,t),n=er(r);return n!=r&&(t=rt(n)),Qa(!0,e,r,t,-1)}function tl(e,t){var r=Ja(e,t.line),n=Xe(e.doc,r.line),o=pe(n,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=i&&t.ch;return at(r.line,a?0:i,r.sticky)}return r}function rl(e,t,r){if("string"==typeof t&&!(t=Xa[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),o=t(e)!=W}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function nl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var o=Ua(t,e.state.keyMaps[n],r,e);if(o)return o}return e.options.extraKeys&&Ua(t,e.options.extraKeys,r,e)||Ua(t,e.options.keyMap,r,e)}var ol=new B;function il(e,t,r,n){var o=e.state.keySeq;if(o){if(Wa(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ol.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),al(e,o+" "+t,r,n))return!0}return al(e,t,r,n)}function al(e,t,r,n){var o=nl(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Pr(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(Se(r),$n(e)),!!o}function ll(e,t){var r=qa(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?il(e,"Shift-"+r,t,(function(t){return rl(e,t,!0)}))||il(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return rl(e,t)})):il(e,r,t,(function(t){return rl(e,t)})))}function ul(e,t,r){return il(e,"'"+r+"'",t,(function(t){return rl(e,t,!0)}))}var sl=null;function cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=T(),be(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var o=ll(t,e);d&&(sl=o?n:null,o||88!=n||De||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!o&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||fl(t)}}function fl(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(C(t,"CodeMirror-crosshair"),ge(document,"keyup",r),ge(document,"mouseover",r))}I(t,"CodeMirror-crosshair"),me(document,"keyup",r),me(document,"mouseover",r)}function dl(e){16==e.keyCode&&(this.doc.sel.shift=!1),be(this,e)}function pl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Vr(t.display,e)||be(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==sl)return sl=null,void Se(e);if(!d||e.which&&!(e.which<10)||!ll(t,e)){var o=String.fromCharCode(null==n?r:n);"\b"!=o&&(ul(t,e,o)||t.display.input.onKeyPress(e))}}}var hl,ml,vl=400,gl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function yl(e,t){var r=+new Date;return ml&&ml.compare(r,e,t)?(hl=ml=null,"triple"):hl&&hl.compare(r,e,t)?(ml=new gl(r,e,t),hl=null,"double"):(hl=new gl(r,e,t),ml=null,"single")}function bl(e){var t=this,r=t.display;if(!(be(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,Vr(r,e))u||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!jl(t,e)){var n=Nn(t,e),o=je(e),i=n?yl(n,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),n&&wl(t,o,n,i,e)||(1==o?n?xl(t,n,i,e):Ce(e)==r.scroller&&Se(e):2==o?(n&&Di(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==o&&(k?t.display.input.onContextMenu(e):Zn(t)))}}function wl(e,t,r,n,o){var i="Click";return"double"==n?i="Double"+i:"triple"==n&&(i="Triple"+i),il(e,Va(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,(function(t){if("string"==typeof t&&(t=Xa[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=W}finally{e.state.suppressEdits=!1}return n}))}function _l(e,t,r){var n=e.getOption("configureMouse"),o=n?n(e,t,r):{};if(null==o.unit){var i=w?r.shiftKey&&r.metaKey:r.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||r.shiftKey),null==o.addNew&&(o.addNew=b?r.metaKey:r.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(b?r.altKey:r.ctrlKey)),o}function xl(e,t,r,n){a?setTimeout(D(Qn,e),0):e.curOp.focus=T();var o,i=_l(e,r,n),l=e.doc.sel;e.options.dragDrop&&Me&&!e.isReadOnly()&&"single"==r&&(o=l.contains(t))>-1&&(lt((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(lt(o.to(),t)>0||t.xRel<0)?Sl(e,n,t,i):Ol(e,n,t,i)}function Sl(e,t,r,n){var o=e.display,i=!1,s=Io(e,(function(t){u&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zn(e)),ge(o.wrapper.ownerDocument,"mouseup",s),ge(o.wrapper.ownerDocument,"mousemove",c),ge(o.scroller,"dragstart",f),ge(o.scroller,"drop",s),i||(Se(t),n.addNew||Di(e.doc,r,null,null,n.extend),u&&!p||a&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),c=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};u&&(o.scroller.draggable=!0),e.state.draggingText=s,s.copy=!n.moveOnDrag,me(o.wrapper.ownerDocument,"mouseup",s),me(o.wrapper.ownerDocument,"mousemove",c),me(o.scroller,"dragstart",f),me(o.scroller,"drop",s),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}function kl(e,t,r){if("char"==r)return new li(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new li(at(t.line,0),pt(e.doc,at(t.line+1,0)));var n=r(e,t);return new li(n.from,n.to)}function Ol(e,t,r,n){a&&Zn(e);var o=e.display,i=e.doc;Se(t);var l,u,s=i.sel,c=s.ranges;if(n.addNew&&!n.extend?(u=i.sel.contains(r),l=u>-1?c[u]:new li(r,r)):(l=i.sel.primary(),u=i.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new li(r,r)),r=Nn(e,t,!0,!0),u=-1;else{var f=kl(e,r,n.unit);l=n.extend?Ni(l,f.anchor,f.head,n.extend):f}n.addNew?-1==u?(u=c.length,Wi(i,ui(e,c.concat([l]),u),{scroll:!1,origin:"*mouse"})):c.length>1&&c[u].empty()&&"char"==n.unit&&!n.extend?(Wi(i,ui(e,c.slice(0,u).concat(c.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),s=i.sel):Fi(i,u,l,q):(u=0,Wi(i,new ai([l],0),q),s=i.sel);var d=r;function p(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var o=[],a=e.options.tabSize,c=F(Xe(i,r.line).text,r.ch,a),f=F(Xe(i,t.line).text,t.ch,a),p=Math.min(c,f),h=Math.max(c,f),m=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=v;m++){var g=Xe(i,m).text,y=Y(g,p,a);p==h?o.push(new li(at(m,y),at(m,y))):g.length>y&&o.push(new li(at(m,y),at(m,Y(g,h,a))))}o.length||o.push(new li(r,r)),Wi(i,ui(e,s.ranges.slice(0,u).concat(o),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,_=kl(e,t,n.unit),x=w.anchor;lt(_.anchor,x)>0?(b=_.head,x=ft(w.from(),_.anchor)):(b=_.anchor,x=ct(w.to(),_.head));var S=s.ranges.slice(0);S[u]=El(e,new li(pt(i,x),b)),Wi(i,ui(e,S,u),q)}}var h=o.wrapper.getBoundingClientRect(),m=0;function v(t){var r=++m,a=Nn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=lt(a,d)){e.curOp.focus=T(),p(a);var l=ro(o,i);(a.line>=l.to||a.line<l.from)&&setTimeout(Io(e,(function(){m==r&&v(t)})),150)}else{var u=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;u&&setTimeout(Io(e,(function(){m==r&&(o.scroller.scrollTop+=u,v(t))})),50)}}function g(t){e.state.selectingText=!1,m=1/0,t&&(Se(t),o.input.focus()),ge(o.wrapper.ownerDocument,"mousemove",y),ge(o.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var y=Io(e,(function(e){0!==e.buttons&&je(e)?v(e):g(e)})),b=Io(e,g);e.state.selectingText=b,me(o.wrapper.ownerDocument,"mousemove",y),me(o.wrapper.ownerDocument,"mouseup",b)}function El(e,t){var r=t.anchor,n=t.head,o=Xe(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var i=pe(o);if(!i)return t;var a=fe(i,r.ch,r.sticky),l=i[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var u,s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==i.length)return t;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=fe(i,n.ch,n.sticky),f=c-a||(n.ch-r.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var d=i[s+(u?-1:0)],p=u==(1==d.level),h=p?d.from:d.to,m=p?"after":"before";return r.ch==h&&r.sticky==m?t:new li(new at(r.line,h,m),n)}function Cl(e,t,r,n){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Se(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!_e(e,r))return Oe(t);i-=l.top-a.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var s=a.gutters.childNodes[u];if(s&&s.getBoundingClientRect().right>=o)return ye(e,r,e,nt(e.doc,i),e.display.gutterSpecs[u].className,t),Oe(t)}}function jl(e,t){return Cl(e,t,"gutterClick",!0)}function Pl(e,t){Vr(e.display,t)||Ll(e,t)||be(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ll(e,t){return!!_e(e,"gutterContextMenu")&&Cl(e,t,"gutterContextMenu",!1)}function Ml(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pn(e)}gl.prototype.compare=function(e,t,r){return this.time+vl>e&&0==lt(t,this.pos)&&r==this.button};var Al={toString:function(){return"CodeMirror.Init"}},Tl={},Il={};function Rl(e){var t=e.optionHandlers;function r(r,n,o,i){e.defaults[r]=n,o&&(t[r]=i?function(e,t,r){r!=Al&&o(e,t,r)}:o)}e.defineOption=r,e.Init=Al,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,mi(e)}),!0),r("indentUnit",2,mi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){vi(e),pn(e),zn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,r.push(at(n,i))}n++}));for(var o=r.length-1;o>=0;o--)ia(e.doc,t,r[o],at(r[o].line,r[o].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Al&&e.refresh()})),r("specialCharPlaceholder",vr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!_),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Ml(e),Jo(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ga(t),o=r!=Al&&Ga(r);o&&o.detach&&o.detach(e,n),n.attach&&n.attach(e,o||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Dl,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Zo(t,e.options.lineNumbers),Jo(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Tn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return wo(e)}),!0),r("scrollbarStyle","native",(function(e){So(e),wo(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Zo(e.options.gutters,t),Jo(e)}),!0),r("firstLineNumber",1,Jo,!0),r("lineNumberFormatter",(function(e){return e}),Jo,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Nl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,vi,!0),r("addModeClass",!1,vi,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,vi,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Nl(e,t,r){if(!t!=!(r&&r!=Al)){var n=e.display.dragFunctions,o=t?me:ge;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function Dl(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),ur(e)),Rn(e),zn(e),pn(e),setTimeout((function(){return wo(e)}),100)}function zl(e,t){var r=this;if(!(this instanceof zl))return new zl(e,t);this.options=t=t?z(t):{},z(Tl,t,!1);var n=t.value;"string"==typeof n?n=new ka(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new zl.inputStyles[t.inputStyle](this),i=this.display=new ei(e,n,o,t);for(var s in i.wrapper.CodeMirror=this,Ml(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),So(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!y&&i.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Fl(this),Aa(),Oo(this),this.curOp.forceUpdate=!0,wi(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Xn(r)}),20):Jn(this),Il)Il.hasOwnProperty(s)&&Il[s](this,t[s],Al);Qo(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Bl.length;++c)Bl[c](this);Eo(this),u&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}function Fl(e){var t=e.display;me(t.scroller,"mousedown",Io(e,bl)),me(t.scroller,"dblclick",a&&l<11?Io(e,(function(t){if(!be(e,t)){var r=Nn(e,t);if(r&&!jl(e,t)&&!Vr(e.display,t)){Se(t);var n=e.findWordAt(r);Di(e.doc,n.anchor,n.head)}}})):function(t){return be(e,t)||Se(t)}),me(t.scroller,"contextmenu",(function(t){return Pl(e,t)})),me(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Pl(e,r)}));var r,n={end:0};function o(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function i(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function u(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}me(t.scroller,"touchstart",(function(o){if(!be(e,o)&&!i(o)&&!jl(e,o)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!n.prev||u(n,n.prev)?new li(a,a):!n.prev.prev||u(n,n.prev.prev)?e.findWordAt(a):new li(at(a.line,0),pt(e.doc,at(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),Se(r)}o()})),me(t.scroller,"touchcancel",o),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(ho(e,t.scroller.scrollTop),vo(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return ii(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return ii(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Ee(t)},over:function(t){be(e,t)||(ja(e,t),Ee(t))},start:function(t){return Ca(e,t)},drop:Io(e,Ea),leave:function(t){be(e,t)||Pa(e)}};var s=t.input.getField();me(s,"keyup",(function(t){return dl.call(e,t)})),me(s,"keydown",Io(e,cl)),me(s,"keypress",Io(e,pl)),me(s,"focus",(function(t){return Xn(e,t)})),me(s,"blur",(function(t){return Jn(e,t)}))}zl.defaults=Tl,zl.optionHandlers=Il;var Bl=[];function Hl(e,t,r,n){var o,i=e.doc;null==r&&(r="add"),"smart"==r&&(i.mode.indent?o=wt(e,t).state:r="prev");var a=e.options.tabSize,l=Xe(i,t),u=F(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((s=i.mode.indent(o,l.text.slice(c.length),l.text))==W||s>150)){if(!n)return;r="prev"}}else s=0,r="not";"prev"==r?s=t>i.first?F(Xe(i,t-1).text,null,a):0:"add"==r?s=u+e.options.indentUnit:"subtract"==r?s=u-e.options.indentUnit:"number"==typeof r&&(s=u+r),s=Math.max(0,s);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(s/a);p;--p)d+=a,f+="\t";if(d<s&&(f+=$(s-d)),f!=c)return ia(i,f,at(t,0),at(t,c.length),"+input"),l.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var m=i.sel.ranges[h];if(m.head.line==t&&m.head.ch<c.length){var v=at(t,c.length);Fi(i,h,new li(v,v));break}}}zl.defineInitHook=function(e){return Bl.push(e)};var Ul=null;function Wl(e){Ul=e}function Vl(e,t,r,n,o){var i=e.doc;e.display.shift=!1,n||(n=i.sel);var a=+new Date-200,l="paste"==o||e.state.pasteIncoming>a,u=Re(t),s=null;if(l&&n.ranges.length>1)if(Ul&&Ul.text.join("\n")==t){if(n.ranges.length%Ul.text.length==0){s=[];for(var c=0;c<Ul.text.length;c++)s.push(i.splitLines(Ul.text[c]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(s=Z(u,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var p=n.ranges[d],h=p.from(),m=p.to();p.empty()&&(r&&r>0?h=at(h.line,h.ch-r):e.state.overwrite&&!l?m=at(m.line,Math.min(Xe(i,m.line).text.length,m.ch+Q(u).length)):l&&Ul&&Ul.lineWise&&Ul.text.join("\n")==u.join("\n")&&(h=m=at(h.line,0)));var v={from:h,to:m,text:s?s[d%s.length]:u,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Ji(e.doc,v),Pr(e,"inputRead",e,v)}t&&!l&&Gl(e,t),uo(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ql(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||To(t,(function(){return Vl(t,r,0,null,"paste")})),!0}function Gl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l<i.electricChars.length;l++)if(t.indexOf(i.electricChars.charAt(l))>-1){a=Hl(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Xe(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Hl(e,o.head.line,"smart"));a&&Pr(e,"electricInput",e,o.head.line)}}}function Yl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,i={anchor:at(o,0),head:at(o+1,0)};r.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:r}}function Kl(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function $l(){var e=L("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=L("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return u?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),Kl(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,o=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Io(this,t[e])(this,r,o),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ga(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Ro((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");X(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,zn(this)})),removeOverlay:Ro((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void zn(this)}})),indentLine:Ro((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ot(this.doc,e)&&Hl(this,e,t,r)})),indentSelection:Ro((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var o=t[n];if(o.empty())o.head.line>r&&(Hl(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&uo(this));else{var i=o.from(),a=o.to(),l=Math.max(r,i.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u<r;++u)Hl(this,u,e);var s=this.doc.sel.ranges;0==i.ch&&t.length==s.length&&s[n].from().ch>0&&Fi(this.doc,n,new li(i,s[n].to()),V)}}})),getTokenAt:function(e,t){return Ot(this,e,t)},getLineTokens:function(e,t){return Ot(this,at(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,r=bt(this,Xe(this.doc,e.line)),n=0,o=(r.length-1)/2,i=e.ch;if(0==i)t=r[2];else for(;;){var a=n+o>>1;if((a?r[2*a-1]:0)>=i)o=a;else{if(!(r[2*a+1]<i)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var o=r[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&n.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var l=o[i[t][a]];l&&n.push(l)}else i.helperType&&o[i.helperType]?n.push(o[i.helperType]):o[i.name]&&n.push(o[i.name]);for(var u=0;u<o._global.length;u++){var s=o._global[u];s.pred(i,this)&&-1==H(n,s.val)&&n.push(s.val)}return n},getStateAfter:function(e,t){var r=this.doc;return wt(this,(e=dt(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return wn(this,null==e?r.head:"object"==typeof e?pt(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return bn(this,pt(this.doc,e),t||"page")},coordsChar:function(e,t){return Sn(this,(e=yn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=yn(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),n=Xe(this.doc,e)}else n=e;return gn(this,n,{top:0,left:0},t||"page",r||o).top+(o?this.doc.height-ar(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Mn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var i=this.display,a=(e=wn(this,pt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var u=Math.max(i.wrapper.clientHeight,this.doc.height),s=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),l+t.offsetWidth>s&&(l=s-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(l=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&io(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ro(cl),triggerOnKeyPress:Ro(pl),triggerOnKeyUp:dl,triggerOnMouseDown:Ro(bl),execCommand:function(e){if(Xa.hasOwnProperty(e))return Xa[e].call(null,this)},triggerElectric:Ro((function(e){Gl(this,e)})),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var i=pt(this.doc,e),a=0;a<t&&!(i=Zl(this.doc,i,o,r,n)).hitSide;++a);return i},moveH:Ro((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?Zl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),G)})),deleteH:Ro((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Ya(this,(function(r){var o=Zl(n,r.head,e,t,!1);return e<0?{from:o,to:r.head}:{from:r.head,to:o}}))})),findPosV:function(e,t,r,n){var o=1,i=n;t<0&&(o=-1,t=-t);for(var a=pt(this.doc,e),l=0;l<t;++l){var u=wn(this,a,"div");if(null==i?i=u.left:u.left=i,(a=Xl(this,u,o,r)).hitSide)break}return a},moveV:Ro((function(e,t){var r=this,n=this.doc,o=[],i=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(i)return e<0?a.from():a.to();var l=wn(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),o.push(l.left);var u=Xl(r,l,e,t);return"page"==t&&a==n.sel.primary()&&lo(r,bn(r,u,"div").top-l.top),u}),G),o.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=Xe(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var i=t.charAt(r),a=ne(i,o)?function(e){return ne(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new li(at(e.line,r),at(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):C(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==T()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ro((function(e,t){so(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kr(this)-this.display.barHeight,width:e.scrollWidth-Kr(this)-this.display.barWidth,clientHeight:Qr(this),clientWidth:$r(this)}},scrollIntoView:Ro((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:at(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?co(this,e):po(this,e.from,e.to,e.margin)})),setSize:Ro((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&dn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Fn(r,o,"widget");break}++o})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return To(this,e)},startOperation:function(){return Oo(this)},endOperation:function(){return Eo(this)},refresh:Ro((function(){var e=this.display.cachedTextHeight;zn(this),this.curOp.forceUpdate=!0,pn(this),so(this,this.doc.scrollLeft,this.doc.scrollTop),Yo(this.display),(null==e||Math.abs(e-Ln(this.display))>.5||this.options.lineWrapping)&&Rn(this),ye(this,"refresh",this)})),swapDoc:Ro((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wi(this,e),pn(this),this.display.input.reset(),so(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Pr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,i){e.registerHelper(t,n,i),r[t]._global.push({pred:o,val:i})}}function Zl(e,t,r,n,o){var i=t,a=r,l=Xe(e,t.line),u=o&&"rtl"==e.direction?-r:r;function s(){var r=t.line+u;return!(r<e.first||r>=e.first+e.size)&&(t=new at(r,t.ch,t.sticky),l=Xe(e,r))}function c(i){var a;if("codepoint"==n){var c=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))a=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new at(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(f?2:1))),-r)}}else a=o?Za(e.cm,l,t,r):$a(l,t,r);if(null==a){if(i||!s())return!1;t=Qa(o,e.cm,l,t.line,u)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||c(!h);h=!1){var m=l.text.charAt(t.ch)||"\n",v=ne(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!h))break}var g=$i(e,t,i,a,!0);return ut(i,g)&&(g.hitSide=!0),g}function Xl(e,t,r,n){var o,i,a=e.doc,l=t.left;if("page"==n){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(u-.5*Ln(e.display),3);o=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(i=Sn(e,l,o)).outside;){if(r<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*r}return i}var Jl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function eu(e,t){var r=tn(e,t.line);if(!r||r.hidden)return null;var n=Xe(e.doc,t.line),o=Xr(r,n,t.line),i=pe(n,e.doc.direction),a="left";i&&(a=fe(i,t.ch)%2?"right":"left");var l=ln(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ru(e,t){return t&&(e.bad=!0),e}function nu(e,t,r,n,o){var i="",a=!1,l=e.doc.lineSeparator(),u=!1;function s(e){return function(t){return t.id==e}}function c(){a&&(i+=l,u&&(i+=l),a=u=!1)}function f(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var i,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(at(n,0),at(o+1,0),s(+p));return void(h.length&&(i=h[0].find(0))&&f(Je(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var v=0;v<t.childNodes.length;v++)d(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(u=!0),m&&(a=!0)}else 3==t.nodeType&&f(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=r;)t=t.nextSibling,u=!1;return i}function ou(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ru(e.clipPos(at(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==n)return iu(i,t,r)}}function iu(e,t,r){var n=e.text.firstChild,o=!1;if(!t||!A(n,t))return ru(at(rt(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[r],r=0,!t)){var i=e.rest?Q(e.rest):e.line;return ru(at(rt(i),i.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var u=e.measure,s=u.maps;function c(t,r,n){for(var o=-1;o<(s?s.length:0);o++)for(var i=o<0?u.map:s[o],a=0;a<i.length;a+=3){var l=i[a+2];if(l==t||l==r){var c=rt(o<0?e.line:e.rest[o]),f=i[a]+n;return(n<0||l!=t)&&(f=i[a+(n?1:0)]),at(c,f)}}}var f=c(a,l,r);if(f)return ru(f,o);for(var d=l.nextSibling,p=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(f=c(d,d.firstChild,0))return ru(at(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=l.previousSibling,m=r;h;h=h.previousSibling){if(f=c(h,h.firstChild,-1))return ru(at(f.line,f.ch+m),o);m+=h.textContent.length}}Jl.prototype.init=function(e){var t=this,r=this,n=r.cm,o=r.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(i(e)&&!be(n,e)){if(n.somethingSelected())Wl({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Yl(n);Wl({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,V),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Ul.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=$l(),u=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),u.value=Ul.text.join("\n");var s=T();N(u),setTimeout((function(){n.display.lineSpace.removeChild(l),s.focus(),s==o&&r.showPrimarySelection()}),50)}}o.contentEditable=!0,Kl(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),me(o,"paste",(function(e){!i(e)||be(n,e)||ql(e,n)||l<=11&&setTimeout(Io(n,(function(){return t.updateFromDOM()})),20)})),me(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),me(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),me(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),me(o,"touchstart",(function(){return r.forceCompositionEnd()})),me(o,"input",(function(){t.composing||t.readFromDOMSoon()})),me(o,"copy",a),me(o,"cut",a)},Jl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Jl.prototype.prepareSelection=function(){var e=qn(this.cm,!1);return e.focus=T()==this.div,e},Jl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Jl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Jl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),o=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var a=ou(t,e.anchorNode,e.anchorOffset),l=ou(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=lt(ft(a,l),o)||0!=lt(ct(a,l),i)){var u=t.display.view,s=o.line>=t.display.viewFrom&&eu(t,o)||{node:u[0].measure.map[2],offset:0},c=i.line<t.display.viewTo&&eu(t,i);if(!c){var f=u[u.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(s&&c){var p,h=e.rangeCount&&e.getRangeAt(0);try{p=E(s.node,s.offset,c.offset,c.node)}catch(e){}p&&(!r&&t.state.focused?(e.collapse(s.node,s.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),h&&null==e.anchorNode?e.addRange(h):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Jl.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Jl.prototype.showMultipleSelections=function(e){P(this.cm.display.cursorDiv,e.cursors),P(this.cm.display.selectionDiv,e.selection)},Jl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Jl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Jl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&T()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Jl.prototype.blur=function(){this.div.blur()},Jl.prototype.getField=function(){return this.div},Jl.prototype.supportsTouch=function(){return!0},Jl.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):To(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},Jl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Jl.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&c&&this.cm.display.gutterSpecs.length&&tu(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=ou(t,e.anchorNode,e.anchorOffset),n=ou(t,e.focusNode,e.focusOffset);r&&n&&To(t,(function(){Wi(t.doc,si(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Jl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,o=n.display,i=n.doc.sel.primary(),a=i.from(),l=i.to();if(0==a.ch&&a.line>n.firstLine()&&(a=at(a.line-1,Xe(n.doc,a.line-1).length)),l.ch==Xe(n.doc,l.line).text.length&&l.line<n.lastLine()&&(l=at(l.line+1,0)),a.line<o.viewFrom||l.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=Dn(n,a.line))?(t=rt(o.view[0].line),r=o.view[0].node):(t=rt(o.view[e].line),r=o.view[e-1].node.nextSibling);var u,s,c=Dn(n,l.line);if(c==o.view.length-1?(u=o.viewTo-1,s=o.lineDiv.lastChild):(u=rt(o.view[c+1].line)-1,s=o.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(nu(n,r,s,t,u)),d=Je(n.doc,at(t,0),at(u,Xe(n.doc,u).text.length));f.length>1&&d.length>1;)if(Q(f)==Q(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var p=0,h=0,m=f[0],v=d[0],g=Math.min(m.length,v.length);p<g&&m.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Q(f),b=Q(d),w=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));h<w&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==f.length&&1==d.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var _=at(t,p),x=at(u,d.length?Q(d).length-h:0);return f.length>1||f[0]||lt(_,x)?(ia(n.doc,f,_,x,"+input"),!0):void 0},Jl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Jl.prototype.reset=function(){this.forceCompositionEnd()},Jl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Jl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Jl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||To(this.cm,(function(){return zn(e.cm)}))},Jl.prototype.setUneditable=function(e){e.contentEditable="false"},Jl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Io(this.cm,Vl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Jl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Jl.prototype.onContextMenu=function(){},Jl.prototype.resetPosition=function(){},Jl.prototype.needsContentAttribute=!0;var au=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};function lu(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=T();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var o;if(e.form&&(me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var l=zl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function uu(e){e.off=ge,e.on=me,e.wheelEventPixels=oi,e.Doc=ka,e.splitLines=Re,e.countColumn=F,e.findColumn=Y,e.isWordChar=re,e.Pass=W,e.signal=ye,e.Line=sr,e.changeEnd=ci,e.scrollbarModel=xo,e.Pos=at,e.cmpPos=lt,e.modes=Be,e.mimeModes=He,e.resolveMode=Ve,e.getMode=qe,e.modeExtensions=Ge,e.extendMode=Ye,e.copyState=Ke,e.startState=Qe,e.innerMode=$e,e.commands=Xa,e.keyMap=Fa,e.keyName=qa,e.isModifierKey=Wa,e.lookupKey=Ua,e.normalizeKeyMap=Ha,e.StringStream=Ze,e.SharedTextMarker=ya,e.TextMarker=va,e.LineWidget=da,e.e_preventDefault=Se,e.e_stopPropagation=ke,e.e_stop=Ee,e.addClass=I,e.contains=A,e.rmClass=C,e.keyNames=Ra}au.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!be(n,e)){if(n.somethingSelected())Wl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Yl(n);Wl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),N(o))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),me(o,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),me(o,"paste",(function(e){be(n,e)||ql(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),me(o,"cut",i),me(o,"copy",i),me(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!be(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),me(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Se(t)})),me(o,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),me(o,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},au.prototype.createField=function(e){this.wrapper=$l(),this.textarea=this.wrapper.firstChild},au.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},au.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=qn(e);if(e.options.moveInputWithCursor){var o=wn(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return n},au.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},au.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&N(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},au.prototype.getField=function(){return this.textarea},au.prototype.supportsTouch=function(){return!1},au.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||T()!=this.textarea))try{this.textarea.focus()}catch(e){}},au.prototype.blur=function(){this.textarea.blur()},au.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},au.prototype.receivedFocus=function(){this.slowPoll()},au.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},au.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},au.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||n||(n="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var u=0,s=Math.min(n.length,o.length);u<s&&n.charCodeAt(u)==o.charCodeAt(u);)++u;return To(t,(function(){Vl(t,o.slice(u),n.length-u,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},au.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},au.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},au.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=Nn(r,e),s=n.scroller.scrollTop;if(i&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(i)&&Io(r,Wi)(r.doc,si(i),V);var c,f=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(c=window.scrollY),n.input.focus(),u&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=g,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&v(),k){Ee(e);var m=function(){ge(window,"mouseup",m),setTimeout(g,20)};me(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=o.selectionStart){var e=r.somethingSelected(),i="\u200b"+(e?o.value:"");o.value="\u21da",o.value=i,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,n.selForContextMenu=r.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=f,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=s),null!=o.selectionStart)){(!a||a&&l<9)&&v();var e=0,i=function(){n.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?Io(r,Zi)(r):e++<10?n.detectingSelectAll=setTimeout(i,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(i,200)}}},au.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},au.prototype.setUneditable=function(){},au.prototype.needsContentAttribute=!1,Rl(zl),Ql(zl);var su="iter insert remove copy getEditor constructor".split(" ");for(var cu in ka.prototype)ka.prototype.hasOwnProperty(cu)&&H(su,cu)<0&&(zl.prototype[cu]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cu]));return xe(ka),zl.inputStyles={textarea:au,contenteditable:Jl},zl.defineMode=function(e){zl.defaults.mode||"null"==e||(zl.defaults.mode=e),Ue.apply(this,arguments)},zl.defineMIME=We,zl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),zl.defineMIME("text/plain","null"),zl.defineExtension=function(e,t){zl.prototype[e]=t},zl.defineDocExtension=function(e,t){ka.prototype[e]=t},zl.fromTextArea=lu,uu(zl),zl.version="5.65.5",zl}()},77530:(e,t,r)=>{!function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,r){var n=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var o,i,a=t.indentUnit,l=r.tokenHooks,u=r.documentTypes||{},s=r.mediaTypes||{},c=r.mediaFeatures||{},f=r.mediaValueKeywords||{},d=r.propertyKeywords||{},p=r.nonStandardPropertyKeywords||{},h=r.fontProperties||{},m=r.counterDescriptors||{},v=r.colorKeywords||{},g=r.valueKeywords||{},y=r.allowNested,b=r.lineComment,w=!0===r.supportsAtComponent,_=!1!==t.highlightNonStandardPropertyKeywords;function x(e,t){return o=t,e}function S(e,t){var r=e.next();if(l[r]){var n=l[r](e,t);if(!1!==n)return n}return"@"==r?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?x(null,"compare"):'"'==r||"'"==r?(t.tokenize=k(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==r?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=O),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function k(e){return function(t,r){for(var n,o=!1;null!=(n=t.next());){if(n==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==n}return(n==e||!o&&")"!=e)&&(r.tokenize=null),x("string","string")}}function O(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=k(")"),x(null,"(")}function E(e,t,r){this.type=e,this.indent=t,this.prev=r}function C(e,t,r,n){return e.context=new E(r,t.indentation()+(!1===n?0:a),e.context),r}function j(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function P(e,t,r){return A[r.context.type](e,t,r)}function L(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return P(e,t,r)}function M(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":v.hasOwnProperty(t)?"keyword":"variable"}var A={top:function(e,t,r){if("{"==e)return C(r,t,"block");if("}"==e&&r.context.prev)return j(r);if(w&&/@component/i.test(e))return C(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return C(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return C(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return C(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return C(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return C(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return d.hasOwnProperty(n)?(i="property","maybeprop"):p.hasOwnProperty(n)?(i=_?"string-2":"property","maybeprop"):y?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?A.top(e,t,r):(i="error","block")},maybeprop:function(e,t,r){return":"==e?C(r,t,"prop"):P(e,t,r)},prop:function(e,t,r){if(";"==e)return j(r);if("{"==e&&y)return C(r,t,"propBlock");if("}"==e||"{"==e)return L(e,t,r);if("("==e)return C(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)M(t);else if("interpolation"==e)return C(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?j(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?L(e,t,r):")"==e?j(r):"("==e?C(r,t,"parens"):"interpolation"==e?C(r,t,"interpolation"):("word"==e&&M(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):P(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&u.hasOwnProperty(t.current())?(i="tag",r.context.type):A.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return C(r,t,"atBlock_parens");if("}"==e||";"==e)return L(e,t,r);if("{"==e)return j(r)&&C(r,t,y?"block":"top");if("interpolation"==e)return C(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":s.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?"keyword":d.hasOwnProperty(n)?"property":p.hasOwnProperty(n)?_?"string-2":"property":g.hasOwnProperty(n)?"atom":v.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?L(e,t,r):"{"==e?j(r)&&C(r,t,y?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?j(r):"{"==e||"}"==e?L(e,t,r,2):A.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?C(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):P(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,j(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?C(r,t,"top"):P(e,t,r)},at:function(e,t,r){return";"==e?j(r):"{"==e||"}"==e?L(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?j(r):"{"==e||";"==e?L(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new E(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||S)(e,t);return r&&"object"==typeof r&&(o=r[1],r=r[0]),i=r,"comment"!=o&&(t.state=A[t.state](o,e,t)),i},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-a)):o=(r=r.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],n=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(a),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],s=t(u),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(c),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(d),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=t(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),w=r.concat(o).concat(a).concat(u).concat(c).concat(d).concat(v).concat(y);function _(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:n,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=_,_(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=_,_(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=_,_(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:i,mediaFeatures:l,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=_,_(e,t))}},name:"css",helperType:"gss"})}(r(3458))},80372:(e,t,r)=>{!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function r(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}var n={};function o(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(e,t){var r=e.match(o(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"</\\s*"+e+"\\s*>","i")}function l(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],i=o.length-1;i>=0;i--)n.unshift(o[i])}function u(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(!n[0]||n[1].test(i(t,n[0])))return n[2]}}e.defineMode("htmlmixed",(function(n,o){var i=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag,allowMissingTagName:o.allowMissingTagName}),s={},c=o&&o.tags,f=o&&o.scriptTypes;if(l(t,s),c&&l(c,s),f)for(var d=f.length-1;d>=0;d--)s.script.unshift(["type",f[d].matches,f[d].mode]);function p(t,o){var l,c=i.token(t,o.htmlState),f=/\btag\b/.test(c);if(f&&!/[<>\s\/]/.test(t.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&u(s[d[1]],d[2]),m=e.getMode(n,h),v=a(d[1],!0),g=a(d[1],!1);o.token=function(e,t){return e.match(v,!1)?(t.token=p,t.localState=t.localMode=null,null):r(e,g,t.localMode.token(e,t.localState))},o.localMode=m,o.localState=e.startState(m,i.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(i)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(i,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?i.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||i}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(r(3458),r(32941),r(42215),r(77530))},42215:(e,t,r)=>{!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,o,i=t.indentUnit,a=r.statementIndent,l=r.jsonld,u=r.json||l,s=!1!==r.trackScope,c=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,o=r,t}function g(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):ot(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var o=d[n];return v(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,o=!1;if(l&&"@"==t.peek()&&t.match(h))return r.tokenize=g,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=g),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=g;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=g;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var _="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),u=_.indexOf(l);if(u>=0&&u<3){if(!o){++a;break}if(0==--o){"("==l&&(i=!0);break}}else if(u>=3&&u<6)++o;else if(f.test(l))i=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(t.fatArrowAt=a)}}var S={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function k(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function O(e,t){if(!s)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function E(e,t,r,n,o){var i=e.cc;for(C.state=e,C.stream=o,C.marked=null,C.cc=i,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():u?q:W)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return C.marked?C.marked:"variable"==r&&O(e,n)?"variable-2":t}}var C={state:null,column:null,marked:null,cc:null};function j(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function P(){return j.apply(null,arguments),!0}function L(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function M(e){var t=C.state;if(C.marked="def",s){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=A(e,t.context);if(null!=n)return void(t.context=n)}else if(!L(e,t.localVars))return void(t.localVars=new R(e,t.localVars));r.globalVars&&!L(e,t.globalVars)&&(t.globalVars=new R(e,t.globalVars))}}function A(e,t){if(t){if(t.block){var r=A(e,t.prev);return r?r==t.prev?t:new I(r,t.vars,!0):null}return L(e,t.vars)?t:new I(t.prev,new R(e,t.vars),!1)}return null}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function I(e,t,r){this.prev=e,this.vars=t,this.block=r}function R(e,t){this.name=e,this.next=t}var N=new R("this",new R("arguments",null));function D(){C.state.context=new I(C.state.context,C.state.localVars,!1),C.state.localVars=N}function z(){C.state.context=new I(C.state.context,C.state.localVars,!0),C.state.localVars=null}function F(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function B(e,t){var r=function(){var r=C.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new k(n,C.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function H(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function U(e){function t(r){return r==e?P():";"==e||"}"==r||")"==r||"]"==r?j():P(t)}return t}function W(e,t){return"var"==e?P(B("vardef",t),je,U(";"),H):"keyword a"==e?P(B("form"),Y,W,H):"keyword b"==e?P(B("form"),W,H):"keyword d"==e?C.stream.match(/^\s*$/,!1)?P():P(B("stat"),$,U(";"),H):"debugger"==e?P(U(";")):"{"==e?P(B("}"),z,de,H,F):";"==e?P():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==H&&C.state.cc.pop()(),P(B("form"),Y,W,H,Ie)):"function"==e?P(ze):"for"==e?P(B("form"),z,Re,W,F,H):"class"==e||c&&"interface"==t?(C.marked="keyword",P(B("form","class"==e?e:t),We,H)):"variable"==e?c&&"declare"==t?(C.marked="keyword",P(W)):c&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?P(tt):"type"==t?P(Be,U("operator"),ge,U(";")):P(B("form"),Pe,U("{"),B("}"),de,H,H)):c&&"namespace"==t?(C.marked="keyword",P(B("form"),q,W,H)):c&&"abstract"==t?(C.marked="keyword",P(W)):P(B("stat"),ie):"switch"==e?P(B("form"),Y,U("{"),B("}","switch"),z,de,H,H,F):"case"==e?P(q,U(":")):"default"==e?P(U(":")):"catch"==e?P(B("form"),D,V,W,H,F):"export"==e?P(B("stat"),Ye,H):"import"==e?P(B("stat"),$e,H):"async"==e?P(W):"@"==t?P(q,W):j(B("stat"),q,U(";"),H)}function V(e){if("("==e)return P(He,U(")"))}function q(e,t){return K(e,t,!1)}function G(e,t){return K(e,t,!0)}function Y(e){return"("!=e?j():P(B(")"),$,U(")"),H)}function K(e,t,r){if(C.state.fatArrowAt==C.stream.start){var n=r?te:ee;if("("==e)return P(D,B(")"),ce(He,")"),H,U("=>"),n,F);if("variable"==e)return j(D,Pe,U("=>"),n,F)}var o=r?Z:Q;return S.hasOwnProperty(e)?P(o):"function"==e?P(ze,o):"class"==e||c&&"interface"==t?(C.marked="keyword",P(B("form"),Ue,H)):"keyword c"==e||"async"==e?P(r?G:q):"("==e?P(B(")"),$,U(")"),H,o):"operator"==e||"spread"==e?P(r?G:q):"["==e?P(B("]"),et,H,o):"{"==e?fe(le,"}",null,o):"quasi"==e?j(X,o):"new"==e?P(re(r)):P()}function $(e){return e.match(/[;\}\)\],]/)?j():j(q)}function Q(e,t){return","==e?P($):Z(e,t,!1)}function Z(e,t,r){var n=0==r?Q:Z,o=0==r?q:G;return"=>"==e?P(D,r?te:ee,F):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?P(n):c&&"<"==t&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?P(B(">"),ce(ge,">"),H,n):"?"==t?P(q,U(":"),o):P(o):"quasi"==e?j(X,n):";"!=e?"("==e?fe(G,")","call",n):"."==e?P(ae,n):"["==e?P(B("]"),$,U("]"),H,n):c&&"as"==t?(C.marked="keyword",P(ge,n)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),P(o)):void 0:void 0}function X(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?P(X):P($,J)}function J(e){if("}"==e)return C.marked="string-2",C.state.tokenize=w,P(X)}function ee(e){return x(C.stream,C.state),j("{"==e?W:q)}function te(e){return x(C.stream,C.state),j("{"==e?W:G)}function re(e){return function(t){return"."==t?P(e?oe:ne):"variable"==t&&c?P(Oe,e?Z:Q):j(e?G:q)}}function ne(e,t){if("target"==t)return C.marked="keyword",P(Q)}function oe(e,t){if("target"==t)return C.marked="keyword",P(Z)}function ie(e){return":"==e?P(H,W):j(Q,U(";"),H)}function ae(e){if("variable"==e)return C.marked="property",P()}function le(e,t){return"async"==e?(C.marked="property",P(le)):"variable"==e||"keyword"==C.style?(C.marked="property","get"==t||"set"==t?P(ue):(c&&C.state.fatArrowAt==C.stream.start&&(r=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+r[0].length),P(se))):"number"==e||"string"==e?(C.marked=l?"property":C.style+" property",P(se)):"jsonld-keyword"==e?P(se):c&&T(t)?(C.marked="keyword",P(le)):"["==e?P(q,pe,U("]"),se):"spread"==e?P(G,se):"*"==t?(C.marked="keyword",P(le)):":"==e?j(se):void 0;var r}function ue(e){return"variable"!=e?j(se):(C.marked="property",P(ze))}function se(e){return":"==e?P(G):"("==e?j(ze):void 0}function ce(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),P((function(r,n){return r==t||n==t?j():j(e)}),n)}return o==t||i==t?P():r&&r.indexOf(";")>-1?j(e):P(U(t))}return function(r,o){return r==t||o==t?P():j(e,n)}}function fe(e,t,r){for(var n=3;n<arguments.length;n++)C.cc.push(arguments[n]);return P(B(t,r),ce(e,t),H)}function de(e){return"}"==e?P():j(W,de)}function pe(e,t){if(c){if(":"==e)return P(ge);if("?"==t)return P(pe)}}function he(e,t){if(c&&(":"==e||"in"==t))return P(ge)}function me(e){if(c&&":"==e)return C.stream.match(/^\s*\w+\s+is\b/,!1)?P(q,ve,ge):P(ge)}function ve(e,t){if("is"==t)return C.marked="keyword",P()}function ge(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(C.marked="keyword",P("typeof"==t?G:ge)):"variable"==e||"void"==t?(C.marked="type",P(ke)):"|"==t||"&"==t?P(ge):"string"==e||"number"==e||"atom"==e?P(ke):"["==e?P(B("]"),ce(ge,"]",","),H,ke):"{"==e?P(B("}"),be,H,ke):"("==e?P(ce(Se,")"),ye,ke):"<"==e?P(ce(ge,">"),ge):"quasi"==e?j(_e,ke):void 0}function ye(e){if("=>"==e)return P(ge)}function be(e){return e.match(/[\}\)\]]/)?P():","==e||";"==e?P(be):j(we,be)}function we(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",P(we)):"?"==t||"number"==e||"string"==e?P(we):":"==e?P(ge):"["==e?P(U("variable"),he,U("]"),we):"("==e?j(Fe,we):e.match(/[;\}\)\],]/)?void 0:P()}function _e(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?P(_e):P(ge,xe)}function xe(e){if("}"==e)return C.marked="string-2",C.state.tokenize=w,P(_e)}function Se(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?P(Se):":"==e?P(ge):"spread"==e?P(Se):j(ge)}function ke(e,t){return"<"==t?P(B(">"),ce(ge,">"),H,ke):"|"==t||"."==e||"&"==t?P(ge):"["==e?P(ge,U("]"),ke):"extends"==t||"implements"==t?(C.marked="keyword",P(ge)):"?"==t?P(ge,U(":"),ge):void 0}function Oe(e,t){if("<"==t)return P(B(">"),ce(ge,">"),H,ke)}function Ee(){return j(ge,Ce)}function Ce(e,t){if("="==t)return P(ge)}function je(e,t){return"enum"==t?(C.marked="keyword",P(tt)):j(Pe,pe,Ae,Te)}function Pe(e,t){return c&&T(t)?(C.marked="keyword",P(Pe)):"variable"==e?(M(t),P()):"spread"==e?P(Pe):"["==e?fe(Me,"]"):"{"==e?fe(Le,"}"):void 0}function Le(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?P(Pe):"}"==e?j():"["==e?P(q,U("]"),U(":"),Le):P(U(":"),Pe,Ae)):(M(t),P(Ae))}function Me(){return j(Pe,Ae)}function Ae(e,t){if("="==t)return P(G)}function Te(e){if(","==e)return P(je)}function Ie(e,t){if("keyword b"==e&&"else"==t)return P(B("form","else"),W,H)}function Re(e,t){return"await"==t?P(Re):"("==e?P(B(")"),Ne,H):void 0}function Ne(e){return"var"==e?P(je,De):"variable"==e?P(De):j(De)}function De(e,t){return")"==e?P():";"==e?P(De):"in"==t||"of"==t?(C.marked="keyword",P(q,De)):j(q,De)}function ze(e,t){return"*"==t?(C.marked="keyword",P(ze)):"variable"==e?(M(t),P(ze)):"("==e?P(D,B(")"),ce(He,")"),H,me,W,F):c&&"<"==t?P(B(">"),ce(Ee,">"),H,ze):void 0}function Fe(e,t){return"*"==t?(C.marked="keyword",P(Fe)):"variable"==e?(M(t),P(Fe)):"("==e?P(D,B(")"),ce(He,")"),H,me,F):c&&"<"==t?P(B(">"),ce(Ee,">"),H,Fe):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(C.marked="type",P(Be)):"<"==t?P(B(">"),ce(Ee,">"),H):void 0}function He(e,t){return"@"==t&&P(q,He),"spread"==e?P(He):c&&T(t)?(C.marked="keyword",P(He)):c&&"this"==e?P(pe,Ae):j(Pe,pe,Ae)}function Ue(e,t){return"variable"==e?We(e,t):Ve(e,t)}function We(e,t){if("variable"==e)return M(t),P(Ve)}function Ve(e,t){return"<"==t?P(B(">"),ce(Ee,">"),H,Ve):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(C.marked="keyword"),P(c?ge:q,Ve)):"{"==e?P(B("}"),qe,H):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",P(qe)):"variable"==e||"keyword"==C.style?(C.marked="property",P(Ge,qe)):"number"==e||"string"==e?P(Ge,qe):"["==e?P(q,pe,U("]"),Ge,qe):"*"==t?(C.marked="keyword",P(qe)):c&&"("==e?j(Fe,qe):";"==e||","==e?P(qe):"}"==e?P():"@"==t?P(q,qe):void 0}function Ge(e,t){if("!"==t)return P(Ge);if("?"==t)return P(Ge);if(":"==e)return P(ge,Ae);if("="==t)return P(G);var r=C.state.lexical.prev;return j(r&&"interface"==r.info?Fe:ze)}function Ye(e,t){return"*"==t?(C.marked="keyword",P(Je,U(";"))):"default"==t?(C.marked="keyword",P(q,U(";"))):"{"==e?P(ce(Ke,"}"),Je,U(";")):j(W)}function Ke(e,t){return"as"==t?(C.marked="keyword",P(U("variable"))):"variable"==e?j(G,Ke):void 0}function $e(e){return"string"==e?P():"("==e?j(q):"."==e?j(Q):j(Qe,Ze,Je)}function Qe(e,t){return"{"==e?fe(Qe,"}"):("variable"==e&&M(t),"*"==t&&(C.marked="keyword"),P(Xe))}function Ze(e){if(","==e)return P(Qe,Ze)}function Xe(e,t){if("as"==t)return C.marked="keyword",P(Qe)}function Je(e,t){if("from"==t)return C.marked="keyword",P(q)}function et(e){return"]"==e?P():j(ce(G,"]"))}function tt(){return j(B("form"),Pe,U("{"),B("}"),ce(rt,"}"),H,H)}function rt(){return j(Pe,Ae)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function ot(e,t,r){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return D.lex=z.lex=!0,F.lex=!0,H.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new k((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new I(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",E(t,r,n,o,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=g)return 0;var o,l=n&&n.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(n))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==H)u=u.prev;else if(c!=Ie&&c!=F)break}for(;("stat"==u.type||"form"==u.type)&&("}"==l||(o=t.cc[t.cc.length-1])&&(o==Q||o==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)u=u.prev;a&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var f=u.type,d=l==f;return"vardef"==f?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==f&&"{"==l?u.indented:"form"==f?u.indented+i:"stat"==f?u.indented+(nt(t,n)?a||i:0):"switch"!=u.info||d||0==r.doubleIndentSwitch?u.align?u.column+(d?0:1):u.indented+(d?0:i):u.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:l,jsonMode:u,expressionAllowed:ot,skipExpression:function(t){E(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(3458))},32941:(e,t,r)=>{!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,o){var i,a,l=n.indentUnit,u={},s=o.htmlMode?t:r;for(var c in s)u[c]=s[c];for(var c in o)u[c]=o[c];function f(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(h("atom","]]>")):null:e.match("--")?r(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=f,i=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return i="equals",null;if("<"==r){t.tokenize=f,t.state=w,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=p(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=f;break}r.next()}return e}}function m(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=m(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=f;break}return r.tokenize=m(e-1),r.tokenize(t,r)}}return"meta"}}function v(e){return e&&e.toLowerCase()}function g(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!u.contextGrabbers.hasOwnProperty(v(r))||!u.contextGrabbers[v(r)].hasOwnProperty(v(t)))return;y(e)}}function w(e,t,r){return"openTag"==e?(r.tagStart=t.column(),_):"closeTag"==e?x:w}function _(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",O):u.allowMissingTagName&&"endTag"==e?(a="tag bracket",O(e,t,r)):(a="error",_)}function x(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&u.implicitlyClosed.hasOwnProperty(v(r.context.tagName))&&y(r),r.context&&r.context.tagName==n||!1===u.matchClosing?(a="tag",S):(a="tag error",k)}return u.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,r)):(a="error",k)}function S(e,t,r){return"endTag"!=e?(a="error",S):(y(r),w)}function k(e,t,r){return a="error",S(e,t,r)}function O(e,t,r){if("word"==e)return a="attribute",E;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(v(n))?b(r,n):(b(r,n),r.context=new g(r,n,o==r.indented)),w}return a="error",O}function E(e,t,r){return"equals"==e?C:(u.allowMissing||(a="error"),O(e,t,r))}function C(e,t,r){return"string"==e?j:"word"==e&&u.allowUnquoted?(a="string",O):(a="error",O(e,t,r))}function j(e,t,r){return"string"==e?j:O(e,t,r)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:w,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var r=t.tokenize(e,t);return(r||i)&&"comment"!=r&&(a=null,t.state=t.state(i||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=f)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var i=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(i&&i[1])for(;o;){if(o.tagName==i[2]){o=o.prev;break}if(!u.implicitlyClosed.hasOwnProperty(v(o.tagName)))break;o=o.prev}else if(i)for(;o;){var a=u.contextGrabbers[v(o.tagName)];if(!a||!a.hasOwnProperty(v(i[2])))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=O)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(3458))},74436:(e,t,r)=>{var n=r(67045),o=r(5366),i=function(){"use strict";var e=[],t=[],r=/\/\*\s*csslint([^\*]*)\*\//,l=new o.util.EventTarget;return l.version="1.0.4",l.addRule=function(t){e.push(t),e[t.id]=t},l.clearRules=function(){e=[]},l.getRules=function(){return[].concat(e).sort((function(e,t){return e.id>t.id?1:0}))},l.getRuleset=function(){for(var t={},r=0,n=e.length;r<n;)t[e[r++].id]=1;return t},l.addFormatter=function(e){t[e.id]=e},l.getFormatter=function(e){return t[e]},l.format=function(e,t,r,n){var o=this.getFormatter(r),i=null;return o&&(i=o.startFormat(),i+=o.formatResults(e,t,n||{}),i+=o.endFormat()),i},l.hasFormat=function(e){return t.hasOwnProperty(e)},l.verify=function(t,l){var u,s,c,f=0,d={},p=[],h=new o.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});s=t.replace(/\n\r?/g,"$split$").split("$split$"),i.Util.forEach(s,(function(e,t){var r=e&&e.match(/\/\*[ \t]*csslint[ \t]+allow:[ \t]*([^\*]*)\*\//i),n=r&&r[1],o={};n&&(n.toLowerCase().split(",").forEach((function(e){o[e.trim()]=!0})),Object.keys(o).length>0&&(d[t+1]=o))}));var m=null,v=null;for(f in i.Util.forEach(s,(function(e,t){null===m&&e.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)&&(m=t),e.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)&&(v=t),null!==m&&null!==v&&(p.push([m,v]),m=v=null)})),null!==m&&p.push([m,s.length]),l||(l=this.getRuleset()),r.test(t)&&(l=function(e,t){var n,o=e&&e.match(r),i=o&&o[1];return i&&(n={true:2,"":1,false:0,2:2,1:1,0:0},i.toLowerCase().split(",").forEach((function(e){var r=e.split(":"),o=r[0]||"",i=r[1]||"";t[o.trim()]=n[i.trim()]}))),t}(t,l=n(l))),u=new a(s,l,d,p),l.errors=2,l)l.hasOwnProperty(f)&&l[f]&&e[f]&&e[f].init(h,u);try{h.parse(t)}catch(e){u.error("Fatal error, cannot continue: "+e.message,e.line,e.col,{})}return(c={messages:u.messages,stats:u.stats,ruleset:u.ruleset,allow:u.allow,ignore:u.ignore}).messages.sort((function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line})),c},l}();function a(e,t,r,n){"use strict";this.messages=[],this.stats=[],this.lines=e,this.ruleset=t,this.allow=r,this.allow||(this.allow={}),this.ignore=n,this.ignore||(this.ignore=[])}a.prototype={constructor:a,error:function(e,t,r,n){"use strict";this.messages.push({type:"error",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n||{}})},warn:function(e,t,r,n){"use strict";this.report(e,t,r,n)},report:function(e,t,r,n){"use strict";if(!this.allow.hasOwnProperty(t)||!this.allow[t].hasOwnProperty(n.id)){var o=!1;i.Util.forEach(this.ignore,(function(e){e[0]<=t&&t<=e[1]&&(o=!0)})),o||this.messages.push({type:2===this.ruleset[n.id]?"error":"warning",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})}},info:function(e,t,r,n){"use strict";this.messages.push({type:"info",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})},rollupError:function(e,t){"use strict";this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){"use strict";this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){"use strict";this.stats[e]=t}},i._Reporter=a,i.Util={mix:function(e,t){"use strict";var r;for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return r},indexOf:function(e,t){"use strict";if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t){"use strict";if(e.forEach)return e.forEach(t);for(var r=0,n=e.length;r<n;r++)t(e[r],r,e)}},i.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-adjoining-classes",browsers:"IE6",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s,c=n.selectors;for(l=0;l<c.length;l++)for(o=c[l],u=0;u<o.parts.length;u++)if((i=o.parts[u]).type===e.SELECTOR_PART_TYPE)for(a=0,s=0;s<i.modifiers.length;s++)"class"===i.modifiers[s].type&&a++,a>1&&t.report("Adjoining classes: "+c[l].text,i.line,i.col,r)}))}}),i.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",url:"https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size",browsers:"All",init:function(e,t){"use strict";var r,n=this,o={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},i={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},a=!1;function l(){r={},a=!1}function u(){var e,l;if(!a){if(r.height)for(e in i)i.hasOwnProperty(e)&&r[e]&&(l=r[e].value,"padding"===e&&2===l.parts.length&&0===l.parts[0].value||t.report("Using height with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n));if(r.width)for(e in o)o.hasOwnProperty(e)&&r[e]&&(l=r[e].value,"padding"===e&&2===l.parts.length&&0===l.parts[1].value||t.report("Using width with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n))}}e.addListener("startrule",l),e.addListener("startfontface",l),e.addListener("startpage",l),e.addListener("startpagemargin",l),e.addListener("startkeyframerule",l),e.addListener("startviewport",l),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();i[t]||o[t]?/^0\S*$/.test(e.value)||"border"===t&&"none"===e.value.toString()||(r[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?r[t]=1:"box-sizing"===t&&(a=!0)})),e.addListener("endrule",u),e.addListener("endfontface",u),e.addListener("endpage",u),e.addListener("endpagemargin",u),e.addListener("endkeyframerule",u),e.addListener("endviewport",u)}}),i.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-box-sizing",browsers:"IE6, IE7",tags:["Compatibility"],init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){"box-sizing"===e.property.text.toLowerCase()&&t.report("The box-sizing property isn't supported in IE6 and IE7.",e.line,e.col,r)}))}}),i.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",url:"https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face",browsers:"All",init:function(e,t){"use strict";var r,n,o=this,i=!1,a=!0,l=!1;e.addListener("startfontface",(function(){i=!0})),e.addListener("property",(function(e){if(i){var t=e.property.toString().toLowerCase(),o=e.value.toString();if(r=e.line,n=e.col,"src"===t){var u=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!o.match(u)&&a?(l=!0,a=!1):o.match(u)&&!a&&(l=!1)}}})),e.addListener("endfontface",(function(){i=!1,l&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",r,n,o)}))}}),i.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",url:"https://github.com/CSSLint/csslint/wiki/Require-compatible-vendor-prefixes",browsers:"All",init:function(e,t){"use strict";var r,n,o,a,l,u,s,c=this,f=!1,d=Array.prototype.push,p=[];for(o in r={animation:"webkit","animation-delay":"webkit","animation-direction":"webkit","animation-duration":"webkit","animation-fill-mode":"webkit","animation-iteration-count":"webkit","animation-name":"webkit","animation-play-state":"webkit","animation-timing-function":"webkit",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"","box-shadow":"","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit ms","transform-origin":"webkit ms",transition:"","transition-delay":"","transition-duration":"","transition-property":"","transition-timing-function":"","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"})if(r.hasOwnProperty(o)){for(a=[],u=0,s=(l=r[o].split(" ")).length;u<s;u++)a.push("-"+l[u]+"-"+o);r[o]=a,d.apply(p,a)}e.addListener("startrule",(function(){n=[]})),e.addListener("startkeyframes",(function(e){f=e.prefix||!0})),e.addListener("endkeyframes",(function(){f=!1})),e.addListener("property",(function(e){var t=e.property;i.Util.indexOf(p,t.text)>-1&&(f&&"string"==typeof f&&0===t.text.indexOf("-"+f+"-")||n.push(t))})),e.addListener("endrule",(function(){if(n.length){var e,o,a,l,u,s,f,d,p,h,m={};for(e=0,o=n.length;e<o;e++)for(l in a=n[e],r)r.hasOwnProperty(l)&&(u=r[l],i.Util.indexOf(u,a.text)>-1&&(m[l]||(m[l]={full:u.slice(0),actual:[],actualNodes:[]}),-1===i.Util.indexOf(m[l].actual,a.text)&&(m[l].actual.push(a.text),m[l].actualNodes.push(a))));for(l in m)if(m.hasOwnProperty(l)&&(f=(s=m[l]).full,d=s.actual,f.length>d.length))for(e=0,o=f.length;e<o;e++)p=f[e],-1===i.Util.indexOf(d,p)&&(h=1===d.length?d[0]:2===d.length?d.join(" and "):d.join(", "),t.report("The property "+p+" is compatible with "+h+" and should be included as well.",s.actualNodes[0].line,s.actualNodes[0].col,c))}}))}}),i.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",url:"https://github.com/CSSLint/csslint/wiki/Require-properties-appropriate-for-display",browsers:"All",init:function(e,t){"use strict";var r,n=this,o={display:1,float:"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1};function i(e,i,a){r[e]&&("string"==typeof o[e]&&r[e].value.toLowerCase()===o[e]||t.report(a||e+" can't be used with display: "+i+".",r[e].line,r[e].col,n))}function a(){r={}}function l(){var e=r.display?r.display.value:null;if(e)switch(e){case"inline":i("height",e),i("width",e),i("margin",e),i("margin-top",e),i("margin-bottom",e),i("float",e,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":i("vertical-align",e);break;case"inline-block":i("float",e);break;default:0===e.indexOf("table-")&&(i("margin",e),i("margin-left",e),i("margin-right",e),i("margin-top",e),i("margin-bottom",e),i("float",e))}}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startkeyframerule",a),e.addListener("startpagemargin",a),e.addListener("startpage",a),e.addListener("startviewport",a),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();o[t]&&(r[t]={value:e.value.text,line:e.property.line,col:e.property.col})})),e.addListener("endrule",l),e.addListener("endfontface",l),e.addListener("endkeyframerule",l),e.addListener("endpagemargin",l),e.addListener("endpage",l),e.addListener("endviewport",l)}}),i.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-background-images",browsers:"All",init:function(e,t){"use strict";var r=this,n={};e.addListener("property",(function(e){var o,i,a=e.property.text,l=e.value;if(a.match(/background/i))for(o=0,i=l.parts.length;o<i;o++)"uri"===l.parts[o].type&&(void 0===n[l.parts[o].uri]?n[l.parts[o].uri]=e:t.report("Background image '"+l.parts[o].uri+"' was used multiple times, first declared at line "+n[l.parts[o].uri].line+", col "+n[l.parts[o].uri].col+".",e.line,e.col,r))}))}}),i.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-duplicate-properties",browsers:"All",init:function(e,t){"use strict";var r,n,o=this;function i(){r={}}e.addListener("startrule",i),e.addListener("startfontface",i),e.addListener("startpage",i),e.addListener("startpagemargin",i),e.addListener("startkeyframerule",i),e.addListener("startviewport",i),e.addListener("property",(function(e){var i=e.property.text.toLowerCase();!r[i]||n===i&&r[i]!==e.value.text||t.report("Duplicate property '"+e.property+"' found.",e.line,e.col,o),r[i]=e.value.text,n=i}))}}),i.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-empty-rules",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startrule",(function(){n=0})),e.addListener("property",(function(){n++})),e.addListener("endrule",(function(e){var o=e.selectors;0===n&&t.report("Rule is empty.",o[0].line,o[0].col,r)}))}}),i.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("error",(function(e){t.error(e.message,e.line,e.col,r)}))}}),i.addRule({id:"fallback-colors",name:"Require fallback colors",desc:"For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",url:"https://github.com/CSSLint/csslint/wiki/Require-fallback-colors",browsers:"IE6,IE7,IE8",init:function(e,t){"use strict";var r,n=this,o={color:1,background:1,"border-color":1,"border-top-color":1,"border-right-color":1,"border-bottom-color":1,"border-left-color":1,border:1,"border-top":1,"border-right":1,"border-bottom":1,"border-left":1,"background-color":1};function i(){r=null}e.addListener("startrule",i),e.addListener("startfontface",i),e.addListener("startpage",i),e.addListener("startpagemargin",i),e.addListener("startkeyframerule",i),e.addListener("startviewport",i),e.addListener("property",(function(e){var i=e.property.text.toLowerCase(),a=e.value.parts,l=0,u="",s=a.length;if(o[i])for(;l<s;)"color"===a[l].type&&("alpha"in a[l]||"hue"in a[l]?(/([^\)]+)\(/.test(a[l])&&(u=RegExp.$1.toUpperCase()),r&&r.property.text.toLowerCase()===i&&"compat"===r.colorType||t.report("Fallback "+i+" (hex or RGB) should precede "+u+" "+i+".",e.line,e.col,n)):e.colorType="compat"),l++;r=e}))}}),i.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",url:"https://github.com/CSSLint/csslint/wiki/Disallow-too-many-floats",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("property",(function(e){"float"===e.property.text.toLowerCase()&&"none"!==e.value.text.toLowerCase()&&n++})),e.addListener("endstylesheet",(function(){t.stat("floats",n),n>=10&&t.rollupWarn("Too many floats ("+n+"), you're probably using them for layout. Consider using a grid system instead.",r)}))}}),i.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startfontface",(function(){n++})),e.addListener("endstylesheet",(function(){n>5&&t.rollupWarn("Too many @font-face declarations ("+n+").",r)}))}}),i.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("property",(function(e){"font-size"===e.property.toString()&&n++})),e.addListener("endstylesheet",(function(){t.stat("font-sizes",n),n>=10&&t.rollupWarn("Too many font-size declarations ("+n+"), abstraction needed.",r)}))}}),i.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",url:"https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions",browsers:"All",init:function(e,t){"use strict";var r,n=this;e.addListener("startrule",(function(){r={moz:0,webkit:0,oldWebkit:0,o:0}})),e.addListener("property",(function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?r[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(r.oldWebkit=1)})),e.addListener("endrule",(function(e){var o=[];r.moz||o.push("Firefox 3.6+"),r.webkit||o.push("Webkit (Safari 5+, Chrome)"),r.oldWebkit||o.push("Old Webkit (Safari 4+, Chrome)"),r.o||o.push("Opera 11.1+"),o.length&&o.length<4&&t.report("Missing vendor-prefixed CSS gradients for "+o.join(", ")+".",e.selectors[0].line,e.selectors[0].col,n)}))}}),i.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s,c=n.selectors;for(l=0;l<c.length;l++){for(o=c[l],a=0,u=0;u<o.parts.length;u++)if((i=o.parts[u]).type===e.SELECTOR_PART_TYPE)for(s=0;s<i.modifiers.length;s++)"id"===i.modifiers[s].type&&a++;1===a?t.report("Don't use IDs in selectors.",o.line,o.col,r):a>1&&t.report(a+" IDs in the selector, really?",o.line,o.col,r)}}))}}),i.addRule({id:"import-ie-limit",name:"@import limit on IE6-IE9",desc:"IE6-9 supports up to 31 @import per stylesheet",browsers:"IE6, IE7, IE8, IE9",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startpage",(function(){n=0})),e.addListener("import",(function(){n++})),e.addListener("endstylesheet",(function(){n>31&&t.rollupError("Too many @import rules ("+n+"). IE6-9 supports up to 31 import per stylesheet.",r)}))}}),i.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%40import",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("import",(function(e){t.report("@import prevents parallel downloads, use <link> instead.",e.line,e.col,r)}))}}),i.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%21important",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("property",(function(e){!0===e.important&&(n++,t.report("Use of !important",e.line,e.col,r))})),e.addListener("endstylesheet",(function(){t.stat("important",n),n>=10&&t.rollupWarn("Too many !important declarations ("+n+"), try to use less than 10 to avoid specificity issues.",r)}))}}),i.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",url:"https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){e.invalid&&t.report(e.invalid.message,e.line,e.col,r)}))}}),i.addRule({id:"order-alphabetical",name:"Alphabetical order",desc:"Assure properties are in alphabetical order",browsers:"All",init:function(e,t){"use strict";var r,n=this,o=function(){r=[]},i=function(e){r.join(",")!==r.sort().join(",")&&t.report("Rule doesn't have all its properties in alphabetical order.",e.line,e.col,n)};e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("startviewport",o),e.addListener("property",(function(e){var t=e.property.text.toLowerCase().replace(/^-.*?-/,"");r.push(t)})),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endpage",i),e.addListener("endpagemargin",i),e.addListener("endkeyframerule",i),e.addListener("endviewport",i)}}),i.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone",browsers:"All",tags:["Accessibility"],init:function(e,t){"use strict";var r,n=this;function o(e){r=e.selectors?{line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:null}function i(){r&&r.outline&&(-1===r.selectors.toString().toLowerCase().indexOf(":focus")?t.report("Outlines should only be modified using :focus.",r.line,r.col,n):1===r.propCount&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",r.line,r.col,n))}e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("startviewport",o),e.addListener("property",(function(e){var t=e.property.text.toLowerCase(),n=e.value;r&&(r.propCount++,"outline"!==t||"none"!==n.toString()&&"0"!==n.toString()||(r.outline=!0))})),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endpage",i),e.addListener("endpagemargin",i),e.addListener("endkeyframerule",i),e.addListener("endviewport",i)}}),i.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",url:"https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements",browsers:"All",init:function(e,t){"use strict";var r=this,n={};e.addListener("startrule",(function(o){var i,a,l,u,s,c,f=o.selectors;for(u=0;u<f.length;u++)for(i=f[u],s=0;s<i.parts.length;s++)if((a=i.parts[s]).type===e.SELECTOR_PART_TYPE)for(c=0;c<a.modifiers.length;c++)l=a.modifiers[c],a.elementName&&"id"===l.type?t.report("Element ("+a+") is overqualified, just use "+l+" without element name.",a.line,a.col,r):"class"===l.type&&(n[l]||(n[l]=[]),n[l].push({modifier:l,part:a}))})),e.addListener("endstylesheet",(function(){var e;for(e in n)n.hasOwnProperty(e)&&1===n[e].length&&n[e][0].part.elementName&&t.report("Element ("+n[e][0].part+") is overqualified, just use "+n[e][0].modifier+" without element name.",n[e][0].part.line,n[e][0].part.col,r)}))}}),i.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",url:"https://github.com/CSSLint/csslint/wiki/Disallow-qualified-headings",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u=n.selectors;for(a=0;a<u.length;a++)for(o=u[a],l=0;l<o.parts.length;l++)(i=o.parts[l]).type===e.SELECTOR_PART_TYPE&&i.elementName&&/h[1-6]/.test(i.elementName.toString())&&l>0&&t.report("Heading ("+i.elementName+") should not be qualified.",i.line,i.col,r)}))}}),i.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-selectors-that-look-like-regular-expressions",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s,c=n.selectors;for(l=0;l<c.length;l++)for(o=c[l],u=0;u<o.parts.length;u++)if((i=o.parts[u]).type===e.SELECTOR_PART_TYPE)for(s=0;s<i.modifiers.length;s++)"attribute"===(a=i.modifiers[s]).type&&/([~\|\^\$\*]=)/.test(a)&&t.report("Attribute selectors with "+RegExp.$1+" are slow!",a.line,a.col,r)}))}}),i.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(e,t){"use strict";var r=0;e.addListener("startrule",(function(){r++})),e.addListener("endstylesheet",(function(){t.stat("rule-count",r)}))}}),i.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startrule",(function(e){n+=e.selectors.length})),e.addListener("endstylesheet",(function(){n>=3800&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)}))}}),i.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startrule",(function(e){n+=e.selectors.length})),e.addListener("endstylesheet",(function(){n>4095&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)}))}}),i.addRule({id:"selector-newline",name:"Disallow new-line characters in selectors",desc:"New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(e){var n,o,i,a,l,u,s,c,f,d,p,h=e.selectors;for(n=0,o=h.length;n<o;n++)for(a=0,u=(i=h[n]).parts.length;a<u;a++)for(l=a+1;l<u;l++)s=i.parts[a],c=i.parts[l],f=s.type,d=s.line,p=c.line,"descendant"===f&&p>d&&t.report("newline character found in selector (forgot a comma?)",d,h[n].parts[0].col,r)}))}}),i.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",url:"https://github.com/CSSLint/csslint/wiki/Require-shorthand-properties",browsers:"All",init:function(e,t){"use strict";var r,n,o,i,a=this,l={},u={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(r in u)if(u.hasOwnProperty(r))for(n=0,o=u[r].length;n<o;n++)l[u[r][n]]=r;function s(){i={}}function c(e){var r,n,o,l;for(r in u)if(u.hasOwnProperty(r)){for(l=0,n=0,o=u[r].length;n<o;n++)l+=i[u[r][n]]?1:0;l===u[r].length&&t.report("The properties "+u[r].join(", ")+" can be replaced by "+r+".",e.line,e.col,a)}}e.addListener("startrule",s),e.addListener("startfontface",s),e.addListener("property",(function(e){var t=e.property.toString().toLowerCase();l[t]&&(i[t]=1)})),e.addListener("endrule",c),e.addListener("endfontface",c)}}),i.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",url:"https://github.com/CSSLint/csslint/wiki/Disallow-star-hack",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){"*"===e.property.hack&&t.report("Property with star prefix found.",e.property.line,e.property.col,r)}))}}),i.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",url:"https://github.com/CSSLint/csslint/wiki/Disallow-negative-text-indent",browsers:"All",init:function(e,t){"use strict";var r,n,o=this;function i(){r=!1,n="inherit"}function a(){r&&"ltr"!==n&&t.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",r.line,r.col,o)}e.addListener("startrule",i),e.addListener("startfontface",i),e.addListener("property",(function(e){var t=e.property.toString().toLowerCase(),o=e.value;"text-indent"===t&&o.parts[0].value<-99?r=e.property:"direction"===t&&"ltr"===o.toString()&&(n="ltr")})),e.addListener("endrule",a),e.addListener("endfontface",a)}}),i.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",url:"https://github.com/CSSLint/csslint/wiki/Disallow-underscore-hack",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){"_"===e.property.hack&&t.report("Property with underscore prefix found.",e.property.line,e.property.col,r)}))}}),i.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",url:"https://github.com/CSSLint/csslint/wiki/Headings-should-only-be-defined-once",browsers:"All",init:function(e,t){"use strict";var r=this,n={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};e.addListener("startrule",(function(e){var o,i,a,l,u,s=e.selectors;for(l=0;l<s.length;l++)if((i=(o=s[l]).parts[o.parts.length-1]).elementName&&/(h[1-6])/i.test(i.elementName.toString())){for(u=0;u<i.modifiers.length;u++)if("pseudo"===i.modifiers[u].type){a=!0;break}a||(n[RegExp.$1]++,n[RegExp.$1]>1&&t.report("Heading ("+i.elementName+") has already been defined.",i.line,i.col,r))}})),e.addListener("endstylesheet",(function(){var e,o=[];for(e in n)n.hasOwnProperty(e)&&n[e]>1&&o.push(n[e]+" "+e+"s");o.length&&t.rollupWarn("You have "+o.join(", ")+" defined in this stylesheet.",r)}))}}),i.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-universal-selector",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(e){var n,o,i,a=e.selectors;for(i=0;i<a.length;i++)"*"===(o=(n=a[i]).parts[n.parts.length-1]).elementName&&t.report(r.desc,o.line,o.col,r)}))}}),i.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-unqualified-attribute-selectors",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s=n.selectors,c=!1;for(l=0;l<s.length;l++)if((i=(o=s[l]).parts[o.parts.length-1]).type===e.SELECTOR_PART_TYPE){for(u=0;u<i.modifiers.length;u++)if("class"===(a=i.modifiers[u]).type||"id"===a.type){c=!0;break}if(!c)for(u=0;u<i.modifiers.length;u++)"attribute"!==(a=i.modifiers[u]).type||i.elementName&&"*"!==i.elementName||t.report(r.desc,i.line,i.col,r)}}))}}),i.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",url:"https://github.com/CSSLint/csslint/wiki/Require-standard-property-with-vendor-prefix",browsers:"All",init:function(e,t){"use strict";var r,n,o=this,i={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing"};function a(){r={},n=1}function l(){var e,n,a,l,u,s=[];for(e in r)i[e]&&s.push({actual:e,needed:i[e]});for(n=0,a=s.length;n<a;n++)l=s[n].needed,u=s[n].actual,r[l]?r[l][0].pos<r[u][0].pos&&t.report("Standard property '"+l+"' should come after vendor-prefixed property '"+u+"'.",r[u][0].name.line,r[u][0].name.col,o):t.report("Missing standard property '"+l+"' to go along with '"+u+"'.",r[u][0].name.line,r[u][0].name.col,o)}e.addListener("startrule",a),e.addListener("startfontface",a),e.addListener("startpage",a),e.addListener("startpagemargin",a),e.addListener("startkeyframerule",a),e.addListener("startviewport",a),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();r[t]||(r[t]=[]),r[t].push({name:e.property,value:e.value,pos:n++})})),e.addListener("endrule",l),e.addListener("endfontface",l),e.addListener("endpage",l),e.addListener("endpagemargin",l),e.addListener("endkeyframerule",l),e.addListener("endviewport",l)}}),i.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-units-for-zero-values",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){for(var n=e.value.parts,o=0,i=n.length;o<i;)!n[o].units&&"percentage"!==n[o].type||0!==n[o].value||"time"===n[o].type||t.report("Values of 0 shouldn't have units specified.",n[o].line,n[o].col,r),o++}))}}),function(){"use strict";var e=function(e){return e&&e.constructor===String?e.replace(/["&><]/g,(function(e){switch(e){case'"':return""";case"&":return"&";case"<":return"<";case">":return">"}})):""};i.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},readError:function(t,r){return'<file name="'+e(t)+'"><error line="0" column="0" severty="error" message="'+e(r)+'"></error></file>'},formatResults:function(t,r){var n=t.messages,o=[];return n.length>0&&(o.push('<file name="'+r+'">'),i.Util.forEach(n,(function(t){var r;t.rollup||o.push('<error line="'+t.line+'" column="'+t.col+'" severity="'+t.type+'" message="'+e(t.message)+'" source="'+(((r=t.rule)&&"name"in r?"net.csslint."+r.name.replace(/\s/g,""):"")+'"/>'))})),o.push("</file>")),o.join("")}})}(),i.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,r){"use strict";var n=e.messages,o="";r=r||{};var a=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return 0===n.length?r.quiet?"":t+": Lint Free!":(i.Util.forEach(n,(function(e){e.rollup?o+=t+": "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n":o+=t+": line "+e.line+", col "+e.col+", "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n"})),o)}}),i.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){"use strict";return"</csslint>"},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):""};return r.length>0&&(n.push('<file name="'+t+'">'),i.Util.forEach(r,(function(e){e.rollup?n.push('<issue severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>'):n.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>')})),n.push("</file>")),n.join("")}}),i.addFormatter({id:"json",name:"JSON",startFormat:function(){"use strict";return this.json=[],""},endFormat:function(){"use strict";var e="";return this.json.length>0&&(e=1===this.json.length?JSON.stringify(this.json[0]):JSON.stringify(this.json)),e},formatResults:function(e,t,r){"use strict";return(e.messages.length>0||!r.quiet)&&this.json.push({filename:t,messages:e.messages,stats:e.stats}),""}}),i.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><testsuites>'},endFormat:function(){"use strict";return"</testsuites>"},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o={error:0,failure:0},i=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/</g,"<").replace(/>/g,">"):""};return r.length>0&&(r.forEach((function(e){var t,r="warning"===e.type?"error":e.type;e.rollup||(n.push('<testcase time="0" name="'+(((t=e.rule)&&"name"in t?"net.csslint."+t.name.replace(/\s/g,""):"")+'">')),n.push("<"+r+' message="'+i(e.message)+'"><![CDATA['+e.line+":"+e.col+":"+i(e.evidence)+"]]></"+r+">"),n.push("</testcase>"),o[r]+=1)})),n.unshift('<testsuite time="0" tests="'+r.length+'" skipped="0" errors="'+o.error+'" failures="'+o.failure+'" package="net.csslint" name="'+t+'">'),n.push("</testsuite>")),n.join("")}}),i.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){"use strict";return'<?xml version="1.0" encoding="utf-8"?><lint>'},endFormat:function(){"use strict";return"</lint>"},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):""};return r.length>0&&(n.push('<file name="'+t+'">'),i.Util.forEach(r,(function(e){if(e.rollup)n.push('<issue severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>');else{var t="";e.rule&&e.rule.id&&(t='rule="'+o(e.rule.id)+'" '),n.push("<issue "+t+'line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'" reason="'+o(e.message)+'" evidence="'+o(e.evidence)+'"/>')}})),n.push("</file>")),n.join("")}}),i.addFormatter({id:"text",name:"Plain Text",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,r){"use strict";var n=e.messages,o="";if(r=r||{},0===n.length)return r.quiet?"":"\n\ncsslint: No errors in "+t+".";o="\n\ncsslint: There ",1===n.length?o+="is 1 problem":o+="are "+n.length+" problems",o+=" in "+t+".";var a=t.lastIndexOf("/"),l=t;return-1===a&&(a=t.lastIndexOf("\\")),a>-1&&(l=t.substring(a+1)),i.Util.forEach(n,(function(e,t){o=o+"\n\n"+l,e.rollup?(o+="\n"+(t+1)+": "+e.type,o+="\n"+e.message):(o+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,o+="\n"+e.message,o+="\n"+e.evidence)})),o}}),t.u=i},58954:(e,t,r)=>{var n=r(26299)(r(46285),"DataView");e.exports=n},28206:(e,t,r)=>{var n=r(37106),o=r(47903),i=r(84607),a=r(60718),l=r(41676);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},79764:(e,t,r)=>{var n=r(35450),o=r(53299),i=r(73616),a=r(64967),l=r(29879);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},16566:(e,t,r)=>{var n=r(26299)(r(46285),"Map");e.exports=n},41795:(e,t,r)=>{var n=r(1543),o=r(40419),i=r(76857),a=r(15487),l=r(86433);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=l,e.exports=u},87968:(e,t,r)=>{var n=r(26299)(r(46285),"Promise");e.exports=n},86562:(e,t,r)=>{var n=r(26299)(r(46285),"Set");e.exports=n},10154:(e,t,r)=>{var n=r(41795),o=r(37036),i=r(8283);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},34505:(e,t,r)=>{var n=r(79764),o=r(29922),i=r(84205),a=r(18285),l=r(97037),u=r(73266);function s(e){var t=this.__data__=new n(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=l,s.prototype.set=u,e.exports=s},65816:(e,t,r)=>{var n=r(46285).Symbol;e.exports=n},57423:(e,t,r)=>{var n=r(46285).Uint8Array;e.exports=n},41405:(e,t,r)=>{var n=r(26299)(r(46285),"WeakMap");e.exports=n},33351:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},55918:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},92977:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},62549:(e,t,r)=>{var n=r(81350);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},52742:e=>{e.exports=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}},82509:(e,t,r)=>{var n=r(65337),o=r(43399),i=r(13858),a=r(85753),l=r(66611),u=r(15805),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),c=!r&&o(e),f=!r&&!c&&a(e),d=!r&&!c&&!f&&u(e),p=r||c||f||d,h=p?n(e.length,String):[],m=h.length;for(var v in e)!t&&!s.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||l(v,m))||h.push(v);return h}},45584:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},11415:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},27405:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},78775:(e,t,r)=>{var n=r(70079),o=r(41391),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},73354:(e,t,r)=>{var n=r(41391);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},70079:(e,t,r)=>{var n=r(69297);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},51704:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(45584),l=r(34490),u=r(18416);e.exports=function(e,t,r,s){var c=-1,f=o,d=!0,p=e.length,h=[],m=t.length;if(!p)return h;r&&(t=a(t,l(r))),s?(f=i,d=!1):t.length>=200&&(f=u,d=!1,t=new n(t));e:for(;++c<p;){var v=e[c],g=null==r?v:r(v);if(v=s||0!==v?v:0,d&&g==g){for(var y=m;y--;)if(t[y]===g)continue e;h.push(v)}else f(t,g,s)||h.push(v)}return h}},75467:(e,t,r)=>{var n=r(79458),o=r(98310)(n);e.exports=o},88120:(e,t,r)=>{var n=r(75467);e.exports=function(e,t){var r=[];return n(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}},65784:e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},86221:e=>{e.exports=function(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}},89753:(e,t,r)=>{var n=r(11415),o=r(69619);e.exports=function e(t,r,i,a,l){var u=-1,s=t.length;for(i||(i=o),l||(l=[]);++u<s;){var c=t[u];r>0&&i(c)?r>1?e(c,r-1,i,a,l):n(l,c):a||(l[l.length]=c)}return l}},43317:(e,t,r)=>{var n=r(52667)();e.exports=n},79458:(e,t,r)=>{var n=r(43317),o=r(71839);e.exports=function(e,t){return e&&n(e,t,o)}},4616:(e,t,r)=>{var n=r(17413),o=r(63742);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},91213:(e,t,r)=>{var n=r(11415),o=r(13858);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},89124:(e,t,r)=>{var n=r(65816),o=r(51900),i=r(19488),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},17178:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,r){return null!=e&&t.call(e,r)}},9598:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},81350:(e,t,r)=>{var n=r(65784),o=r(482),i=r(75055);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},73367:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(45584),l=r(34490),u=r(18416),s=Math.min;e.exports=function(e,t,r){for(var c=r?i:o,f=e[0].length,d=e.length,p=d,h=Array(d),m=1/0,v=[];p--;){var g=e[p];p&&t&&(g=a(g,l(t))),m=s(g.length,m),h[p]=!r&&(t||f>=120&&g.length>=120)?new n(p&&g):void 0}g=e[0];var y=-1,b=h[0];e:for(;++y<f&&v.length<m;){var w=g[y],_=t?t(w):w;if(w=r||0!==w?w:0,!(b?u(b,_):c(v,_,r))){for(p=d;--p;){var x=h[p];if(!(x?u(x,_):c(e[p],_,r)))continue e}b&&b.push(_),v.push(w)}}return v}},35899:(e,t,r)=>{var n=r(89124),o=r(72982);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},95125:(e,t,r)=>{var n=r(14536),o=r(72982);e.exports=function e(t,r,i,a,l){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,l))}},14536:(e,t,r)=>{var n=r(34505),o=r(35174),i=r(43706),a=r(12658),l=r(33929),u=r(13858),s=r(85753),c=r(15805),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,v,g){var y=u(e),b=u(t),w=y?d:l(e),_=b?d:l(t),x=(w=w==f?p:w)==p,S=(_=_==f?p:_)==p,k=w==_;if(k&&s(e)){if(!s(t))return!1;y=!0,x=!1}if(k&&!x)return g||(g=new n),y||c(e)?o(e,t,r,m,v,g):i(e,t,w,r,m,v,g);if(!(1&r)){var O=x&&h.call(e,"__wrapped__"),E=S&&h.call(t,"__wrapped__");if(O||E){var C=O?e.value():e,j=E?t.value():t;return g||(g=new n),v(C,j,r,m,g)}}return!!k&&(g||(g=new n),a(e,t,r,m,v,g))}},38625:(e,t,r)=>{var n=r(34505),o=r(95125);e.exports=function(e,t,r,i){var a=r.length,l=a,u=!i;if(null==e)return!l;for(e=Object(e);a--;){var s=r[a];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<l;){var c=(s=r[a])[0],f=e[c],d=s[1];if(u&&s[2]){if(void 0===f&&!(c in e))return!1}else{var p=new n;if(i)var h=i(f,d,c,e,t,p);if(!(void 0===h?o(d,f,3,i,p):h))return!1}}return!0}},482:e=>{e.exports=function(e){return e!=e}},19069:(e,t,r)=>{var n=r(21009),o=r(63205),i=r(4082),a=r(2398),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:l).test(a(e))}},57240:(e,t,r)=>{var n=r(89124),o=r(98061),i=r(72982),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},62064:(e,t,r)=>{var n=r(2209),o=r(93214),i=r(10429),a=r(13858),l=r(75325);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):l(e)}},83145:(e,t,r)=>{var n=r(47557),o=r(63918),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},76348:(e,t,r)=>{var n=r(4082),o=r(47557),i=r(62605),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var l in e)("constructor"!=l||!t&&a.call(e,l))&&r.push(l);return r}},29409:(e,t,r)=>{var n=r(75467),o=r(65046);e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},2209:(e,t,r)=>{var n=r(38625),o=r(38093),i=r(93247);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},93214:(e,t,r)=>{var n=r(95125),o=r(62952),i=r(53118),a=r(97005),l=r(86996),u=r(93247),s=r(63742);e.exports=function(e,t){return a(e)&&l(t)?u(s(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},27889:(e,t,r)=>{var n=r(4616),o=r(55168),i=r(17413);e.exports=function(e,t,r){for(var a=-1,l=t.length,u={};++a<l;){var s=t[a],c=n(e,s);r(c,s)&&o(u,i(s,e),c)}return u}},75443:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},51833:(e,t,r)=>{var n=r(4616);e.exports=function(e){return function(t){return n(t,e)}}},3040:(e,t,r)=>{var n=r(57547),o=r(66611),i=Array.prototype.splice;e.exports=function(e,t){for(var r=e?t.length:0,a=r-1;r--;){var l=t[r];if(r==a||l!==u){var u=l;o(l)?i.call(e,l,1):n(e,l)}}return e}},32978:(e,t,r)=>{var n=r(10429),o=r(96441),i=r(33415);e.exports=function(e,t){return i(o(e,t,n),e+"")}},55168:(e,t,r)=>{var n=r(78775),o=r(17413),i=r(66611),a=r(4082),l=r(63742);e.exports=function(e,t,r,u){if(!a(e))return e;for(var s=-1,c=(t=o(t,e)).length,f=c-1,d=e;null!=d&&++s<c;){var p=l(t[s]),h=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(s!=f){var m=d[p];void 0===(h=u?u(m,p,d):void 0)&&(h=a(m)?m:i(t[s+1])?[]:{})}n(d,p,h),d=d[p]}return e}},40147:(e,t,r)=>{var n=r(53179),o=r(69297),i=r(10429),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},46306:e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}},46638:(e,t,r)=>{var n=r(75467);e.exports=function(e,t){var r;return n(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}},65337:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},25631:(e,t,r)=>{var n=r(65816),o=r(45584),i=r(13858),a=r(90754),l=n?n.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},40301:(e,t,r)=>{var n=r(71259),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},34490:e=>{e.exports=function(e){return function(t){return e(t)}}},33631:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(18416),l=r(14031),u=r(80150);e.exports=function(e,t,r){var s=-1,c=o,f=e.length,d=!0,p=[],h=p;if(r)d=!1,c=i;else if(f>=200){var m=t?null:l(e);if(m)return u(m);d=!1,c=a,h=new n}else h=t?[]:p;e:for(;++s<f;){var v=e[s],g=t?t(v):v;if(v=r||0!==v?v:0,d&&g==g){for(var y=h.length;y--;)if(h[y]===g)continue e;t&&h.push(g),p.push(v)}else c(h,g,r)||(h!==p&&h.push(g),p.push(v))}return p}},57547:(e,t,r)=>{var n=r(17413),o=r(32359),i=r(16175),a=r(63742);e.exports=function(e,t){return t=n(t,e),null==(e=i(e,t))||delete e[a(o(t))]}},26862:(e,t,r)=>{var n=r(45584);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},18416:e=>{e.exports=function(e,t){return e.has(t)}},94286:(e,t,r)=>{var n=r(84655);e.exports=function(e){return n(e)?e:[]}},47546:(e,t,r)=>{var n=r(10429);e.exports=function(e){return"function"==typeof e?e:n}},17413:(e,t,r)=>{var n=r(13858),o=r(97005),i=r(80902),a=r(23156);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},40022:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},7339:(e,t,r)=>{var n=r(78775),o=r(70079);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var l=-1,u=t.length;++l<u;){var s=t[l],c=i?i(r[s],e[s],s,r,e):void 0;void 0===c&&(c=e[s]),a?o(r,s,c):n(r,s,c)}return r}},61815:(e,t,r)=>{var n=r(46285)["__core-js_shared__"];e.exports=n},80716:(e,t,r)=>{var n=r(32978),o=r(14007);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,l=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,l&&o(r[0],r[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t}))}},98310:(e,t,r)=>{var n=r(65046);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,l=Object(r);(t?a--:++a<i)&&!1!==o(l[a],a,l););return r}}},52667:e=>{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===r(i[u],u,i))break}return t}}},14031:(e,t,r)=>{var n=r(86562),o=r(24911),i=r(80150),a=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:o;e.exports=a},69297:(e,t,r)=>{var n=r(26299),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},35174:(e,t,r)=>{var n=r(10154),o=r(27405),i=r(18416);e.exports=function(e,t,r,a,l,u){var s=1&r,c=e.length,f=t.length;if(c!=f&&!(s&&f>c))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var g=e[h],y=t[h];if(a)var b=s?a(y,g,h,t,e,u):a(g,y,h,e,t,u);if(void 0!==b){if(b)continue;m=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(g===e||l(g,e,r,a,u)))return v.push(t)}))){m=!1;break}}else if(g!==y&&!l(g,y,r,a,u)){m=!1;break}}return u.delete(e),u.delete(t),m}},43706:(e,t,r)=>{var n=r(65816),o=r(57423),i=r(41391),a=r(35174),l=r(23866),u=r(80150),s=n?n.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(e,t,r,n,s,f,d){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=l;case"[object Set]":var h=1&n;if(p||(p=u),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;n|=2,d.set(e,t);var v=a(p(e),p(t),n,s,f,d);return d.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},12658:(e,t,r)=>{var n=r(48616),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,l){var u=1&r,s=n(e),c=s.length;if(c!=n(t).length&&!u)return!1;for(var f=c;f--;){var d=s[f];if(!(u?d in t:o.call(t,d)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=!0;l.set(e,t),l.set(t,e);for(var v=u;++f<c;){var g=e[d=s[f]],y=t[d];if(i)var b=u?i(y,g,d,t,e,l):i(g,y,d,e,t,l);if(!(void 0===b?g===y||a(g,y,r,i,l):b)){m=!1;break}v||(v="constructor"==d)}if(m&&!v){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return l.delete(e),l.delete(t),m}},92076:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},48616:(e,t,r)=>{var n=r(91213),o=r(46375),i=r(71839);e.exports=function(e){return n(e,i,o)}},74589:(e,t,r)=>{var n=r(91213),o=r(75446),i=r(78088);e.exports=function(e){return n(e,i,o)}},76208:(e,t,r)=>{var n=r(36123);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},38093:(e,t,r)=>{var n=r(86996),o=r(71839);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},26299:(e,t,r)=>{var n=r(19069),o=r(83521);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},81353:(e,t,r)=>{var n=r(20363)(Object.getPrototypeOf,Object);e.exports=n},51900:(e,t,r)=>{var n=r(65816),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[l]=r:delete e[l]),o}},46375:(e,t,r)=>{var n=r(92977),o=r(70255),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=l},75446:(e,t,r)=>{var n=r(11415),o=r(81353),i=r(46375),a=r(70255),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=l},33929:(e,t,r)=>{var n=r(58954),o=r(16566),i=r(87968),a=r(86562),l=r(41405),u=r(89124),s=r(2398),c="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",m=s(n),v=s(o),g=s(i),y=s(a),b=s(l),w=u;(n&&w(new n(new ArrayBuffer(1)))!=h||o&&w(new o)!=c||i&&w(i.resolve())!=f||a&&w(new a)!=d||l&&w(new l)!=p)&&(w=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?s(r):"";if(n)switch(n){case m:return h;case v:return c;case g:return f;case y:return d;case b:return p}return t}),e.exports=w},83521:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},29898:(e,t,r)=>{var n=r(17413),o=r(43399),i=r(13858),a=r(66611),l=r(98061),u=r(63742);e.exports=function(e,t,r){for(var s=-1,c=(t=n(t,e)).length,f=!1;++s<c;){var d=u(t[s]);if(!(f=null!=e&&r(e,d)))break;e=e[d]}return f||++s!=c?f:!!(c=null==e?0:e.length)&&l(c)&&a(d,c)&&(i(e)||o(e))}},37106:(e,t,r)=>{var n=r(34378);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},47903:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},84607:(e,t,r)=>{var n=r(34378),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},60718:(e,t,r)=>{var n=r(34378),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},41676:(e,t,r)=>{var n=r(34378);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},69619:(e,t,r)=>{var n=r(65816),o=r(43399),i=r(13858),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},66611:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},14007:(e,t,r)=>{var n=r(41391),o=r(65046),i=r(66611),a=r(4082);e.exports=function(e,t,r){if(!a(r))return!1;var l=typeof t;return!!("number"==l?o(r)&&i(t,r.length):"string"==l&&t in r)&&n(r[t],e)}},97005:(e,t,r)=>{var n=r(13858),o=r(90754),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},36123:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},63205:(e,t,r)=>{var n,o=r(61815),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},47557:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},86996:(e,t,r)=>{var n=r(4082);e.exports=function(e){return e==e&&!n(e)}},35450:e=>{e.exports=function(){this.__data__=[],this.size=0}},53299:(e,t,r)=>{var n=r(73354),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},73616:(e,t,r)=>{var n=r(73354);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},64967:(e,t,r)=>{var n=r(73354);e.exports=function(e){return n(this.__data__,e)>-1}},29879:(e,t,r)=>{var n=r(73354);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},1543:(e,t,r)=>{var n=r(28206),o=r(79764),i=r(16566);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},40419:(e,t,r)=>{var n=r(76208);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},76857:(e,t,r)=>{var n=r(76208);e.exports=function(e){return n(this,e).get(e)}},15487:(e,t,r)=>{var n=r(76208);e.exports=function(e){return n(this,e).has(e)}},86433:(e,t,r)=>{var n=r(76208);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},23866:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},93247:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},70110:(e,t,r)=>{var n=r(46762);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},34378:(e,t,r)=>{var n=r(26299)(Object,"create");e.exports=n},63918:(e,t,r)=>{var n=r(20363)(Object.keys,Object);e.exports=n},62605:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},37001:(e,t,r)=>{e=r.nmd(e);var n=r(92076),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},19488:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},20363:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},96441:(e,t,r)=>{var n=r(33351),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,l=o(i.length-t,0),u=Array(l);++a<l;)u[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=r(u),n(e,this,s)}}},16175:(e,t,r)=>{var n=r(4616),o=r(46306);e.exports=function(e,t){return t.length<2?e:n(e,o(t,0,-1))}},46285:(e,t,r)=>{var n=r(92076),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},37036:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8283:e=>{e.exports=function(e){return this.__data__.has(e)}},80150:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},33415:(e,t,r)=>{var n=r(40147),o=r(55374)(n);e.exports=o},55374:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},29922:(e,t,r)=>{var n=r(79764);e.exports=function(){this.__data__=new n,this.size=0}},84205:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},18285:e=>{e.exports=function(e){return this.__data__.get(e)}},97037:e=>{e.exports=function(e){return this.__data__.has(e)}},73266:(e,t,r)=>{var n=r(79764),o=r(16566),i=r(41795);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},75055:e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}},80902:(e,t,r)=>{var n=r(70110),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},63742:(e,t,r)=>{var n=r(90754);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},2398:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},71259:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},58618:(e,t,r)=>{var n=r(78775),o=r(7339),i=r(80716),a=r(65046),l=r(47557),u=r(71839),s=Object.prototype.hasOwnProperty,c=i((function(e,t){if(l(t)||a(t))o(t,u(t),e);else for(var r in t)s.call(t,r)&&n(e,r,t[r])}));e.exports=c},99021:(e,t,r)=>{var n=r(11415),o=r(89753),i=r(40022),a=r(13858);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),r=arguments[0],l=e;l--;)t[l-1]=arguments[l];return n(a(r)?i(r):[r],o(t,1))}},53179:e=>{e.exports=function(e){return function(){return e}}},33708:(e,t,r)=>{var n=r(4082),o=r(22172),i=r(79347),a=Math.max,l=Math.min;e.exports=function(e,t,r){var u,s,c,f,d,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=u,n=s;return u=s=void 0,h=t,f=e.apply(n,r)}function b(e){var r=e-p;return void 0===p||r>=t||r<0||v&&e-h>=c}function w(){var e=o();if(b(e))return _(e);d=setTimeout(w,function(e){var r=t-(e-p);return v?l(r,c-(e-h)):r}(e))}function _(e){return d=void 0,g&&u?y(e):(u=s=void 0,f)}function x(){var e=o(),r=b(e);if(u=arguments,s=this,p=e,r){if(void 0===d)return function(e){return h=e,d=setTimeout(w,t),m?y(e):f}(p);if(v)return clearTimeout(d),d=setTimeout(w,t),y(p)}return void 0===d&&(d=setTimeout(w,t)),f}return t=i(t)||0,n(r)&&(m=!!r.leading,c=(v="maxWait"in r)?a(i(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),x.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=s=d=void 0},x.flush=function(){return void 0===d?f:_(o())},x}},43167:(e,t,r)=>{var n=r(51704),o=r(89753),i=r(32978),a=r(84655),l=i((function(e,t){return a(e)?n(e,o(t,1,a,!0)):[]}));e.exports=l},41391:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30547:(e,t,r)=>{var n=r(92977),o=r(88120),i=r(62064),a=r(13858);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},47240:(e,t,r)=>{var n=r(86221),o=r(79458),i=r(62064);e.exports=function(e,t){return n(e,i(t,3),o)}},48232:(e,t,r)=>{var n=r(55918),o=r(75467),i=r(47546),a=r(13858);e.exports=function(e,t){return(a(e)?n:o)(e,i(t))}},62952:(e,t,r)=>{var n=r(4616);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},11587:(e,t,r)=>{var n=r(17178),o=r(29898);e.exports=function(e,t){return null!=e&&o(e,t,n)}},53118:(e,t,r)=>{var n=r(9598),o=r(29898);e.exports=function(e,t){return null!=e&&o(e,t,n)}},10429:e=>{e.exports=function(e){return e}},38925:(e,t,r)=>{var n=r(81350),o=r(65046),i=r(47606),a=r(11646),l=r(73109),u=Math.max;e.exports=function(e,t,r,s){e=o(e)?e:l(e),r=r&&!s?a(r):0;var c=e.length;return r<0&&(r=u(c+r,0)),i(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&n(e,t,r)>-1}},92333:(e,t,r)=>{var n=r(81350),o=r(11646),i=Math.max;e.exports=function(e,t,r){var a=null==e?0:e.length;if(!a)return-1;var l=null==r?0:o(r);return l<0&&(l=i(a+l,0)),n(e,t,l)}},71641:(e,t,r)=>{var n=r(45584),o=r(73367),i=r(32978),a=r(94286),l=i((function(e){var t=n(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=l},43399:(e,t,r)=>{var n=r(35899),o=r(72982),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=u},13858:e=>{var t=Array.isArray;e.exports=t},65046:(e,t,r)=>{var n=r(21009),o=r(98061);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},84655:(e,t,r)=>{var n=r(65046),o=r(72982);e.exports=function(e){return o(e)&&n(e)}},85753:(e,t,r)=>{e=r.nmd(e);var n=r(46285),o=r(48416),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?n.Buffer:void 0,u=(l?l.isBuffer:void 0)||o;e.exports=u},90418:(e,t,r)=>{var n=r(83145),o=r(33929),i=r(43399),a=r(13858),l=r(65046),u=r(85753),s=r(47557),c=r(15805),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(l(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!n(e).length;for(var r in e)if(f.call(e,r))return!1;return!0}},8961:(e,t,r)=>{var n=r(95125);e.exports=function(e,t){return n(e,t)}},21009:(e,t,r)=>{var n=r(89124),o=r(4082);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},98061:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},61733:e=>{e.exports=function(e){return null===e}},88546:(e,t,r)=>{var n=r(89124),o=r(72982);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==n(e)}},4082:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},72982:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},47606:(e,t,r)=>{var n=r(89124),o=r(13858),i=r(72982);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},90754:(e,t,r)=>{var n=r(89124),o=r(72982);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},15805:(e,t,r)=>{var n=r(57240),o=r(34490),i=r(37001),a=i&&i.isTypedArray,l=a?o(a):n;e.exports=l},22211:e=>{e.exports=function(e){return void 0===e}},71839:(e,t,r)=>{var n=r(82509),o=r(83145),i=r(65046);e.exports=function(e){return i(e)?n(e):o(e)}},78088:(e,t,r)=>{var n=r(82509),o=r(76348),i=r(65046);e.exports=function(e){return i(e)?n(e,!0):o(e)}},32359:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},66459:function(e,t,r){e=r.nmd(e),function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,u=32,s=64,c=128,f=256,d=1/0,p=9007199254740991,h=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",s],["rearg",f]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",O="[object Number]",E="[object Object]",C="[object Promise]",j="[object RegExp]",P="[object Set]",L="[object String]",M="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",N="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",V=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,$=RegExp(Y.source),Q=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),ie=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Le="['\u2019]",Me="["+Se+"]",Ae="["+Pe+"]",Te="["+ke+"]",Ie="\\d+",Re="["+Oe+"]",Ne="["+Ee+"]",De="[^"+Se+Pe+Ie+Oe+Ee+Ce+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ce+"]",We="\\u200d",Ve="(?:"+Ne+"|"+De+")",qe="(?:"+Ue+"|"+De+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Te+"|"+ze+")"+"?",$e="["+je+"]?",Qe=$e+Ke+("(?:"+We+"(?:"+[Fe,Be,He].join("|")+")"+$e+Ke+")*"),Ze="(?:"+[Re,Be,He].join("|")+")"+Qe,Xe="(?:"+[Fe+Te+"?",Te,Be,He,Me].join("|")+")",Je=RegExp(Le,"g"),et=RegExp(Te,"g"),tt=RegExp(ze+"(?="+ze+")|"+Xe+Qe,"g"),rt=RegExp([Ue+"?"+Ne+"+"+Ge+"(?="+[Ae,Ue,"$"].join("|")+")",qe+"+"+Ye+"(?="+[Ae,Ue+Ve,"$"].join("|")+")",Ue+"?"+Ve+"+"+Ge,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ze].join("|"),"g"),nt=RegExp("["+We+Se+ke+je+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["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"],at=-1,lt={};lt[R]=lt[N]=lt[D]=lt[z]=lt[F]=lt[B]=lt[H]=lt[U]=lt[W]=!0,lt[g]=lt[y]=lt[T]=lt[b]=lt[I]=lt[w]=lt[_]=lt[x]=lt[k]=lt[O]=lt[E]=lt[j]=lt[P]=lt[L]=lt[A]=!1;var ut={};ut[g]=ut[y]=ut[T]=ut[I]=ut[b]=ut[w]=ut[R]=ut[N]=ut[D]=ut[z]=ut[F]=ut[k]=ut[O]=ut[E]=ut[j]=ut[P]=ut[L]=ut[M]=ut[B]=ut[H]=ut[U]=ut[W]=!0,ut[_]=ut[x]=ut[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ft=parseInt,dt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,gt=vt&&vt.exports===mt,yt=gt&&dt.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),wt=bt&&bt.isArrayBuffer,_t=bt&&bt.isDate,xt=bt&&bt.isMap,St=bt&&bt.isRegExp,kt=bt&&bt.isSet,Ot=bt&&bt.isTypedArray;function Et(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Pt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Lt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Mt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}function At(e,t){return!!(null==e?0:e.length)&&Ut(e,t,0)>-1}function Tt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function It(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Rt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function Dt(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function zt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ft=Gt("length");function Bt(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Ht(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ut(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Ht(e,Vt,r)}function Wt(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function Vt(e){return e!=e}function qt(e,t){var r=null==e?0:e.length;return r?$t(e,t)/r:h}function Gt(e){return function(t){return null==t?n:t[e]}}function Yt(e){return function(t){return null==e?n:e[t]}}function Kt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function $t(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Zt(e){return e?e.slice(0,hr(e)+1).replace(ie,""):e}function Xt(e){return function(t){return e(t)}}function Jt(e,t){return It(t,(function(t){return e[t]}))}function er(e,t){return e.has(t)}function tr(e,t){for(var r=-1,n=e.length;++r<n&&Ut(t,e[r],0)>-1;);return r}function rr(e,t){for(var r=e.length;r--&&Ut(t,e[r],0)>-1;);return r}var nr=Yt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),or=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+st[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var l=e[r];l!==t&&l!==a||(e[r]=a,i[o++]=r)}return i}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function fr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function dr(e){return ar(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Ft(e)}function pr(e){return ar(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var mr=Yt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var vr=function e(t){var r,ae=(t=null==t?ht:vr.defaults(ht.Object(),t,vr.pick(ht,it))).Array,Se=t.Date,ke=t.Error,Oe=t.Function,Ee=t.Math,Ce=t.Object,je=t.RegExp,Pe=t.String,Le=t.TypeError,Me=ae.prototype,Ae=Oe.prototype,Te=Ce.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,Ne=Te.hasOwnProperty,De=0,ze=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Te.toString,Be=Re.call(Ce),He=ht._,Ue=je("^"+Re.call(Ne).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=gt?t.Buffer:n,Ve=t.Symbol,qe=t.Uint8Array,Ge=We?We.allocUnsafe:n,Ye=ur(Ce.getPrototypeOf,Ce),Ke=Ce.create,$e=Te.propertyIsEnumerable,Qe=Me.splice,Ze=Ve?Ve.isConcatSpreadable:n,Xe=Ve?Ve.iterator:n,tt=Ve?Ve.toStringTag:n,nt=function(){try{var e=pi(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Se&&Se.now!==ht.Date.now&&Se.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,mt=Ee.ceil,vt=Ee.floor,yt=Ce.getOwnPropertySymbols,bt=We?We.isBuffer:n,Ft=t.isFinite,Yt=Me.join,gr=ur(Ce.keys,Ce),yr=Ee.max,br=Ee.min,wr=Se.now,_r=t.parseInt,xr=Ee.random,Sr=Me.reverse,kr=pi(t,"DataView"),Or=pi(t,"Map"),Er=pi(t,"Promise"),Cr=pi(t,"Set"),jr=pi(t,"WeakMap"),Pr=pi(Ce,"create"),Lr=jr&&new jr,Mr={},Ar=Fi(kr),Tr=Fi(Or),Ir=Fi(Er),Rr=Fi(Cr),Nr=Fi(jr),Dr=Ve?Ve.prototype:n,zr=Dr?Dr.valueOf:n,Fr=Dr?Dr.toString:n;function Br(e){if(rl(e)&&!qa(e)&&!(e instanceof Vr)){if(e instanceof Wr)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Wr(e)}var Hr=function(){function e(){}return function(t){if(!tl(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Ur(){}function Wr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Yr;++t<r;)this.add(e[t])}function $r(e){var t=this.__data__=new Gr(e);this.size=t.size}function Qr(e,t){var r=qa(e),n=!r&&Va(e),o=!r&&!n&&$a(e),i=!r&&!n&&!o&&cl(e),a=r||n||o||i,l=a?Qt(e.length,Pe):[],u=l.length;for(var s in e)!t&&!Ne.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wi(s,u))||l.push(s);return l}function Zr(e){var t=e.length;return t?e[$n(0,t-1)]:n}function Xr(e,t){return Ni(Mo(e),un(t,0,e.length))}function Jr(e){return Ni(Mo(e))}function en(e,t,r){(r!==n&&!Ha(e[t],r)||r===n&&!(t in e))&&an(e,t,r)}function tn(e,t,r){var o=e[t];Ne.call(e,t)&&Ha(o,r)&&(r!==n||t in e)||an(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if(Ha(e[r][0],t))return r;return-1}function nn(e,t,r,n){return pn(e,(function(e,o,i){t(n,e,r(e),i)})),n}function on(e,t){return e&&Ao(t,Al(t),e)}function an(e,t,r){"__proto__"==t&&nt?nt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ln(e,t){for(var r=-1,o=t.length,i=ae(o),a=null==e;++r<o;)i[r]=a?n:Cl(e,t[r]);return i}function un(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sn(e,t,r,o,i,a){var l,u=1&t,s=2&t,c=4&t;if(r&&(l=i?r(e,o,i,a):r(e)),l!==n)return l;if(!tl(e))return e;var f=qa(e);if(f){if(l=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Mo(e,l)}else{var d=vi(e),p=d==x||d==S;if($a(e))return Oo(e,u);if(d==E||d==g||p&&!i){if(l=s||p?{}:yi(e),!u)return s?function(e,t){return Ao(e,mi(e),t)}(e,function(e,t){return e&&Ao(t,Tl(t),e)}(l,e)):function(e,t){return Ao(e,hi(e),t)}(e,on(l,e))}else{if(!ut[d])return i?e:{};l=function(e,t,r){var n=e.constructor;switch(t){case T:return Eo(e);case b:case w:return new n(+e);case I:return function(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case N:case D:case z:case F:case B:case H:case U:case W:return Co(e,r);case k:return new n;case O:case L:return new n(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new n;case M:return o=e,zr?Ce(zr.call(o)):{}}var o}(e,d,u)}}a||(a=new $r);var h=a.get(e);if(h)return h;a.set(e,l),ll(e)?e.forEach((function(n){l.add(sn(n,t,r,n,e,a))})):nl(e)&&e.forEach((function(n,o){l.set(o,sn(n,t,r,o,e,a))}));var m=f?n:(c?s?ai:ii:s?Tl:Al)(e);return jt(m||e,(function(n,o){m&&(n=e[o=n]),tn(l,o,sn(n,t,r,o,e,a))})),l}function cn(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ce(e);o--;){var i=r[o],a=t[i],l=e[i];if(l===n&&!(i in e)||!a(l))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Le(o);return Ai((function(){e.apply(n,r)}),t)}function dn(e,t,r,n){var o=-1,i=At,a=!0,l=e.length,u=[],s=t.length;if(!l)return u;r&&(t=It(t,Xt(r))),n?(i=Tt,a=!1):t.length>=200&&(i=er,a=!1,t=new Kr(t));e:for(;++o<l;){var c=e[o],f=null==r?c:r(c);if(c=n||0!==c?c:0,a&&f==f){for(var d=s;d--;)if(t[d]===f)continue e;u.push(c)}else i(t,f,n)||u.push(c)}return u}Br.templateSettings={escape:Z,evaluate:X,interpolate:J,variable:"",imports:{_:Br}},Br.prototype=Ur.prototype,Br.prototype.constructor=Br,Wr.prototype=Hr(Ur.prototype),Wr.prototype.constructor=Wr,Vr.prototype=Hr(Ur.prototype),Vr.prototype.constructor=Vr,qr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},qr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qr.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===i?n:r}return Ne.call(t,e)?t[e]:n},qr.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==n:Ne.call(t,e)},qr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===n?i:t,this},Gr.prototype.clear=function(){this.__data__=[],this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Qe.call(t,r,1),--this.size,!0)},Gr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?n:t[r][1]},Gr.prototype.has=function(e){return rn(this.__data__,e)>-1},Gr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Yr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Or||Gr),string:new qr}},Yr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Yr.prototype.get=function(e){return fi(this,e).get(e)},Yr.prototype.has=function(e){return fi(this,e).has(e)},Yr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,i),this},Kr.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.clear=function(){this.__data__=new Gr,this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$r.prototype.get=function(e){return this.__data__.get(e)},$r.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Gr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(_n),hn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],l=t(a);if(null!=l&&(u===n?l==l&&!sl(l):r(l,u)))var u=l,s=a}return s}function gn(e,t){var r=[];return pn(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function yn(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=bi),o||(o=[]);++i<a;){var l=e[i];t>0&&r(l)?t>1?yn(l,t-1,r,n,o):Rt(o,l):n||(o[o.length]=l)}return o}var bn=No(),wn=No(!0);function _n(e,t){return e&&bn(e,t,Al)}function xn(e,t){return e&&wn(e,t,Al)}function Sn(e,t){return Mt(t,(function(t){return Xa(e[t])}))}function kn(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&r<o;)e=e[zi(t[r++])];return r&&r==o?e:n}function On(e,t,r){var n=t(e);return qa(e)?n:Rt(n,r(e))}function En(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in Ce(e)?function(e){var t=Ne.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch(e){}var i=Fe.call(e);o&&(t?e[tt]=r:delete e[tt]);return i}(e):function(e){return Fe.call(e)}(e)}function Cn(e,t){return e>t}function jn(e,t){return null!=e&&Ne.call(e,t)}function Pn(e,t){return null!=e&&t in Ce(e)}function Ln(e,t,r){for(var o=r?Tt:At,i=e[0].length,a=e.length,l=a,u=ae(a),s=1/0,c=[];l--;){var f=e[l];l&&t&&(f=It(f,Xt(t))),s=br(f.length,s),u[l]=!r&&(t||i>=120&&f.length>=120)?new Kr(l&&f):n}f=e[0];var d=-1,p=u[0];e:for(;++d<i&&c.length<s;){var h=f[d],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?er(p,m):o(c,m,r))){for(l=a;--l;){var v=u[l];if(!(v?er(v,m):o(e[l],m,r)))continue e}p&&p.push(m),c.push(h)}}return c}function Mn(e,t,r){var o=null==(e=Pi(e,t=_o(t,e)))?e:e[zi(Zi(t))];return null==o?n:Et(o,e,r)}function An(e){return rl(e)&&En(e)==g}function Tn(e,t,r,o,i){return e===t||(null==e||null==t||!rl(e)&&!rl(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var l=qa(e),u=qa(t),s=l?y:vi(e),c=u?y:vi(t),f=(s=s==g?E:s)==E,d=(c=c==g?E:c)==E,p=s==c;if(p&&$a(e)){if(!$a(t))return!1;l=!0,f=!1}if(p&&!f)return a||(a=new $r),l||cl(e)?ni(e,t,r,o,i,a):function(e,t,r,n,o,i,a){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!i(new qe(e),new qe(t)));case b:case w:case O:return Ha(+e,+t);case _:return e.name==t.name&&e.message==t.message;case j:case L:return e==t+"";case k:var l=lr;case P:var u=1&n;if(l||(l=cr),e.size!=t.size&&!u)return!1;var s=a.get(e);if(s)return s==t;n|=2,a.set(e,t);var c=ni(l(e),l(t),n,o,i,a);return a.delete(e),c;case M:if(zr)return zr.call(e)==zr.call(t)}return!1}(e,t,s,r,o,i,a);if(!(1&r)){var h=f&&Ne.call(e,"__wrapped__"),m=d&&Ne.call(t,"__wrapped__");if(h||m){var v=h?e.value():e,x=m?t.value():t;return a||(a=new $r),i(v,x,r,o,a)}}if(!p)return!1;return a||(a=new $r),function(e,t,r,o,i,a){var l=1&r,u=ii(e),s=u.length,c=ii(t),f=c.length;if(s!=f&&!l)return!1;var d=s;for(;d--;){var p=u[d];if(!(l?p in t:Ne.call(t,p)))return!1}var h=a.get(e),m=a.get(t);if(h&&m)return h==t&&m==e;var v=!0;a.set(e,t),a.set(t,e);var g=l;for(;++d<s;){var y=e[p=u[d]],b=t[p];if(o)var w=l?o(b,y,p,t,e,a):o(y,b,p,e,t,a);if(!(w===n?y===b||i(y,b,r,o,a):w)){v=!1;break}g||(g="constructor"==p)}if(v&&!g){var _=e.constructor,x=t.constructor;_==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,r,o,i,a)}(e,t,r,o,Tn,i))}function In(e,t,r,o){var i=r.length,a=i,l=!o;if(null==e)return!a;for(e=Ce(e);i--;){var u=r[i];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var s=(u=r[i])[0],c=e[s],f=u[1];if(l&&u[2]){if(c===n&&!(s in e))return!1}else{var d=new $r;if(o)var p=o(c,f,s,e,t,d);if(!(p===n?Tn(f,c,3,o,d):p))return!1}}return!0}function Rn(e){return!(!tl(e)||(t=e,ze&&ze in t))&&(Xa(e)?Ue:ge).test(Fi(e));var t}function Nn(e){return"function"==typeof e?e:null==e?ou:"object"==typeof e?qa(e)?Un(e[0],e[1]):Hn(e):pu(e)}function Dn(e){if(!Oi(e))return gr(e);var t=[];for(var r in Ce(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function zn(e){if(!tl(e))return function(e){var t=[];if(null!=e)for(var r in Ce(e))t.push(r);return t}(e);var t=Oi(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}function Fn(e,t){return e<t}function Bn(e,t){var r=-1,n=Ya(e)?ae(e.length):[];return pn(e,(function(e,o,i){n[++r]=t(e,o,i)})),n}function Hn(e){var t=di(e);return 1==t.length&&t[0][2]?Ci(t[0][0],t[0][1]):function(r){return r===e||In(r,e,t)}}function Un(e,t){return xi(e)&&Ei(t)?Ci(zi(e),t):function(r){var o=Cl(r,e);return o===n&&o===t?jl(r,e):Tn(t,o,3)}}function Wn(e,t,r,o,i){e!==t&&bn(t,(function(a,l){if(i||(i=new $r),tl(a))!function(e,t,r,o,i,a,l){var u=Li(e,r),s=Li(t,r),c=l.get(s);if(c)return void en(e,r,c);var f=a?a(u,s,r+"",e,t,l):n,d=f===n;if(d){var p=qa(s),h=!p&&$a(s),m=!p&&!h&&cl(s);f=s,p||h||m?qa(u)?f=u:Ka(u)?f=Mo(u):h?(d=!1,f=Oo(s,!0)):m?(d=!1,f=Co(s,!0)):f=[]:il(s)||Va(s)?(f=u,Va(u)?f=yl(u):tl(u)&&!Xa(u)||(f=yi(s))):d=!1}d&&(l.set(s,f),i(f,s,o,a,l),l.delete(s));en(e,r,f)}(e,t,l,r,Wn,o,i);else{var u=o?o(Li(e,l),a,l+"",e,t,i):n;u===n&&(u=a),en(e,l,u)}}),Tl)}function Vn(e,t){var r=e.length;if(r)return wi(t+=t<0?r:0,r)?e[t]:n}function qn(e,t,r){t=t.length?It(t,(function(e){return qa(e)?function(t){return kn(t,1===e.length?e[0]:e)}:e})):[ou];var n=-1;t=It(t,Xt(ci()));var o=Bn(e,(function(e,r,o){var i=It(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,(function(e,t){return function(e,t,r){var n=-1,o=e.criteria,i=t.criteria,a=o.length,l=r.length;for(;++n<a;){var u=jo(o[n],i[n]);if(u)return n>=l?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Gn(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],l=kn(e,a);r(l,a)&&eo(i,_o(a,e),l)}return i}function Yn(e,t,r,n){var o=n?Wt:Ut,i=-1,a=t.length,l=e;for(e===t&&(t=Mo(t)),r&&(l=It(e,Xt(r)));++i<a;)for(var u=0,s=t[i],c=r?r(s):s;(u=o(l,c,u,n))>-1;)l!==e&&Qe.call(l,u,1),Qe.call(e,u,1);return e}function Kn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;wi(o)?Qe.call(e,o,1):po(e,o)}}return e}function $n(e,t){return e+vt(xr()*(t-e+1))}function Qn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ti(ji(e,t,ou),e+"")}function Xn(e){return Zr(Hl(e))}function Jn(e,t){var r=Hl(e);return Ni(r,un(t,0,r.length))}function eo(e,t,r,o){if(!tl(e))return e;for(var i=-1,a=(t=_o(t,e)).length,l=a-1,u=e;null!=u&&++i<a;){var s=zi(t[i]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=l){var f=u[s];(c=o?o(f,s,u):n)===n&&(c=tl(f)?f:wi(t[i+1])?[]:{})}tn(u,s,c),u=u[s]}return e}var to=Lr?function(e,t){return Lr.set(e,t),e}:ou,ro=nt?function(e,t){return nt(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:ou;function no(e){return Ni(Hl(e))}function oo(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=ae(o);++n<o;)i[n]=e[n+t];return i}function io(e,t){var r;return pn(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ao(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,a=e[i];null!==a&&!sl(a)&&(r?a<=t:a<t)?n=i+1:o=i}return o}return lo(e,t,ou,r)}function lo(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var l=(t=r(t))!=t,u=null===t,s=sl(t),c=t===n;i<a;){var f=vt((i+a)/2),d=r(e[f]),p=d!==n,h=null===d,m=d==d,v=sl(d);if(l)var g=o||m;else g=c?m&&(o||p):u?m&&p&&(o||!h):s?m&&p&&!h&&(o||!v):!h&&!v&&(o?d<=t:d<t);g?i=f+1:a=f}return br(a,4294967294)}function uo(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var a=e[r],l=t?t(a):a;if(!r||!Ha(l,u)){var u=l;i[o++]=0===a?0:a}}return i}function so(e){return"number"==typeof e?e:sl(e)?h:+e}function co(e){if("string"==typeof e)return e;if(qa(e))return It(e,co)+"";if(sl(e))return Fr?Fr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,r){var n=-1,o=At,i=e.length,a=!0,l=[],u=l;if(r)a=!1,o=Tt;else if(i>=200){var s=t?null:Zo(e);if(s)return cr(s);a=!1,o=er,u=new Kr}else u=t?[]:l;e:for(;++n<i;){var c=e[n],f=t?t(c):c;if(c=r||0!==c?c:0,a&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),l.push(c)}else o(u,f,r)||(u!==l&&u.push(f),l.push(c))}return l}function po(e,t){return null==(e=Pi(e,t=_o(t,e)))||delete e[zi(Zi(t))]}function ho(e,t,r,n){return eo(e,t,r(kn(e,t)),n)}function mo(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?oo(e,n?0:i,n?i+1:o):oo(e,n?i+1:0,n?o:i)}function vo(e,t){var r=e;return r instanceof Vr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))}),r)}function go(e,t,r){var n=e.length;if(n<2)return n?fo(e[0]):[];for(var o=-1,i=ae(n);++o<n;)for(var a=e[o],l=-1;++l<n;)l!=o&&(i[o]=dn(i[o]||a,e[l],t,r));return fo(yn(i,1),t,r)}function yo(e,t,r){for(var o=-1,i=e.length,a=t.length,l={};++o<i;){var u=o<a?t[o]:n;r(l,e[o],u)}return l}function bo(e){return Ka(e)?e:[]}function wo(e){return"function"==typeof e?e:ou}function _o(e,t){return qa(e)?e:xi(e,t)?[e]:Di(bl(e))}var xo=Zn;function So(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:oo(e,t,r)}var ko=st||function(e){return ht.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function Eo(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Co(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=sl(e),l=t!==n,u=null===t,s=t==t,c=sl(t);if(!u&&!c&&!a&&e>t||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&e<t||c&&r&&i&&!o&&!a||u&&r&&i||!l&&i||!s)return-1}return 0}function Po(e,t,r,n){for(var o=-1,i=e.length,a=r.length,l=-1,u=t.length,s=yr(i-a,0),c=ae(u+s),f=!n;++l<u;)c[l]=t[l];for(;++o<a;)(f||o<i)&&(c[r[o]]=e[o]);for(;s--;)c[l++]=e[o++];return c}function Lo(e,t,r,n){for(var o=-1,i=e.length,a=-1,l=r.length,u=-1,s=t.length,c=yr(i-l,0),f=ae(c+s),d=!n;++o<c;)f[o]=e[o];for(var p=o;++u<s;)f[p+u]=t[u];for(;++a<l;)(d||o<i)&&(f[p+r[a]]=e[o++]);return f}function Mo(e,t){var r=-1,n=e.length;for(t||(t=ae(n));++r<n;)t[r]=e[r];return t}function Ao(e,t,r,o){var i=!r;r||(r={});for(var a=-1,l=t.length;++a<l;){var u=t[a],s=o?o(r[u],e[u],u,r,e):n;s===n&&(s=e[u]),i?an(r,u,s):tn(r,u,s)}return r}function To(e,t){return function(r,n){var o=qa(r)?Ct:nn,i=t?t():{};return o(r,e,ci(n,2),i)}}function Io(e){return Zn((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,l=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,l&&_i(r[0],r[1],l)&&(a=i<3?n:a,i=1),t=Ce(t);++o<i;){var u=r[o];u&&e(t,u,o,a)}return t}))}function Ro(e,t){return function(r,n){if(null==r)return r;if(!Ya(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Ce(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}function No(e){return function(t,r,n){for(var o=-1,i=Ce(t),a=n(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===r(i[u],u,i))break}return t}}function Do(e){return function(t){var r=ar(t=bl(t))?pr(t):n,o=r?r[0]:t.charAt(0),i=r?So(r,1).join(""):t.slice(1);return o[e]()+i}}function zo(e){return function(t){return Nt(Xl(Vl(t).replace(Je,"")),e,"")}}function Fo(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 r=Hr(e.prototype),n=e.apply(r,t);return tl(n)?n:r}}function Bo(e){return function(t,r,o){var i=Ce(t);if(!Ya(t)){var a=ci(r,3);t=Al(t),r=function(e){return a(i[e],e,i)}}var l=e(t,r,o);return l>-1?i[a?t[l]:l]:n}}function Ho(e){return oi((function(t){var r=t.length,i=r,a=Wr.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new Le(o);if(a&&!u&&"wrapper"==ui(l))var u=new Wr([],!0)}for(i=u?i:r;++i<r;){var s=ui(l=t[i]),c="wrapper"==s?li(l):n;u=c&&Si(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[ui(c[0])].apply(u,c[3]):1==l.length&&Si(l)?u[s]():u.thru(l)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&qa(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Uo(e,t,r,o,i,a,l,u,s,f){var d=t&c,p=1&t,h=2&t,m=24&t,v=512&t,g=h?n:Fo(e);return function c(){for(var y=arguments.length,b=ae(y),w=y;w--;)b[w]=arguments[w];if(m)var _=si(c),x=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(b,_);if(o&&(b=Po(b,o,i,m)),a&&(b=Lo(b,a,l,m)),y-=x,m&&y<f){var S=sr(b,_);return $o(e,t,Uo,c.placeholder,r,b,S,u,s,f-y)}var k=p?r:this,O=h?k[e]:e;return y=b.length,u?b=function(e,t){var r=e.length,o=br(t.length,r),i=Mo(e);for(;o--;){var a=t[o];e[o]=wi(a,r)?i[a]:n}return e}(b,u):v&&y>1&&b.reverse(),d&&s<y&&(b.length=s),this&&this!==ht&&this instanceof c&&(O=g||Fo(O)),O.apply(k,b)}}function Wo(e,t){return function(r,n){return function(e,t,r,n){return _n(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function Vo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=co(r),o=co(o)):(r=so(r),o=so(o)),i=e(r,o)}return i}}function qo(e){return oi((function(t){return t=It(t,Xt(ci())),Zn((function(r){var n=this;return e(t,(function(e){return Et(e,n,r)}))}))}))}function Go(e,t){var r=(t=t===n?" ":co(t)).length;if(r<2)return r?Qn(t,e):t;var o=Qn(t,mt(e/dr(t)));return ar(t)?So(pr(o),0,e).join(""):o.slice(0,e)}function Yo(e){return function(t,r,o){return o&&"number"!=typeof o&&_i(t,r,o)&&(r=o=n),t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r,n){for(var o=-1,i=yr(mt((t-e)/(r||1)),0),a=ae(i);i--;)a[n?i:++o]=e,e+=r;return a}(t,r,o=o===n?t<r?1:-1:hl(o),e)}}function Ko(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=gl(t),r=gl(r)),e(t,r)}}function $o(e,t,r,o,i,a,l,c,f,d){var p=8&t;t|=p?u:s,4&(t&=~(p?s:u))||(t&=-4);var h=[e,t,i,p?a:n,p?l:n,p?n:a,p?n:l,c,f,d],m=r.apply(n,h);return Si(e)&&Mi(m,h),m.placeholder=o,Ii(m,e,t)}function Qo(e){var t=Ee[e];return function(e,r){if(e=gl(e),(r=null==r?0:br(ml(r),292))&&Ft(e)){var n=(bl(e)+"e").split("e");return+((n=(bl(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Zo=Cr&&1/cr(new Cr([,-0]))[1]==d?function(e){return new Cr(e)}:su;function Xo(e){return function(t){var r=vi(t);return r==k?lr(t):r==P?fr(t):function(e,t){return It(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Jo(e,t,r,i,d,p,h,m){var v=2&t;if(!v&&"function"!=typeof e)throw new Le(o);var g=i?i.length:0;if(g||(t&=-97,i=d=n),h=h===n?h:yr(ml(h),0),m=m===n?m:ml(m),g-=d?d.length:0,t&s){var y=i,b=d;i=d=n}var w=v?n:li(e),_=[e,t,r,i,d,y,b,p,h,m];if(w&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,l=n==c&&8==r||n==c&&r==f&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!l)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var s=e[3];e[3]=s?Po(s,u,t[4]):u,e[4]=s?sr(e[3],a):t[4]}(u=t[5])&&(s=e[5],e[5]=s?Lo(s,u,t[6]):u,e[6]=s?sr(e[5],a):t[6]);(u=t[7])&&(e[7]=u);n&c&&(e[8]=null==e[8]?t[8]:br(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(_,w),e=_[0],t=_[1],r=_[2],i=_[3],d=_[4],!(m=_[9]=_[9]===n?v?0:e.length:yr(_[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==l?function(e,t,r){var o=Fo(e);return function i(){for(var a=arguments.length,l=ae(a),u=a,s=si(i);u--;)l[u]=arguments[u];var c=a<3&&l[0]!==s&&l[a-1]!==s?[]:sr(l,s);return(a-=c.length)<r?$o(e,t,Uo,i.placeholder,n,l,c,n,n,r-a):Et(this&&this!==ht&&this instanceof i?o:e,this,l)}}(e,t,m):t!=u&&33!=t||d.length?Uo.apply(n,_):function(e,t,r,n){var o=1&t,i=Fo(e);return function t(){for(var a=-1,l=arguments.length,u=-1,s=n.length,c=ae(s+l),f=this&&this!==ht&&this instanceof t?i:e;++u<s;)c[u]=n[u];for(;l--;)c[u++]=arguments[++a];return Et(f,o?r:this,c)}}(e,t,r,i);else var x=function(e,t,r){var n=1&t,o=Fo(e);return function t(){return(this&&this!==ht&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Ii((w?to:Mi)(x,_),e,t)}function ei(e,t,r,o){return e===n||Ha(e,Te[r])&&!Ne.call(o,r)?t:e}function ti(e,t,r,o,i,a){return tl(e)&&tl(t)&&(a.set(t,e),Wn(e,t,n,ti,a),a.delete(t)),e}function ri(e){return il(e)?n:e}function ni(e,t,r,o,i,a){var l=1&r,u=e.length,s=t.length;if(u!=s&&!(l&&s>u))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,h=2&r?new Kr:n;for(a.set(e,t),a.set(t,e);++d<u;){var m=e[d],v=t[d];if(o)var g=l?o(v,m,d,t,e,a):o(m,v,d,e,t,a);if(g!==n){if(g)continue;p=!1;break}if(h){if(!zt(t,(function(e,t){if(!er(h,t)&&(m===e||i(m,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(m!==v&&!i(m,v,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function oi(e){return Ti(ji(e,n,Gi),e+"")}function ii(e){return On(e,Al,hi)}function ai(e){return On(e,Tl,mi)}var li=Lr?function(e){return Lr.get(e)}:su;function ui(e){for(var t=e.name+"",r=Mr[t],n=Ne.call(Mr,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function si(e){return(Ne.call(Br,"placeholder")?Br:e).placeholder}function ci(){var e=Br.iteratee||iu;return e=e===iu?Nn:e,arguments.length?e(arguments[0],arguments[1]):e}function fi(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function di(e){for(var t=Al(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Ei(o)]}return t}function pi(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Rn(r)?r:n}var hi=yt?function(e){return null==e?[]:(e=Ce(e),Mt(yt(e),(function(t){return $e.call(e,t)})))}:vu,mi=yt?function(e){for(var t=[];e;)Rt(t,hi(e)),e=Ye(e);return t}:vu,vi=En;function gi(e,t,r){for(var n=-1,o=(t=_o(t,e)).length,i=!1;++n<o;){var a=zi(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&el(o)&&wi(a,o)&&(qa(e)||Va(e))}function yi(e){return"function"!=typeof e.constructor||Oi(e)?{}:Hr(Ye(e))}function bi(e){return qa(e)||Va(e)||!!(Ze&&e&&e[Ze])}function wi(e,t){var r=typeof e;return!!(t=null==t?p:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function _i(e,t,r){if(!tl(r))return!1;var n=typeof t;return!!("number"==n?Ya(r)&&wi(t,r.length):"string"==n&&t in r)&&Ha(r[t],e)}function xi(e,t){if(qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!sl(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Ce(t))}function Si(e){var t=ui(e),r=Br[t];if("function"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=li(r);return!!n&&e===n[0]}(kr&&vi(new kr(new ArrayBuffer(1)))!=I||Or&&vi(new Or)!=k||Er&&vi(Er.resolve())!=C||Cr&&vi(new Cr)!=P||jr&&vi(new jr)!=A)&&(vi=function(e){var t=En(e),r=t==E?e.constructor:n,o=r?Fi(r):"";if(o)switch(o){case Ar:return I;case Tr:return k;case Ir:return C;case Rr:return P;case Nr:return A}return t});var ki=Ie?Xa:gu;function Oi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function Ei(e){return e==e&&!tl(e)}function Ci(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Ce(r)))}}function ji(e,t,r){return t=yr(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=yr(n.length-t,0),a=ae(i);++o<i;)a[o]=n[t+o];o=-1;for(var l=ae(t+1);++o<t;)l[o]=n[o];return l[t]=r(a),Et(e,this,l)}}function Pi(e,t){return t.length<2?e:kn(e,oo(t,0,-1))}function Li(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Mi=Ri(to),Ai=pt||function(e,t){return ht.setTimeout(e,t)},Ti=Ri(ro);function Ii(e,t,r){var n=t+"";return Ti(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return jt(v,(function(r){var n="_."+r[0];t&r[1]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var o=wr(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=$n(r,i),l=e[a];e[a]=e[r],e[r]=l}return e.length=t,e}var Di=function(e){var t=Ra(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,r,n,o){t.push(n?o.replace(de,"$1"):r||e)})),t}));function zi(e){if("string"==typeof e||sl(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fi(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bi(e){if(e instanceof Vr)return e.clone();var t=new Wr(e.__wrapped__,e.__chain__);return t.__actions__=Mo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Hi=Zn((function(e,t){return Ka(e)?dn(e,yn(t,1,Ka,!0)):[]})),Ui=Zn((function(e,t){var r=Zi(t);return Ka(r)&&(r=n),Ka(e)?dn(e,yn(t,1,Ka,!0),ci(r,2)):[]})),Wi=Zn((function(e,t){var r=Zi(t);return Ka(r)&&(r=n),Ka(e)?dn(e,yn(t,1,Ka,!0),n,r):[]}));function Vi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ht(e,ci(t,3),o)}function qi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=ml(r),i=r<0?yr(o+i,0):br(i,o-1)),Ht(e,ci(t,3),i,!0)}function Gi(e){return(null==e?0:e.length)?yn(e,1):[]}function Yi(e){return e&&e.length?e[0]:n}var Ki=Zn((function(e){var t=It(e,bo);return t.length&&t[0]===e[0]?Ln(t):[]})),$i=Zn((function(e){var t=Zi(e),r=It(e,bo);return t===Zi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Ln(r,ci(t,2)):[]})),Qi=Zn((function(e){var t=Zi(e),r=It(e,bo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Ln(r,n,t):[]}));function Zi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Xi=Zn(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Yn(e,t):e}var ea=oi((function(e,t){var r=null==e?0:e.length,n=ln(e,t);return Kn(e,It(t,(function(e){return wi(e,r)?+e:e})).sort(jo)),n}));function ta(e){return null==e?e:Sr.call(e)}var ra=Zn((function(e){return fo(yn(e,1,Ka,!0))})),na=Zn((function(e){var t=Zi(e);return Ka(t)&&(t=n),fo(yn(e,1,Ka,!0),ci(t,2))})),oa=Zn((function(e){var t=Zi(e);return t="function"==typeof t?t:n,fo(yn(e,1,Ka,!0),n,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Mt(e,(function(e){if(Ka(e))return t=yr(e.length,t),!0})),Qt(t,(function(t){return It(e,Gt(t))}))}function aa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:It(r,(function(e){return Et(t,n,e)}))}var la=Zn((function(e,t){return Ka(e)?dn(e,t):[]})),ua=Zn((function(e){return go(Mt(e,Ka))})),sa=Zn((function(e){var t=Zi(e);return Ka(t)&&(t=n),go(Mt(e,Ka),ci(t,2))})),ca=Zn((function(e){var t=Zi(e);return t="function"==typeof t?t:n,go(Mt(e,Ka),n,t)})),fa=Zn(ia);var da=Zn((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,aa(e,r)}));function pa(e){var t=Br(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=oi((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Vr&&wi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:n}),new Wr(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var va=To((function(e,t,r){Ne.call(e,r)?++e[r]:an(e,r,1)}));var ga=Bo(Vi),ya=Bo(qi);function ba(e,t){return(qa(e)?jt:pn)(e,ci(t,3))}function wa(e,t){return(qa(e)?Pt:hn)(e,ci(t,3))}var _a=To((function(e,t,r){Ne.call(e,r)?e[r].push(t):an(e,r,[t])}));var xa=Zn((function(e,t,r){var n=-1,o="function"==typeof t,i=Ya(e)?ae(e.length):[];return pn(e,(function(e){i[++n]=o?Et(t,e,r):Mn(e,t,r)})),i})),Sa=To((function(e,t,r){an(e,r,t)}));function ka(e,t){return(qa(e)?It:Bn)(e,ci(t,3))}var Oa=To((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_i(e,t[0],t[1])?t=[]:r>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,yn(t,1),[])})),Ca=dt||function(){return ht.Date.now()};function ja(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,c,n,n,n,n,t)}function Pa(e,t){var r;if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var La=Zn((function(e,t,r){var n=1;if(r.length){var o=sr(r,si(La));n|=u}return Jo(e,n,t,r,o)})),Ma=Zn((function(e,t,r){var n=3;if(r.length){var o=sr(r,si(Ma));n|=u}return Jo(t,n,e,r,o)}));function Aa(e,t,r){var i,a,l,u,s,c,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Le(o);function m(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function v(e){var r=e-c;return c===n||r>=t||r<0||p&&e-f>=l}function g(){var e=Ca();if(v(e))return y(e);s=Ai(g,function(e){var r=t-(e-c);return p?br(r,l-(e-f)):r}(e))}function y(e){return s=n,h&&i?m(e):(i=a=n,u)}function b(){var e=Ca(),r=v(e);if(i=arguments,a=this,c=e,r){if(s===n)return function(e){return f=e,s=Ai(g,t),d?m(e):u}(c);if(p)return ko(s),s=Ai(g,t),m(c)}return s===n&&(s=Ai(g,t)),u}return t=gl(t)||0,tl(r)&&(d=!!r.leading,l=(p="maxWait"in r)?yr(gl(r.maxWait)||0,t):l,h="trailing"in r?!!r.trailing:h),b.cancel=function(){s!==n&&ko(s),f=0,i=c=a=s=n},b.flush=function(){return s===n?u:y(Ca())},b}var Ta=Zn((function(e,t){return fn(e,1,t)})),Ia=Zn((function(e,t,r){return fn(e,gl(t)||0,r)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ra.Cache||Yr),r}function Na(e){if("function"!=typeof e)throw new Le(o);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)}}Ra.Cache=Yr;var Da=xo((function(e,t){var r=(t=1==t.length&&qa(t[0])?It(t[0],Xt(ci())):It(yn(t,1),Xt(ci()))).length;return Zn((function(n){for(var o=-1,i=br(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return Et(e,this,n)}))})),za=Zn((function(e,t){var r=sr(t,si(za));return Jo(e,u,n,t,r)})),Fa=Zn((function(e,t){var r=sr(t,si(Fa));return Jo(e,s,n,t,r)})),Ba=oi((function(e,t){return Jo(e,f,n,n,n,t)}));function Ha(e,t){return e===t||e!=e&&t!=t}var Ua=Ko(Cn),Wa=Ko((function(e,t){return e>=t})),Va=An(function(){return arguments}())?An:function(e){return rl(e)&&Ne.call(e,"callee")&&!$e.call(e,"callee")},qa=ae.isArray,Ga=wt?Xt(wt):function(e){return rl(e)&&En(e)==T};function Ya(e){return null!=e&&el(e.length)&&!Xa(e)}function Ka(e){return rl(e)&&Ya(e)}var $a=bt||gu,Qa=_t?Xt(_t):function(e){return rl(e)&&En(e)==w};function Za(e){if(!rl(e))return!1;var t=En(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Xa(e){if(!tl(e))return!1;var t=En(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ml(e)}function el(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rl(e){return null!=e&&"object"==typeof e}var nl=xt?Xt(xt):function(e){return rl(e)&&vi(e)==k};function ol(e){return"number"==typeof e||rl(e)&&En(e)==O}function il(e){if(!rl(e)||En(e)!=E)return!1;var t=Ye(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Be}var al=St?Xt(St):function(e){return rl(e)&&En(e)==j};var ll=kt?Xt(kt):function(e){return rl(e)&&vi(e)==P};function ul(e){return"string"==typeof e||!qa(e)&&rl(e)&&En(e)==L}function sl(e){return"symbol"==typeof e||rl(e)&&En(e)==M}var cl=Ot?Xt(Ot):function(e){return rl(e)&&el(e.length)&&!!lt[En(e)]};var fl=Ko(Fn),dl=Ko((function(e,t){return e<=t}));function pl(e){if(!e)return[];if(Ya(e))return ul(e)?pr(e):Mo(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=vi(e);return(t==k?lr:t==P?cr:Hl)(e)}function hl(e){return e?(e=gl(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ml(e){var t=hl(e),r=t%1;return t==t?r?t-r:t:0}function vl(e){return e?un(ml(e),0,m):0}function gl(e){if("number"==typeof e)return e;if(sl(e))return h;if(tl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ve.test(e);return r||ye.test(e)?ft(e.slice(2),r?2:8):me.test(e)?h:+e}function yl(e){return Ao(e,Tl(e))}function bl(e){return null==e?"":co(e)}var wl=Io((function(e,t){if(Oi(t)||Ya(t))Ao(t,Al(t),e);else for(var r in t)Ne.call(t,r)&&tn(e,r,t[r])})),_l=Io((function(e,t){Ao(t,Tl(t),e)})),xl=Io((function(e,t,r,n){Ao(t,Tl(t),e,n)})),Sl=Io((function(e,t,r,n){Ao(t,Al(t),e,n)})),kl=oi(ln);var Ol=Zn((function(e,t){e=Ce(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&_i(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],l=Tl(a),u=-1,s=l.length;++u<s;){var c=l[u],f=e[c];(f===n||Ha(f,Te[c])&&!Ne.call(e,c))&&(e[c]=a[c])}return e})),El=Zn((function(e){return e.push(n,ti),Et(Rl,n,e)}));function Cl(e,t,r){var o=null==e?n:kn(e,t);return o===n?r:o}function jl(e,t){return null!=e&&gi(e,t,Pn)}var Pl=Wo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=r}),tu(ou)),Ll=Wo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),ci),Ml=Zn(Mn);function Al(e){return Ya(e)?Qr(e):Dn(e)}function Tl(e){return Ya(e)?Qr(e,!0):zn(e)}var Il=Io((function(e,t,r){Wn(e,t,r)})),Rl=Io((function(e,t,r,n){Wn(e,t,r,n)})),Nl=oi((function(e,t){var r={};if(null==e)return r;var n=!1;t=It(t,(function(t){return t=_o(t,e),n||(n=t.length>1),t})),Ao(e,ai(e),r),n&&(r=sn(r,7,ri));for(var o=t.length;o--;)po(r,t[o]);return r}));var Dl=oi((function(e,t){return null==e?{}:function(e,t){return Gn(e,t,(function(t,r){return jl(e,r)}))}(e,t)}));function zl(e,t){if(null==e)return{};var r=It(ai(e),(function(e){return[e]}));return t=ci(t),Gn(e,r,(function(e,r){return t(e,r[0])}))}var Fl=Xo(Al),Bl=Xo(Tl);function Hl(e){return null==e?[]:Jt(e,Al(e))}var Ul=zo((function(e,t,r){return t=t.toLowerCase(),e+(r?Wl(t):t)}));function Wl(e){return Zl(bl(e).toLowerCase())}function Vl(e){return(e=bl(e))&&e.replace(we,nr).replace(et,"")}var ql=zo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gl=zo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Yl=Do("toLowerCase");var Kl=zo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var $l=zo((function(e,t,r){return e+(r?" ":"")+Zl(t)}));var Ql=zo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zl=Do("toUpperCase");function Xl(e,t,r){return e=bl(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Jl=Zn((function(e,t){try{return Et(e,n,t)}catch(e){return Za(e)?e:new ke(e)}})),eu=oi((function(e,t){return jt(t,(function(t){t=zi(t),an(e,t,La(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Ho(),nu=Ho(!0);function ou(e){return e}function iu(e){return Nn("function"==typeof e?e:sn(e,1))}var au=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),lu=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function uu(e,t,r){var n=Al(t),o=Sn(t,n);null!=r||tl(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,Al(t)));var i=!(tl(r)&&"chain"in r&&!r.chain),a=Xa(e);return jt(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function su(){}var cu=qo(It),fu=qo(Lt),du=qo(zt);function pu(e){return xi(e)?Gt(zi(e)):function(e){return function(t){return kn(t,e)}}(e)}var hu=Yo(),mu=Yo(!0);function vu(){return[]}function gu(){return!1}var yu=Vo((function(e,t){return e+t}),0),bu=Qo("ceil"),wu=Vo((function(e,t){return e/t}),1),_u=Qo("floor");var xu,Su=Vo((function(e,t){return e*t}),1),ku=Qo("round"),Ou=Vo((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=ja,Br.assign=wl,Br.assignIn=_l,Br.assignInWith=xl,Br.assignWith=Sl,Br.at=kl,Br.before=Pa,Br.bind=La,Br.bindAll=eu,Br.bindKey=Ma,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Br.chain=pa,Br.chunk=function(e,t,r){t=(r?_i(e,t,r):t===n)?1:yr(ml(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,l=ae(mt(o/t));i<o;)l[a++]=oo(e,i,i+=t);return l},Br.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},Br.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ae(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Rt(qa(r)?Mo(r):[r],yn(t,1))},Br.cond=function(e){var t=null==e?0:e.length,r=ci();return e=t?It(e,(function(e){if("function"!=typeof e[1])throw new Le(o);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var o=e[n];if(Et(o[0],this,r))return Et(o[1],this,r)}}))},Br.conforms=function(e){return function(e){var t=Al(e);return function(r){return cn(r,e,t)}}(sn(e,1))},Br.constant=tu,Br.countBy=va,Br.create=function(e,t){var r=Hr(e);return null==t?r:on(r,t)},Br.curry=function e(t,r,o){var i=Jo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Br.curryRight=function e(t,r,o){var i=Jo(t,l,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Br.debounce=Aa,Br.defaults=Ol,Br.defaultsDeep=El,Br.defer=Ta,Br.delay=Ia,Br.difference=Hi,Br.differenceBy=Ui,Br.differenceWith=Wi,Br.drop=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=r||t===n?1:ml(t))<0?0:t,o):[]},Br.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,0,(t=o-(t=r||t===n?1:ml(t)))<0?0:t):[]},Br.dropRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!0,!0):[]},Br.dropWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!0):[]},Br.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&_i(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=ml(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:ml(o))<0&&(o+=i),o=r>o?0:vl(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Br.filter=function(e,t){return(qa(e)?Mt:gn)(e,ci(t,3))},Br.flatMap=function(e,t){return yn(ka(e,t),1)},Br.flatMapDeep=function(e,t){return yn(ka(e,t),d)},Br.flatMapDepth=function(e,t,r){return r=r===n?1:ml(r),yn(ka(e,t),r)},Br.flatten=Gi,Br.flattenDeep=function(e){return(null==e?0:e.length)?yn(e,d):[]},Br.flattenDepth=function(e,t){return(null==e?0:e.length)?yn(e,t=t===n?1:ml(t)):[]},Br.flip=function(e){return Jo(e,512)},Br.flow=ru,Br.flowRight=nu,Br.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Br.functions=function(e){return null==e?[]:Sn(e,Al(e))},Br.functionsIn=function(e){return null==e?[]:Sn(e,Tl(e))},Br.groupBy=_a,Br.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Br.intersection=Ki,Br.intersectionBy=$i,Br.intersectionWith=Qi,Br.invert=Pl,Br.invertBy=Ll,Br.invokeMap=xa,Br.iteratee=iu,Br.keyBy=Sa,Br.keys=Al,Br.keysIn=Tl,Br.map=ka,Br.mapKeys=function(e,t){var r={};return t=ci(t,3),_n(e,(function(e,n,o){an(r,t(e,n,o),e)})),r},Br.mapValues=function(e,t){var r={};return t=ci(t,3),_n(e,(function(e,n,o){an(r,n,t(e,n,o))})),r},Br.matches=function(e){return Hn(sn(e,1))},Br.matchesProperty=function(e,t){return Un(e,sn(t,1))},Br.memoize=Ra,Br.merge=Il,Br.mergeWith=Rl,Br.method=au,Br.methodOf=lu,Br.mixin=uu,Br.negate=Na,Br.nthArg=function(e){return e=ml(e),Zn((function(t){return Vn(t,e)}))},Br.omit=Nl,Br.omitBy=function(e,t){return zl(e,Na(ci(t)))},Br.once=function(e){return Pa(2,e)},Br.orderBy=function(e,t,r,o){return null==e?[]:(qa(t)||(t=null==t?[]:[t]),qa(r=o?n:r)||(r=null==r?[]:[r]),qn(e,t,r))},Br.over=cu,Br.overArgs=Da,Br.overEvery=fu,Br.overSome=du,Br.partial=za,Br.partialRight=Fa,Br.partition=Oa,Br.pick=Dl,Br.pickBy=zl,Br.property=pu,Br.propertyOf=function(e){return function(t){return null==e?n:kn(e,t)}},Br.pull=Xi,Br.pullAll=Ji,Br.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,ci(r,2)):e},Br.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,n,r):e},Br.pullAt=ea,Br.range=hu,Br.rangeRight=mu,Br.rearg=Ba,Br.reject=function(e,t){return(qa(e)?Mt:gn)(e,Na(ci(t,3)))},Br.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=ci(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return Kn(e,o),r},Br.rest=function(e,t){if("function"!=typeof e)throw new Le(o);return Zn(e,t=t===n?t:ml(t))},Br.reverse=ta,Br.sampleSize=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),(qa(e)?Xr:Jn)(e,t)},Br.set=function(e,t,r){return null==e?e:eo(e,t,r)},Br.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:eo(e,t,r,o)},Br.shuffle=function(e){return(qa(e)?Jr:no)(e)},Br.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_i(e,t,r)?(t=0,r=o):(t=null==t?0:ml(t),r=r===n?o:ml(r)),oo(e,t,r)):[]},Br.sortBy=Ea,Br.sortedUniq=function(e){return e&&e.length?uo(e):[]},Br.sortedUniqBy=function(e,t){return e&&e.length?uo(e,ci(t,2)):[]},Br.split=function(e,t,r){return r&&"number"!=typeof r&&_i(e,t,r)&&(t=r=n),(r=r===n?m:r>>>0)?(e=bl(e))&&("string"==typeof t||null!=t&&!al(t))&&!(t=co(t))&&ar(e)?So(pr(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new Le(o);return t=null==t?0:yr(ml(t),0),Zn((function(r){var n=r[t],o=So(r,0,t);return n&&Rt(o,n),Et(e,this,o)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===n?1:ml(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=r||t===n?1:ml(t)))<0?0:t,o):[]},Br.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Le(o);return tl(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Aa(e,t,{leading:n,maxWait:t,trailing:i})},Br.thru=ha,Br.toArray=pl,Br.toPairs=Fl,Br.toPairsIn=Bl,Br.toPath=function(e){return qa(e)?It(e,zi):sl(e)?[e]:Mo(Di(bl(e)))},Br.toPlainObject=yl,Br.transform=function(e,t,r){var n=qa(e),o=n||$a(e)||cl(e);if(t=ci(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:tl(e)&&Xa(i)?Hr(Ye(e)):{}}return(o?jt:_n)(e,(function(e,n,o){return t(r,e,n,o)})),r},Br.unary=function(e){return ja(e,1)},Br.union=ra,Br.unionBy=na,Br.unionWith=oa,Br.uniq=function(e){return e&&e.length?fo(e):[]},Br.uniqBy=function(e,t){return e&&e.length?fo(e,ci(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fo(e,n,t):[]},Br.unset=function(e,t){return null==e||po(e,t)},Br.unzip=ia,Br.unzipWith=aa,Br.update=function(e,t,r){return null==e?e:ho(e,t,wo(r))},Br.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:ho(e,t,wo(r),o)},Br.values=Hl,Br.valuesIn=function(e){return null==e?[]:Jt(e,Tl(e))},Br.without=la,Br.words=Xl,Br.wrap=function(e,t){return za(wo(t),e)},Br.xor=ua,Br.xorBy=sa,Br.xorWith=ca,Br.zip=fa,Br.zipObject=function(e,t){return yo(e||[],t||[],tn)},Br.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Br.zipWith=da,Br.entries=Fl,Br.entriesIn=Bl,Br.extend=_l,Br.extendWith=xl,uu(Br,Br),Br.add=yu,Br.attempt=Jl,Br.camelCase=Ul,Br.capitalize=Wl,Br.ceil=bu,Br.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gl(r))==r?r:0),t!==n&&(t=(t=gl(t))==t?t:0),un(gl(e),t,r)},Br.clone=function(e){return sn(e,4)},Br.cloneDeep=function(e){return sn(e,5)},Br.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:n)},Br.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:n)},Br.conformsTo=function(e,t){return null==t||cn(e,t,Al(t))},Br.deburr=Vl,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=wu,Br.endsWith=function(e,t,r){e=bl(e),t=co(t);var o=e.length,i=r=r===n?o:un(ml(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Br.eq=Ha,Br.escape=function(e){return(e=bl(e))&&Q.test(e)?e.replace(K,or):e},Br.escapeRegExp=function(e){return(e=bl(e))&&oe.test(e)?e.replace(ne,"\\$&"):e},Br.every=function(e,t,r){var o=qa(e)?Lt:mn;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.find=ga,Br.findIndex=Vi,Br.findKey=function(e,t){return Bt(e,ci(t,3),_n)},Br.findLast=ya,Br.findLastIndex=qi,Br.findLastKey=function(e,t){return Bt(e,ci(t,3),xn)},Br.floor=_u,Br.forEach=ba,Br.forEachRight=wa,Br.forIn=function(e,t){return null==e?e:bn(e,ci(t,3),Tl)},Br.forInRight=function(e,t){return null==e?e:wn(e,ci(t,3),Tl)},Br.forOwn=function(e,t){return e&&_n(e,ci(t,3))},Br.forOwnRight=function(e,t){return e&&xn(e,ci(t,3))},Br.get=Cl,Br.gt=Ua,Br.gte=Wa,Br.has=function(e,t){return null!=e&&gi(e,t,jn)},Br.hasIn=jl,Br.head=Yi,Br.identity=ou,Br.includes=function(e,t,r,n){e=Ya(e)?e:Hl(e),r=r&&!n?ml(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),ul(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ut(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ut(e,t,o)},Br.inRange=function(e,t,r){return t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r){return e>=br(t,r)&&e<yr(t,r)}(e=gl(e),t,r)},Br.invoke=Ml,Br.isArguments=Va,Br.isArray=qa,Br.isArrayBuffer=Ga,Br.isArrayLike=Ya,Br.isArrayLikeObject=Ka,Br.isBoolean=function(e){return!0===e||!1===e||rl(e)&&En(e)==b},Br.isBuffer=$a,Br.isDate=Qa,Br.isElement=function(e){return rl(e)&&1===e.nodeType&&!il(e)},Br.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(qa(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cl(e)||Va(e)))return!e.length;var t=vi(e);if(t==k||t==P)return!e.size;if(Oi(e))return!Dn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},Br.isEqual=function(e,t){return Tn(e,t)},Br.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Tn(e,t,n,r):!!o},Br.isError=Za,Br.isFinite=function(e){return"number"==typeof e&&Ft(e)},Br.isFunction=Xa,Br.isInteger=Ja,Br.isLength=el,Br.isMap=nl,Br.isMatch=function(e,t){return e===t||In(e,t,di(t))},Br.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,In(e,t,di(t),r)},Br.isNaN=function(e){return ol(e)&&e!=+e},Br.isNative=function(e){if(ki(e))throw new ke("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(e)},Br.isNil=function(e){return null==e},Br.isNull=function(e){return null===e},Br.isNumber=ol,Br.isObject=tl,Br.isObjectLike=rl,Br.isPlainObject=il,Br.isRegExp=al,Br.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=p},Br.isSet=ll,Br.isString=ul,Br.isSymbol=sl,Br.isTypedArray=cl,Br.isUndefined=function(e){return e===n},Br.isWeakMap=function(e){return rl(e)&&vi(e)==A},Br.isWeakSet=function(e){return rl(e)&&"[object WeakSet]"==En(e)},Br.join=function(e,t){return null==e?"":Yt.call(e,t)},Br.kebabCase=ql,Br.last=Zi,Br.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ml(r))<0?yr(o+i,0):br(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ht(e,Vt,i,!0)},Br.lowerCase=Gl,Br.lowerFirst=Yl,Br.lt=fl,Br.lte=dl,Br.max=function(e){return e&&e.length?vn(e,ou,Cn):n},Br.maxBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Cn):n},Br.mean=function(e){return qt(e,ou)},Br.meanBy=function(e,t){return qt(e,ci(t,2))},Br.min=function(e){return e&&e.length?vn(e,ou,Fn):n},Br.minBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Fn):n},Br.stubArray=vu,Br.stubFalse=gu,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=Su,Br.nth=function(e,t){return e&&e.length?Vn(e,ml(t)):n},Br.noConflict=function(){return ht._===this&&(ht._=He),this},Br.noop=su,Br.now=Ca,Br.pad=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Go(vt(o),r)+e+Go(mt(o),r)},Br.padEnd=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&n<t?e+Go(t-n,r):e},Br.padStart=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&n<t?Go(t-n,r)+e:e},Br.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),_r(bl(e).replace(ie,""),t||0)},Br.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_i(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=hl(e),t===n?(t=e,e=0):t=hl(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return $n(e,t)},Br.reduce=function(e,t,r){var n=qa(e)?Nt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,pn)},Br.reduceRight=function(e,t,r){var n=qa(e)?Dt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,hn)},Br.repeat=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),Qn(bl(e),t)},Br.replace=function(){var e=arguments,t=bl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var o=-1,i=(t=_o(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[zi(t[o])];a===n&&(o=i,a=r),e=Xa(a)?a.call(e):a}return e},Br.round=ku,Br.runInContext=e,Br.sample=function(e){return(qa(e)?Zr:Xn)(e)},Br.size=function(e){if(null==e)return 0;if(Ya(e))return ul(e)?dr(e):e.length;var t=vi(e);return t==k||t==P?e.size:Dn(e).length},Br.snakeCase=Kl,Br.some=function(e,t,r){var o=qa(e)?zt:io;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.sortedIndex=function(e,t){return ao(e,t)},Br.sortedIndexBy=function(e,t,r){return lo(e,t,ci(r,2))},Br.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ao(e,t);if(n<r&&Ha(e[n],t))return n}return-1},Br.sortedLastIndex=function(e,t){return ao(e,t,!0)},Br.sortedLastIndexBy=function(e,t,r){return lo(e,t,ci(r,2),!0)},Br.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ao(e,t,!0)-1;if(Ha(e[r],t))return r}return-1},Br.startCase=$l,Br.startsWith=function(e,t,r){return e=bl(e),r=null==r?0:un(ml(r),0,e.length),t=co(t),e.slice(r,r+t.length)==t},Br.subtract=Ou,Br.sum=function(e){return e&&e.length?$t(e,ou):0},Br.sumBy=function(e,t){return e&&e.length?$t(e,ci(t,2)):0},Br.template=function(e,t,r){var o=Br.templateSettings;r&&_i(e,t,r)&&(t=n),e=bl(e),t=xl({},t,o,ei);var i,a,l=xl({},t.imports,o.imports,ei),u=Al(l),s=Jt(l,u),c=0,f=t.interpolate||_e,d="__p += '",p=je((t.escape||_e).source+"|"+f.source+"|"+(f===J?pe:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),h="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(p,(function(t,r,n,o,l,u){return n||(n=o),d+=e.slice(c,u).replace(xe,ir),r&&(i=!0,d+="' +\n__e("+r+") +\n'"),l&&(a=!0,d+="';\n"+l+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),d+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(fe.test(m))throw new ke("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(V,""):d).replace(q,"$1").replace(G,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Jl((function(){return Oe(u,h+"return "+d).apply(n,s)}));if(v.source=d,Za(v))throw v;return v},Br.times=function(e,t){if((e=ml(e))<1||e>p)return[];var r=m,n=br(e,m);t=ci(t),e-=m;for(var o=Qt(n,t);++r<e;)t(r);return o},Br.toFinite=hl,Br.toInteger=ml,Br.toLength=vl,Br.toLower=function(e){return bl(e).toLowerCase()},Br.toNumber=gl,Br.toSafeInteger=function(e){return e?un(ml(e),-9007199254740991,p):0===e?e:0},Br.toString=bl,Br.toUpper=function(e){return bl(e).toUpperCase()},Br.trim=function(e,t,r){if((e=bl(e))&&(r||t===n))return Zt(e);if(!e||!(t=co(t)))return e;var o=pr(e),i=pr(t);return So(o,tr(o,i),rr(o,i)+1).join("")},Br.trimEnd=function(e,t,r){if((e=bl(e))&&(r||t===n))return e.slice(0,hr(e)+1);if(!e||!(t=co(t)))return e;var o=pr(e);return So(o,0,rr(o,pr(t))+1).join("")},Br.trimStart=function(e,t,r){if((e=bl(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=co(t)))return e;var o=pr(e);return So(o,tr(o,pr(t))).join("")},Br.truncate=function(e,t){var r=30,o="...";if(tl(t)){var i="separator"in t?t.separator:i;r="length"in t?ml(t.length):r,o="omission"in t?co(t.omission):o}var a=(e=bl(e)).length;if(ar(e)){var l=pr(e);a=l.length}if(r>=a)return e;var u=r-dr(o);if(u<1)return o;var s=l?So(l,0,u).join(""):e.slice(0,u);if(i===n)return s+o;if(l&&(u+=s.length-u),al(i)){if(e.slice(u).search(i)){var c,f=s;for(i.global||(i=je(i.source,bl(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;s=s.slice(0,d===n?u:d)}}else if(e.indexOf(co(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+o},Br.unescape=function(e){return(e=bl(e))&&$.test(e)?e.replace(Y,mr):e},Br.uniqueId=function(e){var t=++De;return bl(e)+t},Br.upperCase=Ql,Br.upperFirst=Zl,Br.each=ba,Br.eachRight=wa,Br.first=Yi,uu(Br,(xu={},_n(Br,(function(e,t){Ne.call(Br.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Br.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),jt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===n?1:yr(ml(r),0);var o=this.__filtered__&&!t?new Vr(this):this.clone();return o.__filtered__?o.__takeCount__=br(r,o.__takeCount__):o.__views__.push({size:br(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),jt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Mn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Na(ci(e)))},Vr.prototype.slice=function(e,t){e=ml(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ml(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(m)},_n(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Br[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Br.prototype[t]=function(){var t=this.__wrapped__,l=o?[1]:arguments,u=t instanceof Vr,s=l[0],c=u||qa(t),f=function(e){var t=i.apply(Br,Rt([e],l));return o&&d?t[0]:t};c&&r&&"function"==typeof s&&1!=s.length&&(u=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,m=u&&!p;if(!a&&c){t=m?t:new Vr(this);var v=e.apply(t,l);return v.__actions__.push({func:ha,args:[f],thisArg:n}),new Wr(v,d)}return h&&m?e.apply(this,l):(v=this.thru(f),h?o?v.value()[0]:v.value():v)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(qa(o)?o:[],e)}return this[r]((function(r){return t.apply(qa(r)?r:[],e)}))}})),_n(Vr.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ne.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Uo(n,2).name]=[{name:"wrapper",func:n}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=br(t,e+a);break;case"takeRight":e=yr(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,l=i.end,u=l-a,s=n?l:a-1,c=this.__iteratees__,f=c.length,d=0,p=br(u,this.__takeCount__);if(!r||!n&&o==u&&p==u)return vo(e,this.__actions__);var h=[];e:for(;u--&&d<p;){for(var m=-1,v=e[s+=t];++m<f;){var g=c[m],y=g.iteratee,b=g.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}h[d++]=v}return h},Br.prototype.at=ma,Br.prototype.chain=function(){return pa(this)},Br.prototype.commit=function(){return new Wr(this.value(),this.__chain__)},Br.prototype.next=function(){this.__values__===n&&(this.__values__=pl(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof Ur;){var o=Bi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:n}),new Wr(t,this.__chain__)}return this.thru(ta)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Xe&&(Br.prototype[Xe]=function(){return this}),Br}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ht._=vr,define((function(){return vr}))):vt?((vt.exports=vr)._=vr,mt._=vr):ht._=vr}.call(this)},45077:(e,t,r)=>{var n=r(45584),o=r(62064),i=r(29409),a=r(13858);e.exports=function(e,t){return(a(e)?n:i)(e,o(t,3))}},46762:(e,t,r)=>{var n=r(41795);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},24911:e=>{e.exports=function(){}},22172:(e,t,r)=>{var n=r(46285);e.exports=function(){return n.Date.now()}},61329:(e,t,r)=>{var n=r(45584),o=r(62064),i=r(27889),a=r(74589);e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=o(t),i(e,r,(function(e,r){return t(e,r[0])}))}},75325:(e,t,r)=>{var n=r(75443),o=r(51833),i=r(97005),a=r(63742);e.exports=function(e){return i(e)?n(a(e)):o(e)}},26810:(e,t,r)=>{var n=r(62064),o=r(3040);e.exports=function(e,t){var r=[];if(!e||!e.length)return r;var i=-1,a=[],l=e.length;for(t=n(t,3);++i<l;){var u=e[i];t(u,i,e)&&(r.push(u),a.push(i))}return o(e,a),r}},45961:(e,t,r)=>{var n=r(55168);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},72773:(e,t,r)=>{var n=r(27405),o=r(62064),i=r(46638),a=r(13858),l=r(14007);e.exports=function(e,t,r){var u=a(e)?n:i;return r&&l(e,t,r)&&(t=void 0),u(e,o(t,3))}},70255:e=>{e.exports=function(){return[]}},48416:e=>{e.exports=function(){return!1}},90802:(e,t,r)=>{var n=r(79347),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},11646:(e,t,r)=>{var n=r(90802);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},79347:(e,t,r)=>{var n=r(40301),o=r(4082),i=r(90754),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?s(e.slice(2),r?2:8):a.test(e)?NaN:+e}},23156:(e,t,r)=>{var n=r(25631);e.exports=function(e){return null==e?"":n(e)}},83792:(e,t,r)=>{var n=r(33631);e.exports=function(e){return e&&e.length?n(e):[]}},47886:(e,t,r)=>{var n=r(33631);e.exports=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?n(e,void 0,t):[]}},73109:(e,t,r)=>{var n=r(26862),o=r(71839);e.exports=function(e){return null==e?[]:n(e,o(e))}},8780:e=>{"use strict";e.exports={__proto__:null,aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",currentColor:"The value of the 'color' property.",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."}},62402:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r){n.call(this,e,t,r,o.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":">"===e?this.type="child":"+"===e?this.type="adjacent-sibling":"~"===e&&(this.type="sibling")}i.prototype=new n,i.prototype.constructor=i},34022:(e,t,r)=>{"use strict";e.exports=i;var n=r(26012),o=r(6912);function i(e,t){this.match=function(t){var r;return t.mark(),(r=e(t))?t.drop():t.restore(),r},this.toString="function"==typeof t?t:function(){return t}}i.prec={MOD:5,SEQ:4,ANDAND:3,OROR:2,ALT:1},i.parse=function(e){var t,r,a,l,u,s,c,f,d;if(t=new n(e),r=function(e){var r=t.readMatch(e);if(null===r)throw new o("Expected "+e,t.getLine(),t.getCol());return r},a=function(){for(var e=[l()];null!==t.readMatch(" | ");)e.push(l());return 1===e.length?e[0]:i.alt.apply(i,e)},l=function(){for(var e=[u()];null!==t.readMatch(" || ");)e.push(u());return 1===e.length?e[0]:i.oror.apply(i,e)},u=function(){for(var e=[s()];null!==t.readMatch(" && ");)e.push(s());return 1===e.length?e[0]:i.andand.apply(i,e)},s=function(){for(var e=[c()];null!==t.readMatch(/^ (?![&|\]])/);)e.push(c());return 1===e.length?e[0]:i.seq.apply(i,e)},c=function(){var e=f();if(null!==t.readMatch("?"))return e.question();if(null!==t.readMatch("*"))return e.star();if(null!==t.readMatch("+"))return e.plus();if(null!==t.readMatch("#"))return e.hash();if(null!==t.readMatch(/^\{\s*/)){var n=r(/^\d+/);r(/^\s*,\s*/);var o=r(/^\d+/);return r(/^\s*\}/),e.braces(+n,+o)}return e},f=function(){if(null!==t.readMatch("[ ")){var e=a();return r(" ]"),e}return i.fromType(r(/^[^ ?*+#{]+/))},d=a(),!t.eof())throw new o("Expected end of string",t.getLine(),t.getCol());return d},i.cast=function(e){return e instanceof i?e:i.parse(e)},i.fromType=function(e){var t=r(96831);return new i((function(r){return r.hasNext()&&t.isType(r,e)}),e)},i.seq=function(){var e=Array.prototype.slice.call(arguments).map(i.cast);return 1===e.length?e[0]:new i((function(t){var r,n=!0;for(r=0;n&&r<e.length;r++)n=e[r].match(t);return n}),(function(t){var r=i.prec.SEQ,n=e.map((function(e){return e.toString(r)})).join(" ");return t>r&&(n="[ "+n+" ]"),n}))},i.alt=function(){var e=Array.prototype.slice.call(arguments).map(i.cast);return 1===e.length?e[0]:new i((function(t){var r,n=!1;for(r=0;!n&&r<e.length;r++)n=e[r].match(t);return n}),(function(t){var r=i.prec.ALT,n=e.map((function(e){return e.toString(r)})).join(" | ");return t>r&&(n="[ "+n+" ]"),n}))},i.many=function(e){var t=Array.prototype.slice.call(arguments,1).reduce((function(e,t){if(t.expand){var n=r(96831);e.push.apply(e,n.complex[t.expand].options)}else e.push(i.cast(t));return e}),[]);!0===e&&(e=t.map((function(){return!0})));var n=new i((function(r){var n=[],o=0,i=0,a=function(l){for(var u=0;u<t.length;u++)if(!n[u])if(r.mark(),t[u].match(r)){if(n[u]=!0,a(l+(!1===e||e[u]?1:0)))return r.drop(),!0;r.restore(),n[u]=!1}else r.drop();return function(e){return 0===i?(o=Math.max(e,o),e===t.length):e===o}(l)};if(a(0)||(i++,a(0)),!1===e)return o>0;for(var l=0;l<t.length;l++)if(e[l]&&!n[l])return!1;return!0}),(function(r){var n=!1===e?i.prec.OROR:i.prec.ANDAND,o=t.map((function(t,r){return!1===e||e[r]?t.toString(n):t.toString(i.prec.MOD)+"?"})).join(!1===e?" || ":" && ");return r>n&&(o="[ "+o+" ]"),o}));return n.options=t,n},i.andand=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!0),i.many.apply(i,e)},i.oror=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!1),i.many.apply(i,e)},i.prototype={constructor:i,match:function(){throw new Error("unimplemented")},toString:function(){throw new Error("unimplemented")},func:function(){return this.match.bind(this)},then:function(e){return i.seq(this,e)},or:function(e){return i.alt(this,e)},andand:function(e){return i.many(!0,this,e)},oror:function(e){return i.many(!1,this,e)},star:function(){return this.braces(0,1/0,"*")},plus:function(){return this.braces(1,1/0,"+")},question:function(){return this.braces(0,1,"?")},hash:function(){return this.braces(1,1/0,"#",i.cast(","))},braces:function(e,t,r,n){var o=this,a=n?n.then(this):this;return r||(r="{"+e+","+t+"}"),new i((function(r){var i;for(i=0;i<t&&(i>0&&n?a.match(r):o.match(r));i++);return i>=e}),(function(){return o.toString(i.prec.MOD)+r}))}}},61899:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t){n.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,o.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}i.prototype=new n,i.prototype.constructor=i},87567:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r,i,a){n.call(this,(e?e+" ":"")+(t||"")+(t&&r.length>0?" and ":"")+r.join(" and "),i,a,o.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=r}i.prototype=new n,i.prototype.constructor=i},20232:(e,t,r)=>{"use strict";e.exports=y;var n=r(88053),o=r(6912),i=r(37337),a=r(62402),l=r(61899),u=r(87567),s=r(85556),c=r(85076),f=r(21915),d=r(75548),p=r(89890),h=r(90753),m=r(53333),v=r(73778),g=r(47832);function y(e){n.call(this),this.options=e||{},this._tokenStream=null}y.DEFAULT_TYPE=0,y.COMBINATOR_TYPE=1,y.MEDIA_FEATURE_TYPE=2,y.MEDIA_QUERY_TYPE=3,y.PROPERTY_NAME_TYPE=4,y.PROPERTY_VALUE_TYPE=5,y.PROPERTY_VALUE_PART_TYPE=6,y.SELECTOR_TYPE=7,y.SELECTOR_PART_TYPE=8,y.SELECTOR_SUB_PART_TYPE=9,y.prototype=function(){var e,t=new n,r={__proto__:null,constructor:y,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,r,n=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();n.peek()===v.IMPORT_SYM;)this._import(),this._skipCruft();for(;n.peek()===v.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(r=n.peek();r>v.EOF;){try{switch(r){case v.MEDIA_SYM:this._media(),this._skipCruft();break;case v.PAGE_SYM:this._page(),this._skipCruft();break;case v.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case v.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case v.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case v.DOCUMENT_SYM:this._document(),this._skipCruft();break;case v.SUPPORTS_SYM:this._supports(),this._skipCruft();break;case v.UNKNOWN_SYM:if(n.get(),this.options.strict)throw new o("Unknown @ rule.",n.LT(0).startLine,n.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+n.LT(0).value+".",line:n.LT(0).startLine,col:n.LT(0).startCol}),e=0;n.advance([v.LBRACE,v.RBRACE])===v.LBRACE;)e++;for(;e;)n.advance([v.RBRACE]),e--;break;case v.S:this._readWhitespace();break;default:if(!this._ruleset())switch(r){case v.CHARSET_SYM:throw t=n.LT(1),this._charset(!1),new o("@charset not allowed here.",t.startLine,t.startCol);case v.IMPORT_SYM:throw t=n.LT(1),this._import(!1),new o("@import not allowed here.",t.startLine,t.startCol);case v.NAMESPACE_SYM:throw t=n.LT(1),this._namespace(!1),new o("@namespace not allowed here.",t.startLine,t.startCol);default:n.get(),this._unexpectedToken(n.token())}}}catch(e){if(!(e instanceof o)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}r=n.peek()}r!==v.EOF&&this._unexpectedToken(n.token()),this.fire("endstylesheet")},_charset:function(e){var t,r,n,o=this._tokenStream;o.match(v.CHARSET_SYM)&&(r=o.token().startLine,n=o.token().startCol,this._readWhitespace(),o.mustMatch(v.STRING),t=o.token().value,this._readWhitespace(),o.mustMatch(v.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:r,col:n}))},_import:function(e){var t,r,n,o=this._tokenStream;o.mustMatch(v.IMPORT_SYM),r=o.token(),this._readWhitespace(),o.mustMatch([v.STRING,v.URI]),t=o.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/,"$1"),this._readWhitespace(),n=this._media_query_list(),o.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:n,line:r.startLine,col:r.startCol})},_namespace:function(e){var t,r,n,o,i=this._tokenStream;i.mustMatch(v.NAMESPACE_SYM),t=i.token().startLine,r=i.token().startCol,this._readWhitespace(),i.match(v.IDENT)&&(n=i.token().value,this._readWhitespace()),i.mustMatch([v.STRING,v.URI]),o=i.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),i.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:n,uri:o,line:t,col:r})},_supports:function(e){var t,r,n=this._tokenStream;if(n.match(v.SUPPORTS_SYM)){for(t=n.token().startLine,r=n.token().startCol,this._readWhitespace(),this._supports_condition(),this._readWhitespace(),n.mustMatch(v.LBRACE),this._readWhitespace(),!1!==e&&this.fire({type:"startsupports",line:t,col:r});this._ruleset(););n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endsupports",line:t,col:r})}},_supports_condition:function(){var e,t=this._tokenStream;if(t.match(v.IDENT))"not"===(e=t.token().value.toLowerCase())?(t.mustMatch(v.S),this._supports_condition_in_parens()):t.unget();else for(this._supports_condition_in_parens(),this._readWhitespace();t.peek()===v.IDENT;)"and"!==(e=t.LT(1).value.toLowerCase())&&"or"!==e||(t.mustMatch(v.IDENT),this._readWhitespace(),this._supports_condition_in_parens(),this._readWhitespace())},_supports_condition_in_parens:function(){var e=this._tokenStream;e.match(v.LPAREN)?(this._readWhitespace(),e.match(v.IDENT)?"not"===e.token().value.toLowerCase()?(this._readWhitespace(),this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN)):(e.unget(),this._supports_declaration_condition(!1)):(this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN))):this._supports_declaration_condition()},_supports_declaration_condition:function(e){var t=this._tokenStream;!1!==e&&t.mustMatch(v.LPAREN),this._readWhitespace(),this._declaration(),t.mustMatch(v.RPAREN)},_media:function(){var e,t,r,n=this._tokenStream;for(n.mustMatch(v.MEDIA_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),r=this._media_query_list(),n.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:r,line:e,col:t});;)if(n.peek()===v.PAGE_SYM)this._page();else if(n.peek()===v.FONT_FACE_SYM)this._font_face();else if(n.peek()===v.VIEWPORT_SYM)this._viewport();else if(n.peek()===v.DOCUMENT_SYM)this._document();else if(n.peek()===v.SUPPORTS_SYM)this._supports();else if(n.peek()===v.MEDIA_SYM)this._media();else if(!this._ruleset())break;n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:r,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!==v.IDENT&&e.peek()!==v.LPAREN||t.push(this._media_query());e.match(v.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,r=null,n=null,o=[];if(e.match(v.IDENT)&&("only"!==(r=e.token().value.toLowerCase())&&"not"!==r?(e.unget(),r=null):n=e.token()),this._readWhitespace(),e.peek()===v.IDENT?(t=this._media_type(),null===n&&(n=e.token())):e.peek()===v.LPAREN&&(null===n&&(n=e.LT(1)),o.push(this._media_expression())),null===t&&0===o.length)return null;for(this._readWhitespace();e.match(v.IDENT);)"and"!==e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),o.push(this._media_expression());return new u(r,t,o,n.startLine,n.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t,r=this._tokenStream,n=null;return r.mustMatch(v.LPAREN),e=this._media_feature(),this._readWhitespace(),r.match(v.COLON)&&(this._readWhitespace(),t=r.LT(1),n=this._expression()),r.mustMatch(v.RPAREN),this._readWhitespace(),new l(e,n?new i(n,t.startLine,t.startCol):null)},_media_feature:function(){var e=this._tokenStream;return this._readWhitespace(),e.mustMatch(v.IDENT),i.fromToken(e.token())},_page:function(){var e,t,r=this._tokenStream,n=null,o=null;r.mustMatch(v.PAGE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),r.match(v.IDENT)&&"auto"===(n=r.token().value).toLowerCase()&&this._unexpectedToken(r.token()),r.peek()===v.COLON&&(o=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:n,pseudo:o,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:n,pseudo:o,line:e,col:t})},_margin:function(){var e,t,r=this._tokenStream,n=this._margin_sym();return!!n&&(e=r.token().startLine,t=r.token().startCol,this.fire({type:"startpagemargin",margin:n,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:n,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([v.TOPLEFTCORNER_SYM,v.TOPLEFT_SYM,v.TOPCENTER_SYM,v.TOPRIGHT_SYM,v.TOPRIGHTCORNER_SYM,v.BOTTOMLEFTCORNER_SYM,v.BOTTOMLEFT_SYM,v.BOTTOMCENTER_SYM,v.BOTTOMRIGHT_SYM,v.BOTTOMRIGHTCORNER_SYM,v.LEFTTOP_SYM,v.LEFTMIDDLE_SYM,v.LEFTBOTTOM_SYM,v.RIGHTTOP_SYM,v.RIGHTMIDDLE_SYM,v.RIGHTBOTTOM_SYM])?i.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(v.COLON),e.mustMatch(v.IDENT),e.token().value},_font_face:function(){var e,t,r=this._tokenStream;r.mustMatch(v.FONT_FACE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,r=this._tokenStream;r.mustMatch(v.VIEWPORT_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_document:function(){var e,t=this._tokenStream,r=[],n="";for(t.mustMatch(v.DOCUMENT_SYM),e=t.token(),/^@\-([^\-]+)\-/.test(e.value)&&(n=RegExp.$1),this._readWhitespace(),r.push(this._document_function());t.match(v.COMMA);)this._readWhitespace(),r.push(this._document_function());t.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startdocument",functions:r,prefix:n,line:e.startLine,col:e.startCol});for(var o=!0;o;)switch(t.peek()){case v.PAGE_SYM:this._page();break;case v.FONT_FACE_SYM:this._font_face();break;case v.VIEWPORT_SYM:this._viewport();break;case v.MEDIA_SYM:this._media();break;case v.KEYFRAMES_SYM:this._keyframes();break;case v.DOCUMENT_SYM:this._document();break;default:o=Boolean(this._ruleset())}t.mustMatch(v.RBRACE),e=t.token(),this._readWhitespace(),this.fire({type:"enddocument",functions:r,prefix:n,line:e.startLine,col:e.startCol})},_document_function:function(){var e,t=this._tokenStream;return t.match(v.URI)?(e=t.token().value,this._readWhitespace()):e=this._function(),e},_operator:function(e){var t=this._tokenStream,r=null;return(t.match([v.SLASH,v.COMMA])||e&&t.match([v.PLUS,v.STAR,v.MINUS]))&&(r=t.token(),this._readWhitespace()),r?f.fromToken(r):null},_combinator:function(){var e,t=this._tokenStream,r=null;return t.match([v.PLUS,v.GREATER,v.TILDE])&&(e=t.token(),r=new a(e.value,e.startLine,e.startCol),this._readWhitespace()),r},_unary_operator:function(){var e=this._tokenStream;return e.match([v.MINUS,v.PLUS])?e.token().value:null},_property:function(){var e,t,r,n,o=this._tokenStream,i=null,a=null;return o.peek()===v.STAR&&this.options.starHack&&(o.get(),a=(t=o.token()).value,r=t.startLine,n=t.startCol),o.match(v.IDENT)&&("_"===(e=(t=o.token()).value).charAt(0)&&this.options.underscoreHack&&(a="_",e=e.substring(1)),i=new s(e,a,r||t.startLine,n||t.startCol),this._readWhitespace()),i},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof o)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([v.RBRACE])!==v.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,r=[];if(null!==(e=this._selector()))for(r.push(e);t.match(v.COMMA);)this._readWhitespace(),null!==(e=this._selector())?r.push(e):this._unexpectedToken(t.LT(1));return r.length?r:null},_selector:function(){var e=this._tokenStream,t=[],r=null,n=null,o=null;if(null===(r=this._simple_selector_sequence()))return null;for(t.push(r);;)if(null!==(n=this._combinator()))t.push(n),null===(r=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(r);else{if(!this._readWhitespace())break;o=new a(e.token().value,e.token().startLine,e.token().startCol),n=this._combinator(),null===(r=this._simple_selector_sequence())?null!==n&&this._unexpectedToken(e.LT(1)):(null!==n?t.push(n):t.push(o),t.push(r))}return new d(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,r=this._tokenStream,n=null,o=[],i="",a=[function(){return r.match(v.HASH)?new h(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],l=0,u=a.length,s=null;for(e=r.LT(1).startLine,t=r.LT(1).startCol,(n=this._type_selector())||(n=this._universal()),null!==n&&(i+=n);r.peek()!==v.S;){for(;l<u&&null===s;)s=a[l++].call(this);if(null===s){if(""===i)return null;break}l=0,o.push(s),i+=s.toString(),s=null}return""!==i?new p(n,o,i,e,t):null},_type_selector:function(){var e=this._tokenStream,t=this._namespace_prefix(),r=this._element_name();return r?(t&&(r.text=t+r.text,r.col-=t.length),r):(t&&(e.unget(),t.length>1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(v.DOT)?(t.mustMatch(v.IDENT),e=t.token(),new h("."+e.value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(v.IDENT)?(e=t.token(),new h(e.value,"elementName",e.startLine,e.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==v.PIPE&&e.LA(2)!==v.PIPE||(e.match([v.IDENT,v.STAR])&&(t+=e.token().value),e.mustMatch(v.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,r="";return(e=this._namespace_prefix())&&(r+=e),t.match(v.STAR)&&(r+="*"),r.length?r:null},_attrib:function(){var e,t,r=this._tokenStream,n=null;return r.match(v.LBRACKET)?(n=(t=r.token()).value,n+=this._readWhitespace(),(e=this._namespace_prefix())&&(n+=e),r.mustMatch(v.IDENT),n+=r.token().value,n+=this._readWhitespace(),r.match([v.PREFIXMATCH,v.SUFFIXMATCH,v.SUBSTRINGMATCH,v.EQUALS,v.INCLUDES,v.DASHMATCH])&&(n+=r.token().value,n+=this._readWhitespace(),r.mustMatch([v.IDENT,v.STRING]),n+=r.token().value,n+=this._readWhitespace()),r.mustMatch(v.RBRACKET),new h(n+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,r=this._tokenStream,n=null,i=":";if(r.match(v.COLON)){if(r.match(v.COLON)&&(i+=":"),r.match(v.IDENT)?(n=r.token().value,e=r.token().startLine,t=r.token().startCol-i.length):r.peek()===v.FUNCTION&&(e=r.LT(1).startLine,t=r.LT(1).startCol-i.length,n=this._functional_pseudo()),!n){var a=r.LT(1).startLine,l=r.LT(0).startCol;throw new o("Expected a `FUNCTION` or `IDENT` after colon at line "+a+", col "+l+".",a,l)}n=new h(i+n,"pseudo",e,t)}return n},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(v.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(v.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([v.PLUS,v.MINUS,v.DIMENSION,v.NUMBER,v.STRING,v.IDENT,v.LENGTH,v.FREQ,v.ANGLE,v.TIME,v.RESOLUTION,v.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,r,n=this._tokenStream,o="",i=null;return n.match(v.NOT)&&(o=n.token().value,e=n.token().startLine,t=n.token().startCol,o+=this._readWhitespace(),o+=r=this._negation_arg(),o+=this._readWhitespace(),n.match(v.RPAREN),o+=n.token().value,(i=new h(o,"not",e,t)).args.push(r)),i},_negation_arg:function(){var e,t,r=this._tokenStream,n=[this._type_selector,this._universal,function(){return r.match(v.HASH)?new h(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo],o=null,i=0,a=n.length;for(e=r.LT(1).startLine,t=r.LT(1).startCol;i<a&&null===o;)o=n[i].call(this),i++;return null===o&&this._unexpectedToken(r.LT(1)),"elementName"===o.type?new p(o,[],o.toString(),e,t):new p(null,[o],o.toString(),e,t)},_declaration:function(){var e=this._tokenStream,t=null,r=null,n=null,o=null,i="";if(null!==(t=this._property())){e.mustMatch(v.COLON),this._readWhitespace(),(r=this._expr())&&0!==r.length||this._unexpectedToken(e.LT(1)),n=this._prio(),i=t.toString(),(this.options.starHack&&"*"===t.hack||this.options.underscoreHack&&"_"===t.hack)&&(i=t.text);try{this._validateProperty(i,r)}catch(e){o=e}return this.fire({type:"property",property:t,value:r,important:n,line:t.line,col:t.col,invalid:o}),!0}return!1},_prio:function(){var e=this._tokenStream.match(v.IMPORTANT_SYM);return this._readWhitespace(),e},_expr:function(e){var t=[],r=null,n=null;if(null!==(r=this._term(e)))for(t.push(r);;){if((n=this._operator(e))&&t.push(n),null===(r=this._term(e)))break;t.push(r)}return t.length>0?new c(t,t[0].line,t[0].col):null},_term:function(e){var t,r,n,o,i=this._tokenStream,a=null,l=null,u=null;return null!==(t=this._unary_operator())&&(n=i.token().startLine,o=i.token().startCol),i.peek()===v.IE_FUNCTION&&this.options.ieFilters?(a=this._ie_function(),null===t&&(n=i.token().startLine,o=i.token().startCol)):e&&i.match([v.LPAREN,v.LBRACE,v.LBRACKET])?(l=(r=i.token()).endChar,a=r.value+this._expr(e).text,null===t&&(n=i.token().startLine,o=i.token().startCol),i.mustMatch(v.type(l)),a+=l,this._readWhitespace()):i.match([v.NUMBER,v.PERCENTAGE,v.LENGTH,v.ANGLE,v.TIME,v.FREQ,v.STRING,v.IDENT,v.URI,v.UNICODE_RANGE])?(a=i.token().value,null===t&&(n=i.token().startLine,o=i.token().startCol,u=f.fromToken(i.token())),this._readWhitespace()):null===(r=this._hexcolor())?(null===t&&(n=i.LT(1).startLine,o=i.LT(1).startCol),null===a&&(a=i.LA(3)===v.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(a=r.value,null===t&&(n=r.startLine,o=r.startCol)),null!==u?u:null!==a?new f(null!==t?t+a:a,n,o):null},_function:function(){var e,t=this._tokenStream,r=null;if(t.match(v.FUNCTION)){if(r=t.token().value,this._readWhitespace(),r+=this._expr(!0),this.options.ieFilters&&t.peek()===v.EQUALS)do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)===v.COMMA&&(r+=t.token().value),t.match(v.IDENT),r+=t.token().value,t.match(v.EQUALS),r+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),r+=")",this._readWhitespace()}return r},_ie_function:function(){var e,t=this._tokenStream,r=null;if(t.match([v.IE_FUNCTION,v.FUNCTION])){r=t.token().value;do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)===v.COMMA&&(r+=t.token().value),t.match(v.IDENT),r+=t.token().value,t.match(v.EQUALS),r+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),r+=")",this._readWhitespace()}return r},_hexcolor:function(){var e,t=this._tokenStream,r=null;if(t.match(v.HASH)){if(e=(r=t.token()).value,!/#[a-f0-9]{3,6}/i.test(e))throw new o("Expected a hex color but found '"+e+"' at line "+r.startLine+", col "+r.startCol+".",r.startLine,r.startCol);this._readWhitespace()}return r},_keyframes:function(){var e,t,r,n=this._tokenStream,o="";for(n.mustMatch(v.KEYFRAMES_SYM),e=n.token(),/^@\-([^\-]+)\-/.test(e.value)&&(o=RegExp.$1),this._readWhitespace(),r=this._keyframe_name(),this._readWhitespace(),n.mustMatch(v.LBRACE),this.fire({type:"startkeyframes",name:r,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=n.peek();t===v.IDENT||t===v.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=n.peek();this.fire({type:"endkeyframes",name:r,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),n.mustMatch(v.RBRACE),this._readWhitespace()},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([v.IDENT,v.STRING]),i.fromToken(e.token())},_keyframe_rule:function(){var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(v.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(v.PERCENTAGE))return i.fromToken(t.token());if(t.match(v.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return i.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([v.S,v.CDO,v.CDC]););},_readDeclarations:function(e,t){var r,n=this._tokenStream;this._readWhitespace(),e&&n.mustMatch(v.LBRACE),this._readWhitespace();try{for(;;){if(n.match(v.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!n.match(v.SEMICOLON))break}this._readWhitespace()}n.mustMatch(v.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof o)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(r=n.advance([v.SEMICOLON,v.RBRACE]))===v.SEMICOLON)this._readDeclarations(!1,t);else if(r!==v.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(v.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new o("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!==v.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){g.validate(e,t)},parse:function(e){this._tokenStream=new m(e,v),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new m(e,v);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new m(e,v),this._readDeclarations()}};for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}()},38986:e=>{"use strict";e.exports={__proto__:null,"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch",all:"initial | inherit | unset","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"[ none | forwards | backwards | both ]#","animation-iteration-count":"[ <number> | infinite ]#","animation-name":"[ none | <single-animation-name> ]#","animation-play-state":"[ running | paused ]#","animation-timing-function":1,"-moz-animation-delay":"<time>#","-moz-animation-direction":"[ normal | alternate ]#","-moz-animation-duration":"<time>#","-moz-animation-iteration-count":"[ <number> | infinite ]#","-moz-animation-name":"[ none | <single-animation-name> ]#","-moz-animation-play-state":"[ running | paused ]#","-ms-animation-delay":"<time>#","-ms-animation-direction":"[ normal | alternate ]#","-ms-animation-duration":"<time>#","-ms-animation-iteration-count":"[ <number> | infinite ]#","-ms-animation-name":"[ none | <single-animation-name> ]#","-ms-animation-play-state":"[ running | paused ]#","-webkit-animation-delay":"<time>#","-webkit-animation-direction":"[ normal | alternate ]#","-webkit-animation-duration":"<time>#","-webkit-animation-fill-mode":"[ none | forwards | backwards | both ]#","-webkit-animation-iteration-count":"[ <number> | infinite ]#","-webkit-animation-name":"[ none | <single-animation-name> ]#","-webkit-animation-play-state":"[ running | paused ]#","-o-animation-delay":"<time>#","-o-animation-direction":"[ normal | alternate ]#","-o-animation-duration":"<time>#","-o-animation-iteration-count":"[ <number> | infinite ]#","-o-animation-name":"[ none | <single-animation-name> ]#","-o-animation-play-state":"[ running | paused ]#",appearance:"none | auto","-moz-appearance":"none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized","-ms-appearance":"none | icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal","-webkit-appearance":"none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | listbox\t| listitem | media-fullscreen-button | media-mute-button | media-play-button | media-seek-back-button\t| media-seek-forward-button\t| media-slider | media-sliderthumb | menulist\t| menulist-button\t| menulist-text\t| menulist-textfield | push-button\t| radio\t| searchfield\t| searchfield-cancel-button\t| searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical\t| square-button\t| textarea\t| textfield\t| scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical","-o-appearance":"none | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal",azimuth:"<azimuth>","backface-visibility":"visible | hidden",background:1,"background-attachment":"<attachment>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color>","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate","border-color":"<color>{1,4}","border-image":1,"border-image-outset":"[ <length> | <number> ]{1,4}","border-image-repeat":"[ stretch | repeat | round ]{1,2}","border-image-slice":"<border-image-slice>","border-image-source":"<image> | none","border-image-width":"[ <length> | <percentage> | <number> | auto ]{1,4}","border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color>","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":"<border-radius>","border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color>","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":"<length>{1,2}","border-style":"<border-style>{1,4}","border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color>","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":"<border-width>{1,4}",bottom:"<margin-width>","-moz-box-align":"start | end | center | baseline | stretch","-moz-box-decoration-break":"slice | clone","-moz-box-direction":"normal | reverse","-moz-box-flex":"<number>","-moz-box-flex-group":"<integer>","-moz-box-lines":"single | multiple","-moz-box-ordinal-group":"<integer>","-moz-box-orient":"horizontal | vertical | inline-axis | block-axis","-moz-box-pack":"start | end | center | justify","-o-box-decoration-break":"slice | clone","-webkit-box-align":"start | end | center | baseline | stretch","-webkit-box-decoration-break":"slice | clone","-webkit-box-direction":"normal | reverse","-webkit-box-flex":"<number>","-webkit-box-flex-group":"<integer>","-webkit-box-lines":"single | multiple","-webkit-box-ordinal-group":"<integer>","-webkit-box-orient":"horizontal | vertical | inline-axis | block-axis","-webkit-box-pack":"start | end | center | justify","box-decoration-break":"slice | clone","box-shadow":"<box-shadow>","box-sizing":"content-box | border-box","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom",clear:"none | right | left | both",clip:"<shape> | auto","-webkit-clip-path":"<clip-source> | <clip-path> | none","clip-path":"<clip-source> | <clip-path> | none","clip-rule":"nonzero | evenodd",color:"<color>","color-interpolation":"auto | sRGB | linearRGB","color-interpolation-filters":"auto | sRGB | linearRGB","color-profile":1,"color-rendering":"auto | optimizeSpeed | optimizeQuality","column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | run-in | ruby | ruby-base | ruby-text | ruby-base-container | ruby-text-container | contents | none | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex","dominant-baseline":"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge","drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"<integer>",elevation:"<angle> | below | level | above | higher | lower","empty-cells":"show | hide","enable-background":1,fill:"<paint>","fill-opacity":"<opacity-value>","fill-rule":"nonzero | evenodd",filter:"<filter-function-list> | none",fit:"fill | hidden | meet | slice","fit-position":1,flex:"<flex>","flex-basis":"<width>","flex-direction":"row | row-reverse | column | column-reverse","flex-flow":"<flex-direction> || <flex-wrap>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap | wrap | wrap-reverse","-webkit-flex":"<flex>","-webkit-flex-basis":"<width>","-webkit-flex-direction":"row | row-reverse | column | column-reverse","-webkit-flex-flow":"<flex-direction> || <flex-wrap>","-webkit-flex-grow":"<number>","-webkit-flex-shrink":"<number>","-webkit-flex-wrap":"nowrap | wrap | wrap-reverse","-ms-flex":"<flex>","-ms-flex-align":"start | end | center | stretch | baseline","-ms-flex-direction":"row | row-reverse | column | column-reverse","-ms-flex-order":"<number>","-ms-flex-pack":"start | end | center | justify","-ms-flex-wrap":"nowrap | wrap | wrap-reverse",float:"left | right | none","float-offset":1,"flood-color":1,"flood-opacity":"<opacity-value>",font:"<font-shorthand> | caption | icon | menu | message-box | small-caption | status-bar","font-family":"<font-family>","font-feature-settings":"<feature-tag-value> | normal","font-kerning":"auto | normal | none","font-size":"<font-size>","font-size-adjust":"<number> | none","font-stretch":"<font-stretch>","font-style":"<font-style>","font-variant":"<font-variant> | normal | none","font-variant-alternates":"<font-variant-alternates> | normal","font-variant-caps":"<font-variant-caps> | normal","font-variant-east-asian":"<font-variant-east-asian> | normal","font-variant-ligatures":"<font-variant-ligatures> | normal | none","font-variant-numeric":"<font-variant-numeric> | normal","font-variant-position":"normal | sub | super","font-weight":"<font-weight>","glyph-orientation-horizontal":"<glyph-angle>","glyph-orientation-vertical":"auto | <glyph-angle>",grid:1,"grid-area":1,"grid-auto-columns":1,"grid-auto-flow":1,"grid-auto-position":1,"grid-auto-rows":1,"grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-start":1,"grid-column-end":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-start":1,"grid-row-end":1,"grid-row-span":"<integer>","grid-row-sizing":1,"grid-template":1,"grid-template-areas":1,"grid-template-columns":1,"grid-template-rows":1,"hanging-punctuation":1,height:"<margin-width> | <content-sizing>","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":"auto | optimizeSpeed | optimizeQuality","image-resolution":1,"ime-mode":"auto | normal | active | inactive | disabled","inline-box-align":"last | <integer>","justify-content":"flex-start | flex-end | center | space-between | space-around","-webkit-justify-content":"flex-start | flex-end | center | space-between | space-around",kerning:"auto | <length>",left:"<margin-width>","letter-spacing":"<length> | normal","line-height":"<line-height>","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none","list-style-position":"inside | outside","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none",margin:"<margin-width>{1,4}","margin-bottom":"<margin-width>","margin-left":"<margin-width>","margin-right":"<margin-width>","margin-top":"<margin-width>",mark:1,"mark-after":1,"mark-before":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,mask:1,"max-height":"<length> | <percentage> | <content-sizing> | none","max-width":"<length> | <percentage> | <content-sizing> | none","min-height":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats","min-width":"<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,"object-fit":"fill | contain | cover | none | scale-down","object-position":"<position>",opacity:"<opacity-value>",order:"<integer>","-webkit-order":"<integer>",orphans:"<integer>",outline:1,"outline-color":"<color> | invert","outline-offset":1,"outline-style":"<border-style>","outline-width":"<border-width>",overflow:"visible | hidden | scroll | auto","overflow-style":1,"overflow-wrap":"normal | break-word","overflow-x":1,"overflow-y":1,padding:"<padding-width>{1,4}","padding-bottom":"<padding-width>","padding-left":"<padding-width>","padding-right":"<padding-width>","padding-top":"<padding-width>",page:1,"page-break-after":"auto | always | avoid | left | right","page-break-before":"auto | always | avoid | left | right","page-break-inside":"auto | avoid","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all",position:"static | relative | absolute | fixed","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width>",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,"shape-rendering":"auto | optimizeSpeed | crispEdges | geometricPrecision",size:1,speak:"normal | none | spell-out","speak-header":"once | always","speak-numeral":"digits | continuous","speak-punctuation":"code | none","speech-rate":1,src:1,"stop-color":1,"stop-opacity":"<opacity-value>",stress:1,"string-set":1,stroke:"<paint>","stroke-dasharray":"none | <dasharray>","stroke-dashoffset":"<percentage> | <length>","stroke-linecap":"butt | round | square","stroke-linejoin":"miter | round | bevel","stroke-miterlimit":"<miterlimit>","stroke-opacity":"<opacity-value>","stroke-width":"<percentage> | <length>","table-layout":"auto | fixed","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | match-parent | start | end","text-align-last":1,"text-anchor":"start | middle | end","text-decoration":"<text-decoration-line> || <text-decoration-style> || <text-decoration-color>","text-decoration-color":"<text-decoration-color>","text-decoration-line":"<text-decoration-line>","text-decoration-style":"<text-decoration-style>","text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage>","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none","text-wrap":"normal | none | avoid",top:"<margin-width>","-ms-touch-action":"auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation","touch-action":"auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | isolate | bidi-override | isolate-override | plaintext","user-modify":"read-only | read-write | write-only","user-select":"none | text | toggle | element | elements | all","vertical-align":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",visibility:"visible | hidden | collapse","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","white-space-collapse":1,widows:"<integer>",width:"<length> | <percentage> | <content-sizing> | auto","will-change":"<will-change>","word-break":"normal | keep-all | break-all","word-spacing":"<length> | normal","word-wrap":"normal | break-word","writing-mode":"horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb","z-index":"<integer> | auto",zoom:"<number> | <percentage> | normal"}},85556:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r,i){n.call(this,e,r,i,o.PROPERTY_NAME_TYPE),this.hack=t}i.prototype=new n,i.prototype.constructor=i,i.prototype.toString=function(){return(this.hack?this.hack:"")+this.text}},85076:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r){n.call(this,e.join(" "),t,r,o.PROPERTY_VALUE_TYPE),this.parts=e}i.prototype=new n,i.prototype.constructor=i},14282:e=>{"use strict";function t(e){this._i=0,this._parts=e.parts,this._marks=[],this.value=e}e.exports=t,t.prototype.count=function(){return this._parts.length},t.prototype.isFirst=function(){return 0===this._i},t.prototype.hasNext=function(){return this._i<this._parts.length},t.prototype.mark=function(){this._marks.push(this._i)},t.prototype.peek=function(e){return this.hasNext()?this._parts[this._i+(e||0)]:null},t.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null},t.prototype.previous=function(){return this._i>0?this._parts[--this._i]:null},t.prototype.restore=function(){this._marks.length&&(this._i=this._marks.pop())},t.prototype.drop=function(){this._marks.pop()}},21915:(e,t,r)=>{"use strict";e.exports=l;var n=r(37337),o=r(8780),i=r(20232),a=r(73778);function l(e,t,r,a){var u,s=a||{};if(n.call(this,e,t,r,i.PROPERTY_VALUE_PART_TYPE),this.type="unknown",/^([+\-]?[\d\.]+)([a-z]+)$/i.test(e))switch(this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vmax":case"vmin":this.type="length";break;case"fr":this.type="grid";break;case"deg":case"rad":case"grad":case"turn":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}else/^([+\-]?[\d\.]+)%$/i.test(e)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(e)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(e)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(e)?(this.type="color",3===(u=RegExp.$1).length?(this.red=parseInt(u.charAt(0)+u.charAt(0),16),this.green=parseInt(u.charAt(1)+u.charAt(1),16),this.blue=parseInt(u.charAt(2)+u.charAt(2),16)):(this.red=parseInt(u.substring(0,2),16),this.green=parseInt(u.substring(2,4),16),this.blue=parseInt(u.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(e)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(e)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(e)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\(("([^\\"]|\\.)*")\)/i.test(e)?(this.type="uri",this.uri=l.parseString(RegExp.$1)):/^([^\(]+)\(/i.test(e)?(this.type="function",this.name=RegExp.$1,this.value=e):/^"([^\n\r\f\\"]|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*"/i.test(e)||/^'([^\n\r\f\\']|\\\r\n|\\[^\r0-9a-f]|\\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)*'/i.test(e)?(this.type="string",this.value=l.parseString(e)):o[e.toLowerCase()]?(this.type="color",u=o[e.toLowerCase()].substring(1),this.red=parseInt(u.substring(0,2),16),this.green=parseInt(u.substring(2,4),16),this.blue=parseInt(u.substring(4,6),16)):/^[,\/]$/.test(e)?(this.type="operator",this.value=e):/^-?[a-z_\u00A0-\uFFFF][a-z0-9\-_\u00A0-\uFFFF]*$/i.test(e)&&(this.type="identifier",this.value=e);this.wasIdent=Boolean(s.ident)}l.prototype=new n,l.prototype.constructor=l,l.parseString=function(e){return(e=e.slice(1,-1)).replace(/\\(\r\n|[^\r0-9a-f]|[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?)/gi,(function(e,t){if(/^(\n|\r\n|\r|\f)$/.test(t))return"";var r=/^[0-9a-f]{1,6}/i.exec(t);if(r){var n=parseInt(r[0],16);return String.fromCodePoint?String.fromCodePoint(n):String.fromCharCode(n)}return t}))},l.serializeString=function(e){return'"'+e.replace(/["\r\n\f]/g,(function(e,t){return'"'===t?"\\"+t:"\\"+(String.codePointAt?String.codePointAt(0):String.charCodeAt(0)).toString(16)+" "}))+'"'},l.fromToken=function(e){return new l(e.value,e.startLine,e.startCol,{ident:e.type===a.IDENT})}},72071:e=>{"use strict";var t=e.exports={__proto__:null,":first-letter":1,":first-line":1,":before":1,":after":1};t.ELEMENT=1,t.CLASS=2,t.isElement=function(e){return 0===e.indexOf("::")||t[e.toLowerCase()]===t.ELEMENT}},75548:(e,t,r)=>{"use strict";e.exports=a;var n=r(37337),o=r(20232),i=r(51070);function a(e,t,r){n.call(this,e.join(" "),t,r,o.SELECTOR_TYPE),this.parts=e,this.specificity=i.calculate(this)}a.prototype=new n,a.prototype.constructor=a},89890:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r,i,a){n.call(this,r,i,a,o.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}i.prototype=new n,i.prototype.constructor=i},90753:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r,i){n.call(this,e,r,i,o.SELECTOR_SUB_PART_TYPE),this.type=t,this.args=[]}i.prototype=new n,i.prototype.constructor=i},51070:(e,t,r)=>{"use strict";e.exports=i;var n=r(72071),o=r(89890);function i(e,t,r,n){this.a=e,this.b=t,this.c=r,this.d=n}i.prototype={constructor:i,compare:function(e){var t,r,n=["a","b","c","d"];for(t=0,r=n.length;t<r;t++){if(this[n[t]]<e[n[t]])return-1;if(this[n[t]]>e[n[t]])return 1}return 0},valueOf:function(){return 1e3*this.a+100*this.b+10*this.c+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},i.calculate=function(e){var t,r,a,l=0,u=0,s=0;function c(e){var t,r,o,i,a,f=e.elementName?e.elementName.text:"";for(f&&"*"!==f.charAt(f.length-1)&&s++,t=0,o=e.modifiers.length;t<o;t++)switch((a=e.modifiers[t]).type){case"class":case"attribute":u++;break;case"id":l++;break;case"pseudo":n.isElement(a.text)?s++:u++;break;case"not":for(r=0,i=a.args.length;r<i;r++)c(a.args[r])}}for(t=0,r=e.parts.length;t<r;t++)(a=e.parts[t])instanceof o&&c(a);return new i(0,l,u,s)}},53333:(e,t,r)=>{"use strict";e.exports=g;var n=r(93099),o=r(21915),i=r(73778),a=/^[0-9a-fA-F]$/,l=/^[\u00A0-\uFFFF]$/,u=/\n|\r\n|\r|\f/,s=/\u0009|\u000a|\u000c|\u000d|\u0020/;function c(e){return null!==e&&a.test(e)}function f(e){return null!==e&&/\d/.test(e)}function d(e){return null!==e&&s.test(e)}function p(e){return null!==e&&u.test(e)}function h(e){return null!==e&&/[a-z_\u00A0-\uFFFF\\]/i.test(e)}function m(e){return null!==e&&(h(e)||/[0-9\-\\]/.test(e))}function v(e){return null!==e&&(h(e)||/\-\\/.test(e))}function g(e){n.call(this,e,i)}g.prototype=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}(new n,{_getToken:function(){var e,t=this._reader,r=null,n=t.getLine(),o=t.getCol();for(e=t.read();e;){switch(e){case"/":r="*"===t.peek()?this.commentToken(e,n,o):this.charToken(e,n,o);break;case"|":case"~":case"^":case"$":case"*":r="="===t.peek()?this.comparisonToken(e,n,o):this.charToken(e,n,o);break;case'"':case"'":r=this.stringToken(e,n,o);break;case"#":r=m(t.peek())?this.hashToken(e,n,o):this.charToken(e,n,o);break;case".":r=f(t.peek())?this.numberToken(e,n,o):this.charToken(e,n,o);break;case"-":r="-"===t.peek()?this.htmlCommentEndToken(e,n,o):h(t.peek())?this.identOrFunctionToken(e,n,o):this.charToken(e,n,o);break;case"!":r=this.importantToken(e,n,o);break;case"@":r=this.atRuleToken(e,n,o);break;case":":r=this.notToken(e,n,o);break;case"<":r=this.htmlCommentStartToken(e,n,o);break;case"\\":r=/[^\r\n\f]/.test(t.peek())?this.identOrFunctionToken(this.readEscape(e,!0),n,o):this.charToken(e,n,o);break;case"U":case"u":if("+"===t.peek()){r=this.unicodeRangeToken(e,n,o);break}default:r=f(e)?this.numberToken(e,n,o):d(e)?this.whitespaceToken(e,n,o):v(e)?this.identOrFunctionToken(e,n,o):this.charToken(e,n,o)}break}return r||null!==e||(r=this.createToken(i.EOF,null,n,o)),r},createToken:function(e,t,r,n,o){var i=this._reader;return{value:t,type:e,channel:(o=o||{}).channel,endChar:o.endChar,hide:o.hide||!1,startLine:r,startCol:n,endLine:i.getLine(),endCol:i.getCol()}},atRuleToken:function(e,t,r){var n=e,o=this._reader,a=i.CHAR;return o.mark(),n=e+this.readName(),(a=i.type(n.toLowerCase()))!==i.CHAR&&a!==i.UNKNOWN||(n.length>1?a=i.UNKNOWN_SYM:(a=i.CHAR,n=e,o.reset())),this.createToken(a,n,t,r)},charToken:function(e,t,r){var n=i.type(e),o={};return-1===n?n=i.CHAR:o.endChar=i[n].endChar,this.createToken(n,e,t,r,o)},commentToken:function(e,t,r){var n=this.readComment(e);return this.createToken(i.COMMENT,n,t,r)},comparisonToken:function(e,t,r){var n=e+this._reader.read(),o=i.type(n)||i.CHAR;return this.createToken(o,n,t,r)},hashToken:function(e,t,r){var n=this.readName(e);return this.createToken(i.HASH,n,t,r)},htmlCommentStartToken:function(e,t,r){var n=this._reader,o=e;return n.mark(),"\x3c!--"===(o+=n.readCount(3))?this.createToken(i.CDO,o,t,r):(n.reset(),this.charToken(e,t,r))},htmlCommentEndToken:function(e,t,r){var n=this._reader,o=e;return n.mark(),"--\x3e"===(o+=n.readCount(2))?this.createToken(i.CDC,o,t,r):(n.reset(),this.charToken(e,t,r))},identOrFunctionToken:function(e,t,r){var n,o=this._reader,a=this.readName(e),l=i.IDENT;return"("===o.peek()?(a+=o.read(),["url(","url-prefix(","domain("].indexOf(a.toLowerCase())>-1?(o.mark(),null===(n=this.readURI(a))?(o.reset(),l=i.FUNCTION):(l=i.URI,a=n)):l=i.FUNCTION):":"===o.peek()&&"progid"===a.toLowerCase()&&(a+=o.readTo("("),l=i.IE_FUNCTION),this.createToken(l,a,t,r)},importantToken:function(e,t,r){var n,o,a=this._reader,l=e,u=i.CHAR;for(a.mark(),o=a.read();o;){if("/"===o){if("*"!==a.peek())break;if(""===(n=this.readComment(o)))break}else{if(!d(o)){if(/i/i.test(o)){n=a.readCount(8),/mportant/i.test(n)&&(l+=o+n,u=i.IMPORTANT_SYM);break}break}l+=o+this.readWhitespace()}o=a.read()}return u===i.CHAR?(a.reset(),this.charToken(e,t,r)):this.createToken(u,l,t,r)},notToken:function(e,t,r){var n=this._reader,o=e;return n.mark(),":not("===(o+=n.readCount(4)).toLowerCase()?this.createToken(i.NOT,o,t,r):(n.reset(),this.charToken(e,t,r))},numberToken:function(e,t,r){var n,o=this._reader,a=this.readNumber(e),l=i.NUMBER,u=o.peek();return v(u)?(a+=n=this.readName(o.read()),l=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(n)?i.LENGTH:/^deg|^rad$|^grad$|^turn$/i.test(n)?i.ANGLE:/^ms$|^s$/i.test(n)?i.TIME:/^hz$|^khz$/i.test(n)?i.FREQ:/^dpi$|^dpcm$/i.test(n)?i.RESOLUTION:i.DIMENSION):"%"===u&&(a+=o.read(),l=i.PERCENTAGE),this.createToken(l,a,t,r)},stringToken:function(e,t,r){for(var n,o=e,a=e,l=this._reader,u=i.STRING,s=l.read();s;){if(a+=s,"\\"===s){if(null===(s=l.read()))break;if(/[^\r\n\f0-9a-f]/i.test(s))a+=s;else{for(n=0;c(s)&&n<6;n++)a+=s,s=l.read();if("\r"===s&&"\n"===l.peek()&&(a+=s,s=l.read()),!d(s))continue;a+=s}}else{if(s===o)break;if(p(l.peek())){u=i.INVALID;break}}s=l.read()}return null===s&&(u=i.INVALID),this.createToken(u,a,t,r)},unicodeRangeToken:function(e,t,r){var n,o=this._reader,a=e,l=i.CHAR;return"+"===o.peek()&&(o.mark(),a+=o.read(),2===(a+=this.readUnicodeRangePart(!0)).length?o.reset():(l=i.UNICODE_RANGE,-1===a.indexOf("?")&&"-"===o.peek()&&(o.mark(),n=o.read(),1===(n+=this.readUnicodeRangePart(!1)).length?o.reset():a+=n))),this.createToken(l,a,t,r)},whitespaceToken:function(e,t,r){var n=e+this.readWhitespace();return this.createToken(i.S,n,t,r)},readUnicodeRangePart:function(e){for(var t=this._reader,r="",n=t.peek();c(n)&&r.length<6;)t.read(),r+=n,n=t.peek();if(e)for(;"?"===n&&r.length<6;)t.read(),r+=n,n=t.peek();return r},readWhitespace:function(){for(var e=this._reader,t="",r=e.peek();d(r);)e.read(),t+=r,r=e.peek();return t},readNumber:function(e){for(var t=this._reader,r=e,n="."===e,o=t.peek();o;){if(f(o))r+=t.read();else{if("."!==o)break;if(n)break;n=!0,r+=t.read()}o=t.peek()}return r},readString:function(){var e=this.stringToken(this._reader.read(),0,0);return e.type===i.INVALID?null:e.value},readURI:function(e){for(var t=this._reader,r=e,n="",i=t.peek();i&&d(i);)t.read(),i=t.peek();for("'"===i||'"'===i?null!==(n=this.readString())&&(n=o.parseString(n)):n=this.readUnquotedURL(),i=t.peek();i&&d(i);)t.read(),i=t.peek();return null===n||")"!==i?r=null:r+=o.serializeString(n)+t.read(),r},readUnquotedURL:function(e){var t,r=this._reader,n=e||"";for(t=r.peek();t;t=r.peek())if(l.test(t)||/^[\-!#$%&*-\[\]-~]$/.test(t))n+=t,r.read();else{if("\\"!==t)break;if(!/^[^\r\n\f]$/.test(r.peek(2)))break;n+=this.readEscape(r.read(),!0)}return n},readName:function(e){var t,r=this._reader,n=e||"";for(t=r.peek();t;t=r.peek())if("\\"===t){if(!/^[^\r\n\f]$/.test(r.peek(2)))break;n+=this.readEscape(r.read(),!0)}else{if(!m(t))break;n+=r.read()}return n},readEscape:function(e,t){var r=this._reader,n=e||"",o=0,i=r.peek();if(c(i))do{n+=r.read(),i=r.peek()}while(i&&c(i)&&++o<6);if(1===n.length){if(!/^[^\r\n\f0-9a-f]$/.test(i))throw new Error("Bad escape sequence.");if(r.read(),t)return i}else"\r"===i?(r.read(),"\n"===r.peek()&&(i+=r.read())):/^[ \t\n\f]$/.test(i)?r.read():i="";if(t){var a=parseInt(n.slice(e.length),16);return String.fromCodePoint?String.fromCodePoint(a):String.fromCharCode(a)}return n+i},readComment:function(e){var t=this._reader,r=e||"",n=t.read();if("*"===n){for(;n;){if((r+=n).length>2&&"*"===n&&"/"===t.peek()){r+=t.read();break}n=t.read()}return r}return""}})},73778:e=>{"use strict";var t=e.exports=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"SUPPORTS_SYM",text:"@supports"},{name:"VIEWPORT_SYM",text:["@viewport","@-ms-viewport","@-o-viewport"]},{name:"DOCUMENT_SYM",text:["@document","@-moz-document"]},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",endChar:"}",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",endChar:"]",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",endChar:")",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];!function(){var e=[],r=Object.create(null);t.UNKNOWN=-1,t.unshift({name:"EOF"});for(var n=0,o=t.length;n<o;n++)if(e.push(t[n].name),t[t[n].name]=n,t[n].text)if(t[n].text instanceof Array)for(var i=0;i<t[n].text.length;i++)r[t[n].text[i]]=n;else r[t[n].text]=n;t.name=function(t){return e[t]},t.type=function(e){return r[e]||-1}}()},47832:(e,t,r)=>{"use strict";var n=r(34022),o=r(38986),i=r(96831),a=r(13690),l=r(14282);e.exports={validate:function(e,t){var r,n=e.toString().toLowerCase(),u=new l(t),s=o[n];if(s){if("number"!=typeof s){if(i.isAny(u,"inherit | initial | unset")){if(u.hasNext())throw r=u.next(),new a("Expected end of value but found '"+r+"'.",r.line,r.col);return}this.singleProperty(s,u)}}else if(0!==n.indexOf("-"))throw new a("Unknown property '"+e+"'.",e.line,e.col)},singleProperty:function(e,t){var r,o=t.value;if(!n.parse(e).match(t))throw t.hasNext()&&!t.isFirst()?(r=t.peek(),new a("Expected end of value but found '"+r+"'.",r.line,r.col)):new a("Expected ("+i.describe(e)+") but found '"+o+"'.",o.line,o.col);if(t.hasNext())throw r=t.next(),new a("Expected end of value but found '"+r+"'.",r.line,r.col)}}},13690:e=>{"use strict";function t(e,t,r){this.col=r,this.line=t,this.message=e}e.exports=t,t.prototype=new Error},96831:(e,t,r)=>{"use strict";var n,o,i=e.exports,a=r(34022);n=i,o={isLiteral:function(e,t){var r,n,o=e.text.toString().toLowerCase(),i=t.split(" | "),a=!1;for(r=0,n=i.length;r<n&&!a;r++)"<"===i[r].charAt(0)?a=this.simple[i[r]](e):"()"===i[r].slice(-2)?a="function"===e.type&&e.name===i[r].slice(0,-2):o===i[r].toLowerCase()&&(a=!0);return a},isSimple:function(e){return Boolean(this.simple[e])},isComplex:function(e){return Boolean(this.complex[e])},describe:function(e){return this.complex[e]instanceof a?this.complex[e].toString(0):e},isAny:function(e,t){var r,n,o=t.split(" | "),i=!1;for(r=0,n=o.length;r<n&&!i&&e.hasNext();r++)i=this.isType(e,o[r]);return i},isAnyOfGroup:function(e,t){var r,n,o=t.split(" || "),i=!1;for(r=0,n=o.length;r<n&&!i;r++)i=this.isType(e,o[r]);return!!i&&o[r-1]},isType:function(e,t){var r=e.peek(),n=!1;return"<"!==t.charAt(0)?(n=this.isLiteral(r,t))&&e.next():this.simple[t]?(n=this.simple[t](r))&&e.next():n=this.complex[t]instanceof a?this.complex[t].match(e):this.complex[t](e),n},simple:{__proto__:null,"<absolute-size>":"xx-small | x-small | small | medium | large | x-large | xx-large","<animateable-feature>":"scroll-position | contents | <animateable-feature-name>","<animateable-feature-name>":function(e){return this["<ident>"](e)&&!/^(unset|initial|inherit|will-change|auto|scroll-position|contents)$/i.test(e)},"<angle>":function(e){return"angle"===e.type},"<attachment>":"scroll | fixed | local","<attr>":"attr()","<basic-shape>":"inset() | circle() | ellipse() | polygon()","<bg-image>":"<image> | <gradient> | none","<border-style>":"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset","<border-width>":"<length> | thin | medium | thick","<box>":"padding-box | border-box | content-box","<clip-source>":"<uri>","<color>":function(e){return"color"===e.type||"transparent"===String(e)||"currentColor"===String(e)},"<color-svg>":function(e){return"color"===e.type},"<content>":"content()","<content-sizing>":"fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content","<feature-tag-value>":function(e){return"function"===e.type&&/^[A-Z0-9]{4}$/i.test(e)},"<filter-function>":"blur() | brightness() | contrast() | custom() | drop-shadow() | grayscale() | hue-rotate() | invert() | opacity() | saturate() | sepia()","<flex-basis>":"<width>","<flex-direction>":"row | row-reverse | column | column-reverse","<flex-grow>":"<number>","<flex-shrink>":"<number>","<flex-wrap>":"nowrap | wrap | wrap-reverse","<font-size>":"<absolute-size> | <relative-size> | <length> | <percentage>","<font-stretch>":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded","<font-style>":"normal | italic | oblique","<font-variant-caps>":"small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps","<font-variant-css21>":"normal | small-caps","<font-weight>":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900","<generic-family>":"serif | sans-serif | cursive | fantasy | monospace","<geometry-box>":"<shape-box> | fill-box | stroke-box | view-box","<glyph-angle>":function(e){return"angle"===e.type&&"deg"===e.units},"<gradient>":function(e){return"function"===e.type&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)},"<icccolor>":"cielab() | cielch() | cielchab() | icc-color() | icc-named-color()","<ident>":function(e){return"identifier"===e.type||e.wasIdent},"<ident-not-generic-family>":function(e){return this["<ident>"](e)&&!this["<generic-family>"](e)},"<image>":"<uri>","<integer>":function(e){return"integer"===e.type},"<length>":function(e){return!("function"!==e.type||!/^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(e))||"length"===e.type||"number"===e.type||"integer"===e.type||"0"===String(e)},"<line>":function(e){return"integer"===e.type},"<line-height>":"<number> | <length> | <percentage> | normal","<margin-width>":"<length> | <percentage> | auto","<miterlimit>":function(e){return this["<number>"](e)&&e.value>=1},"<nonnegative-length-or-percentage>":function(e){return(this["<length>"](e)||this["<percentage>"](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"<nonnegative-number-or-percentage>":function(e){return(this["<number>"](e)||this["<percentage>"](e))&&("0"===String(e)||"function"===e.type||e.value>=0)},"<number>":function(e){return"number"===e.type||this["<integer>"](e)},"<opacity-value>":function(e){return this["<number>"](e)&&e.value>=0&&e.value<=1},"<padding-width>":"<nonnegative-length-or-percentage>","<percentage>":function(e){return"percentage"===e.type||"0"===String(e)},"<relative-size>":"smaller | larger","<shape>":"rect() | inset-rect()","<shape-box>":"<box> | margin-box","<single-animation-direction>":"normal | reverse | alternate | alternate-reverse","<single-animation-name>":function(e){return this["<ident>"](e)&&/^-?[a-z_][-a-z0-9_]+$/i.test(e)&&!/^(none|unset|initial|inherit)$/i.test(e)},"<string>":function(e){return"string"===e.type},"<time>":function(e){return"time"===e.type},"<uri>":function(e){return"uri"===e.type},"<width>":"<margin-width>"},complex:{__proto__:null,"<azimuth>":"<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards","<bg-position>":"<position>#","<bg-size>":"[ <length> | <percentage> | auto ]{1,2} | cover | contain","<border-image-slice>":a.many([!0],a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),a.cast("<nonnegative-number-or-percentage>"),"fill"),"<border-radius>":"<nonnegative-length-or-percentage>{1,4} [ / <nonnegative-length-or-percentage>{1,4} ]?","<box-shadow>":"none | <shadow>#","<clip-path>":"<basic-shape> || <geometry-box>","<dasharray>":a.cast("<nonnegative-length-or-percentage>").braces(1,1/0,"#",a.cast(",").question()),"<family-name>":"<string> | <ident-not-generic-family> <ident>*","<filter-function-list>":"[ <filter-function> | <uri> ]+","<flex>":"none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]","<font-family>":"[ <generic-family> | <family-name> ]#","<font-shorthand>":"[ <font-style> || <font-variant-css21> || <font-weight> || <font-stretch> ]? <font-size> [ / <line-height> ]? <font-family>","<font-variant-alternates>":"stylistic() || historical-forms || styleset() || character-variant() || swash() || ornaments() || annotation()","<font-variant-ligatures>":"[ common-ligatures | no-common-ligatures ] || [ discretionary-ligatures | no-discretionary-ligatures ] || [ historical-ligatures | no-historical-ligatures ] || [ contextual | no-contextual ]","<font-variant-numeric>":"[ lining-nums | oldstyle-nums ] || [ proportional-nums | tabular-nums ] || [ diagonal-fractions | stacked-fractions ] || ordinal || slashed-zero","<font-variant-east-asian>":"[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ] || [ full-width | proportional-width ] || ruby","<paint>":"<paint-basic> | <uri> <paint-basic>?","<paint-basic>":"none | currentColor | <color-svg> <icccolor>?","<position>":"[ center | [ left | right ] [ <percentage> | <length> ]? ] && [ center | [ top | bottom ] [ <percentage> | <length> ]? ] | [ left | center | right | <percentage> | <length> ] [ top | center | bottom | <percentage> | <length> ] | [ left | center | right | top | bottom | <percentage> | <length> ]","<repeat-style>":"repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}","<shadow>":a.many([!0],a.cast("<length>").braces(2,4),"inset","<color>"),"<text-decoration-color>":"<color>","<text-decoration-line>":"none | [ underline || overline || line-through || blink ]","<text-decoration-style>":"solid | double | dotted | dashed | wavy","<will-change>":"auto | <animateable-feature>#","<x-one-radius>":"[ <length> | <percentage> ]{1,2}"}},Object.keys(o).forEach((function(e){n[e]=o[e]})),Object.keys(i.simple).forEach((function(e){var t=i.simple[e];"string"==typeof t&&(i.simple[e]=function(e){return i.isLiteral(e,t)})})),Object.keys(i.complex).forEach((function(e){var t=i.complex[e];"string"==typeof t&&(i.complex[e]=a.parse(t))})),i.complex["<font-variant>"]=a.oror({expand:"<font-variant-ligatures>"},{expand:"<font-variant-alternates>"},"<font-variant-caps>",{expand:"<font-variant-numeric>"},{expand:"<font-variant-east-asian>"})},67285:(e,t,r)=>{"use strict";e.exports={Colors:r(8780),Combinator:r(62402),Parser:r(20232),PropertyName:r(85556),PropertyValue:r(85076),PropertyValuePart:r(21915),Matcher:r(34022),MediaFeature:r(61899),MediaQuery:r(87567),Selector:r(75548),SelectorPart:r(89890),SelectorSubPart:r(90753),Specificity:r(51070),TokenStream:r(53333),Tokens:r(73778),ValidationError:r(13690)}},5366:(e,t,r)=>{"use strict";e.exports={css:r(67285),util:r(22439)}},88053:e=>{"use strict";function t(){this._listeners=Object.create(null)}e.exports=t,t.prototype={constructor:t,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){if("string"==typeof e&&(e={type:e}),void 0!==e.target&&(e.target=this),void 0===e.type)throw new Error("Event object missing 'type' property.");if(this._listeners[e.type])for(var t=this._listeners[e.type].concat(),r=0,n=t.length;r<n;r++)t[r].call(this,e)},removeListener:function(e,t){if(this._listeners[e])for(var r=this._listeners[e],n=0,o=r.length;n<o;n++)if(r[n]===t){r.splice(n,1);break}}}},26012:e=>{"use strict";function t(e){this._input=e.replace(/(\r\n?|\n)/g,"\n"),this._line=1,this._col=1,this._cursor=0}e.exports=t,t.prototype={constructor:t,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor===this._input.length},peek:function(e){var t=null;return e=void 0===e?1:e,this._cursor<this._input.length&&(t=this._input.charAt(this._cursor+e-1)),t},read:function(){var e=null;return this._cursor<this._input.length&&("\n"===this._input.charAt(this._cursor)?(this._line++,this._col=1):this._col++,e=this._input.charAt(this._cursor++)),e},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(e){for(var t,r="";r.length<e.length||r.lastIndexOf(e)!==r.length-e.length;){if(!(t=this.read()))throw new Error('Expected "'+e+'" at line '+this._line+", col "+this._col+".");r+=t}return r},readWhile:function(e){for(var t="",r=this.peek();null!==r&&e(r);)t+=this.read(),r=this.peek();return t},readMatch:function(e){var t=this._input.substring(this._cursor),r=null;return"string"==typeof e?t.slice(0,e.length)===e&&(r=this.readCount(e.length)):e instanceof RegExp&&e.test(t)&&(r=this.readCount(RegExp.lastMatch.length)),r},readCount:function(e){for(var t="";e--;)t+=this.read();return t}}},6912:e=>{"use strict";function t(e,t,r){Error.call(this),this.name=this.constructor.name,this.col=r,this.line=t,this.message=e}e.exports=t,t.prototype=Object.create(Error.prototype),t.prototype.constructor=t},37337:e=>{"use strict";function t(e,t,r,n){this.col=r,this.line=t,this.text=e,this.type=n}e.exports=t,t.fromToken=function(e){return new t(e.value,e.startLine,e.startCol)},t.prototype={constructor:t,valueOf:function(){return this.toString()},toString:function(){return this.text}}},93099:(e,t,r)=>{"use strict";e.exports=i;var n=r(26012),o=r(6912);function i(e,t){this._reader=new n(e?e.toString():""),this._token=null,this._tokenData=t,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}i.createTokenData=function(e){var t=[],r=Object.create(null),n=e.concat([]),o=0,i=n.length+1;for(n.UNKNOWN=-1,n.unshift({name:"EOF"});o<i;o++)t.push(n[o].name),n[n[o].name]=o,n[o].text&&(r[n[o].text]=o);return n.name=function(e){return t[e]},n.type=function(e){return r[e]},n},i.prototype={constructor:i,match:function(e,t){e instanceof Array||(e=[e]);for(var r=this.get(t),n=0,o=e.length;n<o;)if(r===e[n++])return!0;return this.unget(),!1},mustMatch:function(e){var t;if(e instanceof Array||(e=[e]),!this.match.apply(this,arguments))throw t=this.LT(1),new o("Expected "+this._tokenData[e[0]].name+" at line "+t.startLine+", col "+t.startCol+".",t.startLine,t.startCol)},advance:function(e,t){for(;0!==this.LA(0)&&!this.match(e,t);)this.get();return this.LA(0)},get:function(e){var t,r,n=this._tokenData,o=0;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){for(o++,this._token=this._lt[this._ltIndex++],r=n[this._token.type];void 0!==r.channel&&e!==r.channel&&this._ltIndex<this._lt.length;)this._token=this._lt[this._ltIndex++],r=n[this._token.type],o++;if((void 0===r.channel||e===r.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(o),this._token.type}return(t=this._getToken()).type>-1&&!n[t.type].hide&&(t.channel=n[t.type].channel,this._token=t,this._lt.push(t),this._ltIndexCache.push(this._lt.length-this._ltIndex+o),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),(r=n[t.type])&&(r.hide||void 0!==r.channel&&e!==r.channel)?this.get(e):t.type},LA:function(e){var t,r=e;if(e>0){if(e>5)throw new Error("Too much lookahead.");for(;r;)t=this.get(),r--;for(;r<e;)this.unget(),r++}else if(e<0){if(!this._lt[this._ltIndex+e])throw new Error("Too much lookbehind.");t=this._lt[this._ltIndex+e].type}else t=this._token.type;return t},LT:function(e){return this.LA(e),this._lt[this._ltIndex+e-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(e){return e<0||e>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[e].name},tokenType:function(e){return this._tokenData[e]||-1},unget:function(){if(!this._ltIndexCache.length)throw new Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}}},22439:(e,t,r)=>{"use strict";e.exports={StringReader:r(26012),SyntaxError:r(6912),SyntaxUnit:r(37337),EventTarget:r(88053),TokenStreamBase:r(93099)}},38381:function(e){(function(){var t,r,n;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},r=process.hrtime,n=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},93412:(e,t,r)=>{"use strict";var n=r(30042);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},31193:(e,t,r)=>{e.exports=r(93412)()},30042:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},95510:(e,t,r)=>{for(var n=r(85083),o="undefined"==typeof window?r.g:window,i=["moz","webkit"],a="AnimationFrame",l=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],s=0;!l&&s<i.length;s++)l=o[i[s]+"Request"+a],u=o[i[s]+"Cancel"+a]||o[i[s]+"CancelRequest"+a];if(!l||!u){var c=0,f=0,d=[];l=function(e){if(0===d.length){var t=n(),r=Math.max(0,16.666666666666668-(t-c));c=r+t,setTimeout((function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(r))}return d.push({handle:++f,callback:e,cancelled:!1}),f},u=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}e.exports=function(e){return l.call(o,e)},e.exports.cancel=function(){u.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=l,e.cancelAnimationFrame=u}},85083:function(e){(function(){var t,r,n,o,i,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},r=process.hrtime,o=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),i=o-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},78743:(e,t,r)=>{"use strict";function n(){return n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var i,a=(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},i(e,t)},function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});t.fk=void 0;var l,u=r(87363),s="undefined"==typeof navigator||!0===r.g.PREVENT_CODEMIRROR_RENDER;s||(l=r(3458));var c=function(){function e(){}return e.equals=function(e,t){var r=this,n=Object.keys,i=o(e),a=o(t);return e&&t&&"object"===i&&i===a?n(e).length===n(t).length&&n(e).every((function(n){return r.equals(e[n],t[n])})):e===t},e}(),f=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,r){var n=this.editor.getDoc();r&&this.editor.focus(),t?n.setCursor(e):n.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,r){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!c.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!c.equals(e.cursor,t.cursor)&&this.delegateCursor(r.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!c.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter((function(e){return/^on/.test(e)})).forEach((function(e){switch(e){case"onBlur":t.editor.on("blur",(function(e,r){t.props.onBlur(t.editor,r)}));break;case"onContextMenu":t.editor.on("contextmenu",(function(e,r){t.props.onContextMenu(t.editor,r)}));break;case"onCopy":t.editor.on("copy",(function(e,r){t.props.onCopy(t.editor,r)}));break;case"onCursor":t.editor.on("cursorActivity",(function(e){t.props.onCursor(t.editor,t.editor.getDoc().getCursor())}));break;case"onCursorActivity":t.editor.on("cursorActivity",(function(e){t.props.onCursorActivity(t.editor)}));break;case"onCut":t.editor.on("cut",(function(e,r){t.props.onCut(t.editor,r)}));break;case"onDblClick":t.editor.on("dblclick",(function(e,r){t.props.onDblClick(t.editor,r)}));break;case"onDragEnter":t.editor.on("dragenter",(function(e,r){t.props.onDragEnter(t.editor,r)}));break;case"onDragLeave":t.editor.on("dragleave",(function(e,r){t.props.onDragLeave(t.editor,r)}));break;case"onDragOver":t.editor.on("dragover",(function(e,r){t.props.onDragOver(t.editor,r)}));break;case"onDragStart":t.editor.on("dragstart",(function(e,r){t.props.onDragStart(t.editor,r)}));break;case"onDrop":t.editor.on("drop",(function(e,r){t.props.onDrop(t.editor,r)}));break;case"onFocus":t.editor.on("focus",(function(e,r){t.props.onFocus(t.editor,r)}));break;case"onGutterClick":t.editor.on("gutterClick",(function(e,r,n,o){t.props.onGutterClick(t.editor,r,n,o)}));break;case"onInputRead":t.editor.on("inputRead",(function(e,r){t.props.onInputRead(t.editor,r)}));break;case"onKeyDown":t.editor.on("keydown",(function(e,r){t.props.onKeyDown(t.editor,r)}));break;case"onKeyHandled":t.editor.on("keyHandled",(function(e,r,n){t.props.onKeyHandled(t.editor,r,n)}));break;case"onKeyPress":t.editor.on("keypress",(function(e,r){t.props.onKeyPress(t.editor,r)}));break;case"onKeyUp":t.editor.on("keyup",(function(e,r){t.props.onKeyUp(t.editor,r)}));break;case"onMouseDown":t.editor.on("mousedown",(function(e,r){t.props.onMouseDown(t.editor,r)}));break;case"onPaste":t.editor.on("paste",(function(e,r){t.props.onPaste(t.editor,r)}));break;case"onRenderLine":t.editor.on("renderLine",(function(e,r,n){t.props.onRenderLine(t.editor,r,n)}));break;case"onScroll":t.editor.on("scroll",(function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())}));break;case"onSelection":t.editor.on("beforeSelectionChange",(function(e,r){t.props.onSelection(t.editor,r)}));break;case"onTouchStart":t.editor.on("touchstart",(function(e,r){t.props.onTouchStart(t.editor,r)}));break;case"onUpdate":t.editor.on("update",(function(e){t.props.onUpdate(t.editor)}));break;case"onViewportChange":t.editor.on("viewportChange",(function(e,r,n){t.props.onViewportChange(t.editor,r,n)}))}}))},e}(),d=function(e){function t(t){var r=e.call(this,t)||this;return s||(r.applied=!1,r.appliedNext=!1,r.appliedUserDefined=!1,r.deferred=null,r.emulating=!1,r.hydrated=!1,r.initCb=function(){r.props.editorDidConfigure&&r.props.editorDidConfigure(r.editor)},r.mounted=!1),r}return a(t,e),t.prototype.hydrate=function(e){var t=this,r=e&&e.options?e.options:{},o=n({},l.defaults,this.editor.options,r);Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){r.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&(t.editor.setOption(e,o[e]),t.mirror.setOption(e,o[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.getDoc(),r=t.lastLine(),n=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:r,ch:n}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(e){this.emulating=!0;var t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){var r=t.getCursor();t.setValue(e),t.setCursor(r)}this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){var t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentDidMount=function(){var e=this;s||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&l.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=l(this.ref,this.props.options),this.shared=new f(this.editor,this.props),this.mirror=l((function(){}),this.props.options),this.editor.on("electricInput",(function(){e.mirror.setHistory(e.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(function(){e.mirror.setCursor(e.editor.getDoc().getCursor())})),this.editor.on("beforeChange",(function(t,r){if(!e.emulating){r.cancel(),e.deferred=r;var n=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,n)}})),this.editor.on("change",(function(t,r){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,r,e.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(!s){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(l)},t.prototype.shouldComponentUpdate=function(e,t){return!s},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return u.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(u.Component);t.fk=d,function(e){function t(t){var r=e.call(this,t)||this;return s||(r.applied=!1,r.appliedUserDefined=!1,r.continueChange=!1,r.detached=!1,r.hydrated=!1,r.initCb=function(){r.props.editorDidConfigure&&r.props.editorDidConfigure(r.editor)},r.mounted=!1,r.onBeforeChangeCb=function(){r.continueChange=!0}),r}a(t,e),t.prototype.hydrate=function(e){var t=this,r=e&&e.options?e.options:{},o=n({},l.defaults,this.editor.options,r);if(Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){r.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&t.editor.setOption(e,o[e])})),!this.hydrated){var i=this.editor.getDoc(),a=i.lastLine(),u=i.getLine(i.lastLine()).length;i.replaceRange(e.value||"",{line:0,ch:0},{line:a,ch:u})}this.hydrated=!0},t.prototype.componentDidMount=function(){var e=this;s||(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&l.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=l(this.ref,this.props.options),this.shared=new f(this.editor,this.props),this.editor.on("beforeChange",(function(t,r){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,r,e.editor.getValue(),e.onBeforeChangeCb)})),this.editor.on("change",(function(t,r){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,r,e.editor.getValue()):e.props.onChange(e.editor,r,e.editor.getValue()))})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(this.detached&&!1===this.props.detach&&(this.detached=!1,e.editorDidAttach&&e.editorDidAttach(this.editor)),this.detached||!0!==this.props.detach||(this.detached=!0,e.editorDidDetach&&e.editorDidDetach(this.editor)),!s&&!this.detached){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),e.autoCursor||void 0===e.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(e),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){s||this.props.editorWillUnmount&&this.props.editorWillUnmount(l)},t.prototype.shouldComponentUpdate=function(e,t){var r=!0;return s&&(r=!1),this.detached&&e.detach&&(r=!1),r},t.prototype.render=function(){var e=this;if(s)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return u.createElement("div",{className:t,ref:function(t){return e.ref=t}})}}(u.Component)},42130:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(87363)),o=d(r(31193)),i=d(r(61533)),a=d(r(71443)),l=r(20287),u=r(79769),s=r(39899),c=d(r(1665)),f=d(r(4893));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h.apply(this,arguments)}function m(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class v extends n.Component{static getDerivedStateFromProps(e,t){let{position:r}=e,{prevPropsPosition:n}=t;return!r||n&&r.x===n.x&&r.y===n.y?null:((0,f.default)("Draggable: getDerivedStateFromProps %j",{position:r,prevPropsPosition:n}),{x:r.x,y:r.y,prevPropsPosition:{...r}})}constructor(e){super(e),m(this,"onDragStart",((e,t)=>{(0,f.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,u.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),m(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,f.default)("Draggable: onDrag: %j",t);const r=(0,u.createDraggableData)(this,t),n={x:r.x,y:r.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=n;n.x+=this.state.slackX,n.y+=this.state.slackY;const[o,i]=(0,u.getBoundPosition)(this,n.x,n.y);n.x=o,n.y=i,n.slackX=this.state.slackX+(e-n.x),n.slackY=this.state.slackY+(t-n.y),r.x=n.x,r.y=n.y,r.deltaX=n.x-this.state.x,r.deltaY=n.y-this.state.y}if(!1===this.props.onDrag(e,r))return!1;this.setState(n)})),m(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,u.createDraggableData)(this,t)))return!1;(0,f.default)("Draggable: onDragStop: %j",t);const r={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:i.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:s,defaultClassNameDragged:f,position:d,positionOffset:p,scale:m,...v}=this.props;let g={},y=null;const b=!Boolean(d)||this.state.dragging,w=d||o,_={x:(0,u.canDragX)(this)&&b?this.state.x:w.x,y:(0,u.canDragY)(this)&&b?this.state.y:w.y};this.state.isElementSVG?y=(0,l.createSVGTransform)(_,p):g=(0,l.createCSSTransform)(_,p);const x=(0,a.default)(r.props.className||"",i,{[s]:this.state.dragging,[f]:this.state.dragged});return n.createElement(c.default,h({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:x,style:{...r.props.style,...g},transform:y}))}}t.default=v,m(v,"displayName","Draggable"),m(v,"propTypes",{...c.default.propTypes,axis:o.default.oneOf(["both","x","y","none"]),bounds:o.default.oneOfType([o.default.shape({left:o.default.number,right:o.default.number,top:o.default.number,bottom:o.default.number}),o.default.string,o.default.oneOf([!1])]),defaultClassName:o.default.string,defaultClassNameDragging:o.default.string,defaultClassNameDragged:o.default.string,defaultPosition:o.default.shape({x:o.default.number,y:o.default.number}),positionOffset:o.default.shape({x:o.default.oneOfType([o.default.number,o.default.string]),y:o.default.oneOfType([o.default.number,o.default.string])}),position:o.default.shape({x:o.default.number,y:o.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),m(v,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},1665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,r&&r.set(e,n);return n}(r(87363)),o=c(r(31193)),i=c(r(61533)),a=r(20287),l=r(79769),u=r(39899),s=c(r(4893));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function d(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const p={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let m=h;class v extends n.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=t;if(this.props.disabled||!(e.target instanceof r.defaultView.Node)||this.props.handle&&!(0,a.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,a.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const n=(0,a.getTouchIdentifier)(e);this.touchIdentifier=n;const o=(0,l.getControlPosition)(e,n,this);if(null==o)return;const{x:i,y:u}=o,c=(0,l.createCoreData)(this,i,u);(0,s.default)("DraggableCore: handleDragStart: %j",c),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,a.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=u,(0,a.addEvent)(r,m.move,this.handleDrag),(0,a.addEvent)(r,m.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,l.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX,t=n-this.lastY;if([e,t]=(0,l.snapToGrid)(this.props.grid,e,t),!e&&!t)return;r=this.lastX+e,n=this.lastY+t}const o=(0,l.createCoreData)(this,r,n);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=r,this.lastY=n;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,l.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:r,y:n}=t;if(Array.isArray(this.props.grid)){let e=r-this.lastX||0,t=n-this.lastY||0;[e,t]=(0,l.snapToGrid)(this.props.grid,e,t),r=this.lastX+e,n=this.lastY+t}const o=(0,l.createCoreData)(this,r,n);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(i.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,s.default)("DraggableCore: Removing handlers"),(0,a.removeEvent)(i.ownerDocument,m.move,this.handleDrag),(0,a.removeEvent)(i.ownerDocument,m.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(m=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(m=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(m=p,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(m=p,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,a.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,a.removeEvent)(t,h.move,this.handleDrag),(0,a.removeEvent)(t,p.move,this.handleDrag),(0,a.removeEvent)(t,h.stop,this.handleDragStop),(0,a.removeEvent)(t,p.stop,this.handleDragStop),(0,a.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,a.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:i.default.findDOMNode(this)}render(){return n.cloneElement(n.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}t.default=v,d(v,"displayName","DraggableCore"),d(v,"propTypes",{allowAnyClick:o.default.bool,children:o.default.node.isRequired,disabled:o.default.bool,enableUserSelectHack:o.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:o.default.arrayOf(o.default.number),handle:o.default.string,cancel:o.default.string,nodeRef:o.default.object,onStart:o.default.func,onDrag:o.default.func,onStop:o.default.func,onMouseDown:o.default.func,scale:o.default.number,className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),d(v,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},85838:(e,t,r)=>{"use strict";const{default:n,DraggableCore:o}=r(42130);e.exports=n,e.exports.default=n,e.exports.DraggableCore=o},20287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=s,t.addEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r},t.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){const r=u(e,t,"px");return{[(0,o.browserPrefixToKey)("transform",o.default)]:r}},t.createSVGTransform=function(e,t){return u(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,n.findInArray)(e.targetTouches,(e=>t===e.identifier))||e.changedTouches&&(0,n.findInArray)(e.changedTouches,(e=>t===e.identifier))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=u,t.innerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingTop),t-=(0,n.int)(r.paddingBottom),t},t.innerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,n.int)(r.paddingLeft),t-=(0,n.int)(r.paddingRight),t},t.matchesSelector=l,t.matchesSelectorAndParentsTo=function(e,t,r){let n=e;do{if(l(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1},t.offsetXYFromParent=function(e,t,r){const n=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-n.left)/r,i=(e.clientY+t.scrollTop-n.top)/r;return{x:o,y:i}},t.outerHeight=function(e){let t=e.clientHeight;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderTopWidth),t+=(0,n.int)(r.borderBottomWidth),t},t.outerWidth=function(e){let t=e.clientWidth;const r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,n.int)(r.borderLeftWidth),t+=(0,n.int)(r.borderRightWidth),t},t.removeClassName=c,t.removeEvent=function(e,t,r,n){if(!e)return;const o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&c(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var n=r(39899),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(n,a,l):n[a]=e[a]}n.default=e,r&&r.set(e,n);return n}(r(49118));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}let a="";function l(e,t){return a||(a=(0,n.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,n.isFunction)(e[t])}))),!!(0,n.isFunction)(e[a])&&e[a](t)}function u(e,t,r){let{x:n,y:o}=e,i="translate(".concat(n).concat(r,",").concat(o).concat(r,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+r),n="".concat("string"==typeof t.y?t.y:t.y+r);i="translate(".concat(e,", ").concat(n,")")+i}return i}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},49118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=n;const r=["Moz","Webkit","O","ms"];function n(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const n=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!n)return"";if(t in n)return"";for(let e=0;e<r.length;e++)if(o(t,r[e])in n)return r[e];return""}function o(e,t){return t?"".concat(t).concat(function(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):"-"===e[n]?r=!0:t+=e[n];return t}(e)):e}t.default=n()},4893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){0}},79769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.createCoreData=function(e,t,r){const o=!(0,n.isNum)(e.lastX),a=i(e);return o?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:a,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}},t.createDraggableData=function(e,t){const r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}},t.getBoundPosition=function(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:a}=e.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const l=i(e);if("string"==typeof a){const{ownerDocument:e}=l,t=e.defaultView;let r;if(r="parent"===a?l.parentNode:e.querySelector(a),!(r instanceof t.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=r,u=t.getComputedStyle(l),s=t.getComputedStyle(i);a={left:-l.offsetLeft+(0,n.int)(s.paddingLeft)+(0,n.int)(u.marginLeft),top:-l.offsetTop+(0,n.int)(s.paddingTop)+(0,n.int)(u.marginTop),right:(0,o.innerWidth)(i)-(0,o.outerWidth)(l)-l.offsetLeft+(0,n.int)(s.paddingRight)-(0,n.int)(u.marginRight),bottom:(0,o.innerHeight)(i)-(0,o.outerHeight)(l)-l.offsetTop+(0,n.int)(s.paddingBottom)-(0,n.int)(u.marginBottom)}}(0,n.isNum)(a.right)&&(t=Math.min(t,a.right));(0,n.isNum)(a.bottom)&&(r=Math.min(r,a.bottom));(0,n.isNum)(a.left)&&(t=Math.max(t,a.left));(0,n.isNum)(a.top)&&(r=Math.max(r,a.top));return[t,r]},t.getControlPosition=function(e,t,r){const n="number"==typeof t?(0,o.getTouch)(e,t):null;if("number"==typeof t&&!n)return null;const a=i(r),l=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,o.offsetXYFromParent)(n||e,l,r.props.scale)},t.snapToGrid=function(e,t,r){const n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]};var n=r(39899),o=r(20287);function i(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},39899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,r){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(r," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]},t.int=function(e){return parseInt(e,10)},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)}},6057:(e,t,r)=>{"use strict";var n=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(r(87363)),o=!1;"undefined"!=typeof window&&(o="ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);var i=o,a={borderRadius:"inherit",height:"100%",left:0,position:"absolute",top:0,width:"100%"};function l(e,t,r,n){return r*((e=e/n-1)*e*e*e*e+1)+t}var u=Math.sqrt(2),s=Math.cos,c=Math.max,f=Math.min;function d(e){return f(e.duration,Date.now()-e.mouseDown)}function p(e){return 0<e.mouseUp?Date.now()-e.mouseUp:0}function h(e){var t=e.duration,r=e.radius,n=.85*l(d(e),0,r,t),o=.15*l(p(e),0,r,t),i=.02*r*s(Date.now()/t);return c(0,n+o+i)}function m(e,t,r){return r||f(.6*c(e,t))}function v(e,t){return l(p(e),t,-t,e.duration)}function g(e,t){return f(v(e,t),l(d(e),0,.3,3*e.duration))}function y(e,t,r){return f(1,h(e)/t*2/u)*(r/2-e.x)}function b(e,t,r){return f(1,h(e)/t*2/u)*(r/2-e.y)}function w(e){return h(e)/e.radius}var _=function(e){var t=e.mouseUp,r=e.duration;return!t||Date.now()-t<r};function x(e){var t,r=[],n=!1,o={each:function(e,t){for(var n=0,o=r.length;n<o;n++)e.call(t,r[n])},play:function(){n||(n=!0,o.update())},stop:function(){n=!1,cancelAnimationFrame(t)},getTotalOpacity:function(e){for(var t=0,n=0,o=r.length;n<o;n++)t+=g(r[n],e);return t},update:function(){(r=r.filter(_)).length?t=requestAnimationFrame(o.update):o.stop(),e()},add:function(e){r.push(e),o.play()},release:function(e){for(var t=r.length-1;0<=t;t--)if(!r[t].mouseUp)return r[t].mouseUp=e}};return o}function S(){for(var e=arguments,t={},r=0;r<arguments.length;r++){var n=e[r];if(n)for(var o in n)t[o]=n[o]}return t}var k=2*Math.PI,O={background:!0,className:"ink",duration:1e3,opacity:.25,recenter:!0,hasTouch:i},E=function(e){function t(t){e.apply(this,arguments),this.state={color:"transparent",density:1,height:0,store:x(this.tick.bind(this)),width:0},this.touchEvents=this.touchEvents()}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.touchEvents=function(){return this.props.hasTouch?{onTouchStart:this.t.bind(this),onTouchEnd:this.n.bind(this),onTouchCancel:this.n.bind(this)}:{onMouseDown:this.t.bind(this),onMouseUp:this.n.bind(this),onMouseLeave:this.n.bind(this)}},t.prototype.tick=function(){var e=this.state,t=e.ctx,r=e.color,n=e.density,o=e.height,i=e.width,a=e.store;t.save(),t.scale(n,n),t.clearRect(0,0,i,o),t.fillStyle=r,this.props.background&&(t.globalAlpha=a.getTotalOpacity(this.props.opacity),t.fillRect(0,0,i,o)),a.each(this.makeBlot,this),t.restore()},t.prototype.makeBlot=function(e){var t=this.state,r=t.ctx,n=t.height,o=t.width,i=e.x,a=e.y,l=e.radius;if(r.globalAlpha=v(e,this.props.opacity),r.beginPath(),this.props.recenter){var u=Math.max(n,o);i+=y(e,u,o),a+=b(e,u,n)}r.arc(i,a,l*w(e),0,k),r.closePath(),r.fill()},t.prototype.componentWillUnmount=function(){this.state.store.stop()},t.prototype.pushBlot=function(e,t,r){var n=this,o=this.canvas;o.getDOMNode&&"function"==typeof o.getDOMNode&&(o=o.getDOMNode());var i=o.getBoundingClientRect(),a=i.top,l=i.bottom,u=i.left,s=i.right,c=window.getComputedStyle(o).color,f=this.state.ctx||o.getContext("2d"),d=function(e){return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}(f),p=l-a,h=s-u,v=m(p,h,this.props.radius);this.setState({color:c,ctx:f,density:d,height:p,width:h},(function(){n.state.store.add({duration:n.props.duration,mouseDown:e,mouseUp:0,radius:v,x:t-u,y:r-a})}))},t.prototype.setCanvas=function(e){this.canvas=e},t.prototype.render=function(){var e=this.state,t=e.density,r=e.height,o=e.width,i=this.props,l=i.className,u=i.style,s=S({className:l,ref:this.setCanvas.bind(this),height:r*t,width:o*t,onDragOver:this.n,style:S(a,u)},this.touchEvents);return n.createElement("canvas",s)},t.prototype.t=function(e){var t=e.button,r=e.ctrlKey,n=e.clientX,o=e.clientY,i=e.changedTouches,a=Date.now();if(i)for(var l=0;l<i.length;l++){var u=i[l],s=u.clientX,c=u.clientY;this.pushBlot(a,s,c)}else 0!==t||r||this.pushBlot(a,n,o)},t.prototype.n=function(){this.state.store.release(Date.now())},t}(n.PureComponent);E.defaultProps=O,e.exports=E},72536:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(99971)),l=i(r(33534)),u=i(r(24676)),s=i(r(38381)),c=i(r(95510)),f=i(r(71363)),d=i(r(87363)),p=i(r(31193)),h=1e3/60,m=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.wasAnimating=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyle=null,this.clearUnreadPropStyle=function(e){var t=!1,r=o.state,i=r.currentStyle,a=r.currentVelocity,l=r.lastIdealStyle,u=r.lastIdealVelocity;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var c=e[s];"number"==typeof c&&(t||(t=!0,i=n({},i),a=n({},a),l=n({},l),u=n({},u)),i[s]=c,a[s]=0,l[s]=c,u[s]=0)}t&&o.setState({currentStyle:i,currentVelocity:a,lastIdealStyle:l,lastIdealVelocity:u})},this.startAnimationIfNecessary=function(){o.animationID=c.default((function(e){var t=o.props.style;if(f.default(o.state.currentStyle,t,o.state.currentVelocity))return o.wasAnimating&&o.props.onRest&&o.props.onRest(),o.animationID=null,o.wasAnimating=!1,void(o.accumulatedTime=0);o.wasAnimating=!0;var r=e||s.default(),n=r-o.prevTime;if(o.prevTime=r,o.accumulatedTime=o.accumulatedTime+n,o.accumulatedTime>10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l={},c={},d={},p={};for(var m in t)if(Object.prototype.hasOwnProperty.call(t,m)){var v=t[m];if("number"==typeof v)d[m]=v,p[m]=0,l[m]=v,c[m]=0;else{for(var g=o.state.lastIdealStyle[m],y=o.state.lastIdealVelocity[m],b=0;b<a;b++){var w=u.default(h/1e3,g,y,v.val,v.stiffness,v.damping,v.precision);g=w[0],y=w[1]}var _=u.default(h/1e3,g,y,v.val,v.stiffness,v.damping,v.precision),x=_[0],S=_[1];d[m]=g+(x-g)*i,p[m]=y+(S-y)*i,l[m]=g,c[m]=y}}o.animationID=null,o.accumulatedTime-=a*h,o.setState({currentStyle:d,currentVelocity:p,lastIdealStyle:l,lastIdealVelocity:c}),o.unreadPropStyle=null,o.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyle:p.default.objectOf(p.default.number),style:p.default.objectOf(p.default.oneOfType([p.default.number,p.default.object])).isRequired,children:p.default.func.isRequired,onRest:p.default.func},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyle,r=e.style,n=t||l.default(r),o=a.default(n);return{currentStyle:n,currentVelocity:o,lastIdealStyle:n,lastIdealVelocity:o}},t.prototype.componentDidMount=function(){this.prevTime=s.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyle&&this.clearUnreadPropStyle(this.unreadPropStyle),this.unreadPropStyle=e.style,null==this.animationID&&(this.prevTime=s.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(c.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyle);return e&&d.default.Children.only(e)},t}(d.default.Component);t.default=m,e.exports=t.default},45831:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(99971)),l=i(r(33534)),u=i(r(24676)),s=i(r(38381)),c=i(r(95510)),f=i(r(71363)),d=i(r(87363)),p=i(r(31193)),h=1e3/60;var m=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=o.state,r=t.currentStyles,i=t.currentVelocities,a=t.lastIdealStyles,l=t.lastIdealVelocities,u=!1,s=0;s<e.length;s++){var c=e[s],f=!1;for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var p=c[d];"number"==typeof p&&(f||(f=!0,u=!0,r[s]=n({},r[s]),i[s]=n({},i[s]),a[s]=n({},a[s]),l[s]=n({},l[s])),r[s][d]=p,i[s][d]=0,a[s][d]=p,l[s][d]=0)}}u&&o.setState({currentStyles:r,currentVelocities:i,lastIdealStyles:a,lastIdealVelocities:l})},this.startAnimationIfNecessary=function(){o.animationID=c.default((function(e){var t=o.props.styles(o.state.lastIdealStyles);if(function(e,t,r){for(var n=0;n<e.length;n++)if(!f.default(e[n],t[n],r[n]))return!1;return!0}(o.state.currentStyles,t,o.state.currentVelocities))return o.animationID=null,void(o.accumulatedTime=0);var r=e||s.default(),n=r-o.prevTime;if(o.prevTime=r,o.accumulatedTime=o.accumulatedTime+n,o.accumulatedTime>10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l=[],c=[],d=[],p=[],m=0;m<t.length;m++){var v=t[m],g={},y={},b={},w={};for(var _ in v)if(Object.prototype.hasOwnProperty.call(v,_)){var x=v[_];if("number"==typeof x)g[_]=x,y[_]=0,b[_]=x,w[_]=0;else{for(var S=o.state.lastIdealStyles[m][_],k=o.state.lastIdealVelocities[m][_],O=0;O<a;O++){var E=u.default(h/1e3,S,k,x.val,x.stiffness,x.damping,x.precision);S=E[0],k=E[1]}var C=u.default(h/1e3,S,k,x.val,x.stiffness,x.damping,x.precision),j=C[0],P=C[1];g[_]=S+(j-S)*i,y[_]=k+(P-k)*i,b[_]=S,w[_]=k}}d[m]=g,p[m]=y,l[m]=b,c[m]=w}o.animationID=null,o.accumulatedTime-=a*h,o.setState({currentStyles:d,currentVelocities:p,lastIdealStyles:l,lastIdealVelocities:c}),o.unreadPropStyles=null,o.startAnimationIfNecessary()}))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:p.default.arrayOf(p.default.objectOf(p.default.number)),styles:p.default.func.isRequired,children:p.default.func.isRequired},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyles,r=e.styles,n=t||r().map(l.default),o=n.map((function(e){return a.default(e)}));return{currentStyles:n,currentVelocities:o,lastIdealStyles:n,lastIdealVelocities:o}},t.prototype.componentDidMount=function(){this.prevTime=s.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){null!=this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles),this.unreadPropStyles=e.styles(this.state.lastIdealStyles),null==this.animationID&&(this.prevTime=s.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){null!=this.animationID&&(c.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=this.props.children(this.state.currentStyles);return e&&d.default.Children.only(e)},t}(d.default.Component);t.default=m,e.exports=t.default},27052:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=i(r(99971)),l=i(r(33534)),u=i(r(24676)),s=i(r(75790)),c=i(r(38381)),f=i(r(95510)),d=i(r(71363)),p=i(r(87363)),h=i(r(31193)),m=1e3/60;function v(e,t,r){var n=t;return null==n?e.map((function(e,t){return{key:e.key,data:e.data,style:r[t]}})):e.map((function(e,t){for(var o=0;o<n.length;o++)if(n[o].key===e.key)return{key:n[o].key,data:n[o].data,style:r[t]};return{key:e.key,data:e.data,style:r[t]}}))}function g(e,t,r,n,o,i,l,u,c){for(var f=s.default(n,o,(function(e,n){var o=t(n);return null==o||d.default(i[e],o,l[e])?(r({key:n.key,data:n.data}),null):{key:n.key,data:n.data,style:o}})),p=[],h=[],m=[],v=[],g=0;g<f.length;g++){for(var y=f[g],b=null,w=0;w<n.length;w++)if(n[w].key===y.key){b=w;break}if(null==b){var _=e(y);p[g]=_,m[g]=_;var x=a.default(y.style);h[g]=x,v[g]=x}else p[g]=i[b],m[g]=u[b],h[g]=l[b],v[g]=c[b]}return[f,p,h,m,v]}var y=function(e){function t(r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.call(this,r),this.unmounting=!1,this.animationID=null,this.prevTime=0,this.accumulatedTime=0,this.unreadPropStyles=null,this.clearUnreadPropStyle=function(e){for(var t=g(o.props.willEnter,o.props.willLeave,o.props.didLeave,o.state.mergedPropsStyles,e,o.state.currentStyles,o.state.currentVelocities,o.state.lastIdealStyles,o.state.lastIdealVelocities),r=t[0],i=t[1],a=t[2],l=t[3],u=t[4],s=0;s<e.length;s++){var c=e[s].style,f=!1;for(var d in c)if(Object.prototype.hasOwnProperty.call(c,d)){var p=c[d];"number"==typeof p&&(f||(f=!0,i[s]=n({},i[s]),a[s]=n({},a[s]),l[s]=n({},l[s]),u[s]=n({},u[s]),r[s]={key:r[s].key,data:r[s].data,style:n({},r[s].style)}),i[s][d]=p,a[s][d]=0,l[s][d]=p,u[s][d]=0,r[s].style[d]=p)}}o.setState({currentStyles:i,currentVelocities:a,mergedPropsStyles:r,lastIdealStyles:l,lastIdealVelocities:u})},this.startAnimationIfNecessary=function(){o.unmounting||(o.animationID=f.default((function(e){if(!o.unmounting){var t=o.props.styles,r="function"==typeof t?t(v(o.state.mergedPropsStyles,o.unreadPropStyles,o.state.lastIdealStyles)):t;if(function(e,t,r,n){if(n.length!==t.length)return!1;for(var o=0;o<n.length;o++)if(n[o].key!==t[o].key)return!1;for(o=0;o<n.length;o++)if(!d.default(e[o],t[o].style,r[o]))return!1;return!0}(o.state.currentStyles,r,o.state.currentVelocities,o.state.mergedPropsStyles))return o.animationID=null,void(o.accumulatedTime=0);var n=e||c.default(),i=n-o.prevTime;if(o.prevTime=n,o.accumulatedTime=o.accumulatedTime+i,o.accumulatedTime>10*m&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var a=(o.accumulatedTime-Math.floor(o.accumulatedTime/m)*m)/m,l=Math.floor(o.accumulatedTime/m),s=g(o.props.willEnter,o.props.willLeave,o.props.didLeave,o.state.mergedPropsStyles,r,o.state.currentStyles,o.state.currentVelocities,o.state.lastIdealStyles,o.state.lastIdealVelocities),f=s[0],p=s[1],h=s[2],y=s[3],b=s[4],w=0;w<f.length;w++){var _=f[w].style,x={},S={},k={},O={};for(var E in _)if(Object.prototype.hasOwnProperty.call(_,E)){var C=_[E];if("number"==typeof C)x[E]=C,S[E]=0,k[E]=C,O[E]=0;else{for(var j=y[w][E],P=b[w][E],L=0;L<l;L++){var M=u.default(m/1e3,j,P,C.val,C.stiffness,C.damping,C.precision);j=M[0],P=M[1]}var A=u.default(m/1e3,j,P,C.val,C.stiffness,C.damping,C.precision),T=A[0],I=A[1];x[E]=j+(T-j)*a,S[E]=P+(I-P)*a,k[E]=j,O[E]=P}}y[w]=k,b[w]=O,p[w]=x,h[w]=S}o.animationID=null,o.accumulatedTime-=l*m,o.setState({currentStyles:p,currentVelocities:h,lastIdealStyles:y,lastIdealVelocities:b,mergedPropsStyles:f}),o.unreadPropStyles=null,o.startAnimationIfNecessary()}})))},this.state=this.defaultState()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,null,[{key:"propTypes",value:{defaultStyles:h.default.arrayOf(h.default.shape({key:h.default.string.isRequired,data:h.default.any,style:h.default.objectOf(h.default.number).isRequired})),styles:h.default.oneOfType([h.default.func,h.default.arrayOf(h.default.shape({key:h.default.string.isRequired,data:h.default.any,style:h.default.objectOf(h.default.oneOfType([h.default.number,h.default.object])).isRequired}))]).isRequired,children:h.default.func.isRequired,willEnter:h.default.func,willLeave:h.default.func,didLeave:h.default.func},enumerable:!0},{key:"defaultProps",value:{willEnter:function(e){return l.default(e.style)},willLeave:function(){return null},didLeave:function(){}},enumerable:!0}]),t.prototype.defaultState=function(){var e=this.props,t=e.defaultStyles,r=e.styles,n=e.willEnter,o=e.willLeave,i=e.didLeave,u="function"==typeof r?r(t):r,s=void 0;s=null==t?u:t.map((function(e){for(var t=0;t<u.length;t++)if(u[t].key===e.key)return u[t];return e}));var c=null==t?u.map((function(e){return l.default(e.style)})):t.map((function(e){return l.default(e.style)})),f=null==t?u.map((function(e){return a.default(e.style)})):t.map((function(e){return a.default(e.style)})),d=g(n,o,i,s,u,c,f,c,f),p=d[0];return{currentStyles:d[1],currentVelocities:d[2],lastIdealStyles:d[3],lastIdealVelocities:d[4],mergedPropsStyles:p}},t.prototype.componentDidMount=function(){this.prevTime=c.default(),this.startAnimationIfNecessary()},t.prototype.componentWillReceiveProps=function(e){this.unreadPropStyles&&this.clearUnreadPropStyle(this.unreadPropStyles);var t=e.styles;this.unreadPropStyles="function"==typeof t?t(v(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.lastIdealStyles)):t,null==this.animationID&&(this.prevTime=c.default(),this.startAnimationIfNecessary())},t.prototype.componentWillUnmount=function(){this.unmounting=!0,null!=this.animationID&&(f.default.cancel(this.animationID),this.animationID=null)},t.prototype.render=function(){var e=v(this.state.mergedPropsStyles,this.unreadPropStyles,this.state.currentStyles),t=this.props.children(e);return t&&p.default.Children.only(t)},t}(p.default.Component);t.default=y,e.exports=t.default},99971:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=0);return t},e.exports=t.default},75790:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n={},o=0;o<e.length;o++)n[e[o].key]=o;var i={};for(o=0;o<t.length;o++)i[t[o].key]=o;var a=[];for(o=0;o<t.length;o++)a[o]=t[o];for(o=0;o<e.length;o++)if(!Object.prototype.hasOwnProperty.call(i,e[o].key)){var l=r(o,e[o]);null!=l&&a.push(l)}return a.sort((function(e,r){var o=i[e.key],a=i[r.key],l=n[e.key],u=n[r.key];if(null!=o&&null!=a)return i[e.key]-i[r.key];if(null!=l&&null!=u)return n[e.key]-n[r.key];if(null!=o){for(var s=0;s<t.length;s++){var c=t[s].key;if(Object.prototype.hasOwnProperty.call(n,c)){if(o<i[c]&&u>n[c])return-1;if(o>i[c]&&u<n[c])return 1}}return 1}for(s=0;s<t.length;s++){c=t[s].key;if(Object.prototype.hasOwnProperty.call(n,c)){if(a<i[c]&&l>n[c])return 1;if(a>i[c]&&l<n[c])return-1}}return-1}))},e.exports=t.default},25826:(e,t)=>{"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},59070:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e.default:e}var o=r(72536);t.y_=n(o),n(r(45831)),n(r(27052));var i=r(13569);t.ST=n(i),n(r(25826)),n(r(33534)),n(r(11381))},11381:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){0};e.exports=t.default},71363:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(0!==r[n])return!1;var o="number"==typeof t[n]?t[n]:t[n].val;if(e[n]!==o)return!1}return!0},e.exports=t.default},13569:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=function(e,t){return n({},l,t,{val:e})};var o,i=r(25826),a=(o=i)&&o.__esModule?o:{default:o},l=n({},a.default.noWobble,{precision:.01});e.exports=t.default},24676:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,n,o,i,a,l){var u=n+(-i*(t-o)+-a*n)*e,s=t+u*e;if(Math.abs(u)<l&&Math.abs(s-o)<l)return r[0]=o,r[1]=0,r;return r[0]=s,r[1]=u,r};var r=[0,0];e.exports=t.default},33534:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]="number"==typeof e[r]?e[r]:e[r].val);return t},e.exports=t.default},10746:(e,t,r)=>{"use strict";r.d(t,{Z:()=>er});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(44080);function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var g={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},y=function(e,t){var r;"function"==typeof window.CustomEvent?r=new window.CustomEvent(e,{detail:t}):(r=document.createEvent("Event")).initEvent(e,!1,!0,t),window.dispatchEvent(r)};var b=function(e,t){var r=this.state.show,n=this.props.id,o=this.isCapture(t.currentTarget),i=t.currentTarget.getAttribute("currentItem");o||t.stopPropagation(),r&&"true"===i?e||this.hideTooltip(t):(t.currentTarget.setAttribute("currentItem","true"),w(t.currentTarget,this.getTargetArray(n)),this.showTooltip(t))},w=function(e,t){for(var r=0;r<t.length;r++)e!==t[r]?t[r].setAttribute("currentItem","false"):t[r].setAttribute("currentItem","true")},_={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(e,t,r){this.id in e?e[this.id][t]=r:Object.defineProperty(e,this.id,{configurable:!0,value:c({},t,r)})},get:function(e,t){var r=e[this.id];if(void 0!==r)return r[t]}};var x=function(e,t,r){var n=t.respectEffect,o=void 0!==n&&n,i=t.customEvent,a=void 0!==i&&i,l=this.props.id,u=r.target.getAttribute("data-tip")||null,s=r.target.getAttribute("data-for")||null,c=r.target;if(!this.isCustomEvent(c)||a){var f=null==l&&null==s||s===l;if(null!=u&&(!o||"float"===this.getEffect(c))&&f){var d=function(e){var t={};for(var r in e)"function"==typeof e[r]?t[r]=e[r].bind(e):t[r]=e[r];return t}(r);d.currentTarget=c,e(d)}}},S=function(e,t){var r={};return e.forEach((function(e){var n=e.getAttribute(t);n&&n.split(" ").forEach((function(e){return r[e]=!0}))})),r},k=function(){return document.getElementsByTagName("body")[0]};function O(e,t,r,n,o,i,a){for(var l=E(r),u=l.width,s=l.height,c=E(t),f=c.width,d=c.height,p=C(e,t,i),h=p.mouseX,m=p.mouseY,v=j(i,f,d,u,s),g=P(a),y=g.extraOffsetX,b=g.extraOffsetY,w=window.innerWidth,_=window.innerHeight,x=L(r),S=x.parentTop,k=x.parentLeft,O=function(e){var t=v[e].l;return h+t+y},M=function(e){var t=v[e].t;return m+t+b},A=function(e){return function(e){var t=v[e].r;return h+t+y}(e)>w},T=function(e){return function(e){var t=v[e].b;return m+t+b}(e)>_},I=function(e){return function(e){return O(e)<0}(e)||A(e)||function(e){return M(e)<0}(e)||T(e)},R=function(e){return!I(e)},N=["top","bottom","left","right"],D=[],z=0;z<4;z++){var F=N[z];R(F)&&D.push(F)}var B,H=!1,U=o!==n;return R(o)&&U?(H=!0,B=o):D.length>0&&I(o)&&I(n)&&(H=!0,B=D[0]),H?{isNewState:!0,newState:{place:B}}:{isNewState:!1,position:{left:parseInt(O(n)-k,10),top:parseInt(M(n)-S,10)}}}var E=function(e){var t=e.getBoundingClientRect(),r=t.height,n=t.width;return{height:parseInt(r,10),width:parseInt(n,10)}},C=function(e,t,r){var n=t.getBoundingClientRect(),o=n.top,i=n.left,a=E(t),l=a.width,u=a.height;return"float"===r?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+l/2,mouseY:o+u/2}},j=function(e,t,r,n,o){var i,a,l,u;return"float"===e?(i={l:-n/2,r:n/2,t:-(o+3+2),b:-3},l={l:-n/2,r:n/2,t:15,b:o+3+2+12},u={l:-(n+3+2),r:-3,t:-o/2,b:o/2},a={l:3,r:n+3+2,t:-o/2,b:o/2}):"solid"===e&&(i={l:-n/2,r:n/2,t:-(r/2+o+2),b:-r/2},l={l:-n/2,r:n/2,t:r/2,b:r/2+o+2},u={l:-(n+t/2+2),r:-t/2,t:-o/2,b:o/2},a={l:t/2,r:n+t/2+2,t:-o/2,b:o/2}),{top:i,bottom:l,left:u,right:a}},P=function(e){var t=0,r=0;for(var n in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===n?r-=parseInt(e[n],10):"bottom"===n?r+=parseInt(e[n],10):"left"===n?t-=parseInt(e[n],10):"right"===n&&(t+=parseInt(e[n],10));return{extraOffsetX:t,extraOffsetY:r}},L=function(e){for(var t=e;t;){var r=window.getComputedStyle(t);if("none"!==r.getPropertyValue("transform")||"transform"===r.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function M(e,t,r,n){if(t)return t;if(null!=r)return r;if(null===r)return null;var i=/<br\s*\/?>/;return n&&"false"!==n&&i.test(e)?e.split(i).map((function(e,t){return o().createElement("span",{key:t,className:"multi-line"},e)})):e}function A(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(r){t[r]=e[r]})),t}function T(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var I={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};function R(e,t,r,n){return function(e,t){var r=t.text,n=t.background,o=t.border,i=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(r,";\n\t background: ").concat(n,";\n\t border: 1px solid ").concat(o,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(o,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(i,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(o,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(i,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(o,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(i,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(o,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(i,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,r){var n=e.text,o=e.background,i=e.border,a=e.arrow?e.arrow:e.background,l=function(e){return I[e]?p({},I[e]):void 0}(t);n&&(l.text=n);o&&(l.background=o);r&&(l.border=i||("light"===t?"black":"white"));a&&(l.arrow=a);return l}(t,r,n))}var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function D(e,t){return e(t={exports:{}},t.exports),t.exports}var z=function(e){return e&&e.Math==Math&&e},F=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof N&&N)||function(){return this}()||Function("return this")(),B=function(e){try{return!!e()}catch(e){return!0}},H=!B((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),U={}.propertyIsEnumerable,W=Object.getOwnPropertyDescriptor,V={f:W&&!U.call({1:2},1)?function(e){var t=W(this,e);return!!t&&t.enumerable}:U},q=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G={}.toString,Y=function(e){return G.call(e).slice(8,-1)},K="".split,$=B((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Y(e)?K.call(e,""):Object(e)}:Object,Q=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},Z=function(e){return $(Q(e))},X=function(e){return"object"==typeof e?null!==e:"function"==typeof e},J=function(e,t){if(!X(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!X(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!X(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!X(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},ee=function(e){return Object(Q(e))},te={}.hasOwnProperty,re=function(e,t){return te.call(ee(e),t)},ne=F.document,oe=X(ne)&&X(ne.createElement),ie=function(e){return oe?ne.createElement(e):{}},ae=!H&&!B((function(){return 7!=Object.defineProperty(ie("div"),"a",{get:function(){return 7}}).a})),le=Object.getOwnPropertyDescriptor,ue={f:H?le:function(e,t){if(e=Z(e),t=J(t,!0),ae)try{return le(e,t)}catch(e){}if(re(e,t))return q(!V.f.call(e,t),e[t])}},se=function(e){if(!X(e))throw TypeError(String(e)+" is not an object");return e},ce=Object.defineProperty,fe={f:H?ce:function(e,t,r){if(se(e),t=J(t,!0),se(r),ae)try{return ce(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},de=H?function(e,t,r){return fe.f(e,t,q(1,r))}:function(e,t,r){return e[t]=r,e},pe=function(e,t){try{de(F,e,t)}catch(r){F[e]=t}return t},he="__core-js_shared__",me=F[he]||pe(he,{}),ve=Function.toString;"function"!=typeof me.inspectSource&&(me.inspectSource=function(e){return ve.call(e)});var ge,ye,be,we=me.inspectSource,_e=F.WeakMap,xe="function"==typeof _e&&/native code/.test(we(_e)),Se=D((function(e){(e.exports=function(e,t){return me[e]||(me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),ke=0,Oe=Math.random(),Ee=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++ke+Oe).toString(36)},Ce=Se("keys"),je=function(e){return Ce[e]||(Ce[e]=Ee(e))},Pe={},Le="Object already initialized",Me=F.WeakMap;if(xe||me.state){var Ae=me.state||(me.state=new Me),Te=Ae.get,Ie=Ae.has,Re=Ae.set;ge=function(e,t){if(Ie.call(Ae,e))throw new TypeError(Le);return t.facade=e,Re.call(Ae,e,t),t},ye=function(e){return Te.call(Ae,e)||{}},be=function(e){return Ie.call(Ae,e)}}else{var Ne=je("state");Pe[Ne]=!0,ge=function(e,t){if(re(e,Ne))throw new TypeError(Le);return t.facade=e,de(e,Ne,t),t},ye=function(e){return re(e,Ne)?e[Ne]:{}},be=function(e){return re(e,Ne)}}var De,ze,Fe={set:ge,get:ye,has:be,enforce:function(e){return be(e)?ye(e):ge(e,{})},getterFor:function(e){return function(t){var r;if(!X(t)||(r=ye(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},Be=D((function(e){var t=Fe.get,r=Fe.enforce,n=String(String).split("String");(e.exports=function(e,t,o,i){var a,l=!!i&&!!i.unsafe,u=!!i&&!!i.enumerable,s=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||re(o,"name")||de(o,"name",t),(a=r(o)).source||(a.source=n.join("string"==typeof t?t:""))),e!==F?(l?!s&&e[t]&&(u=!0):delete e[t],u?e[t]=o:de(e,t,o)):u?e[t]=o:pe(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||we(this)}))})),He=F,Ue=function(e){return"function"==typeof e?e:void 0},We=function(e,t){return arguments.length<2?Ue(He[e])||Ue(F[e]):He[e]&&He[e][t]||F[e]&&F[e][t]},Ve=Math.ceil,qe=Math.floor,Ge=function(e){return isNaN(e=+e)?0:(e>0?qe:Ve)(e)},Ye=Math.min,Ke=function(e){return e>0?Ye(Ge(e),9007199254740991):0},$e=Math.max,Qe=Math.min,Ze=function(e){return function(t,r,n){var o,i=Z(t),a=Ke(i.length),l=function(e,t){var r=Ge(e);return r<0?$e(r+t,0):Qe(r,t)}(n,a);if(e&&r!=r){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===r)return e||l||0;return!e&&-1}},Xe={includes:Ze(!0),indexOf:Ze(!1)}.indexOf,Je=function(e,t){var r,n=Z(e),o=0,i=[];for(r in n)!re(Pe,r)&&re(n,r)&&i.push(r);for(;t.length>o;)re(n,r=t[o++])&&(~Xe(i,r)||i.push(r));return i},et=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tt=et.concat("length","prototype"),rt={f:Object.getOwnPropertyNames||function(e){return Je(e,tt)}},nt={f:Object.getOwnPropertySymbols},ot=We("Reflect","ownKeys")||function(e){var t=rt.f(se(e)),r=nt.f;return r?t.concat(r(e)):t},it=function(e,t){for(var r=ot(t),n=fe.f,o=ue.f,i=0;i<r.length;i++){var a=r[i];re(e,a)||n(e,a,o(t,a))}},at=/#|\.prototype\./,lt=function(e,t){var r=st[ut(e)];return r==ft||r!=ct&&("function"==typeof t?B(t):!!t)},ut=lt.normalize=function(e){return String(e).replace(at,".").toLowerCase()},st=lt.data={},ct=lt.NATIVE="N",ft=lt.POLYFILL="P",dt=lt,pt=ue.f,ht=function(e,t,r){if(function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function")}(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}},mt=Array.isArray||function(e){return"Array"==Y(e)},vt=We("navigator","userAgent")||"",gt=F.process,yt=gt&>.versions,bt=yt&&yt.v8;bt?ze=(De=bt.split("."))[0]<4?1:De[0]+De[1]:vt&&(!(De=vt.match(/Edge\/(\d+)/))||De[1]>=74)&&(De=vt.match(/Chrome\/(\d+)/))&&(ze=De[1]);var wt,_t=ze&&+ze,xt=!!Object.getOwnPropertySymbols&&!B((function(){return!String(Symbol())||!Symbol.sham&&_t&&_t<41})),St=xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=Se("wks"),Ot=F.Symbol,Et=St?Ot:Ot&&Ot.withoutSetter||Ee,Ct=function(e){return re(kt,e)&&(xt||"string"==typeof kt[e])||(xt&&re(Ot,e)?kt[e]=Ot[e]:kt[e]=Et("Symbol."+e)),kt[e]},jt=Ct("species"),Pt=function(e,t){var r;return mt(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!mt(r.prototype)?X(r)&&null===(r=r[jt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},Lt=[].push,Mt=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,l=5==e||i;return function(u,s,c,f){for(var d,p,h=ee(u),m=$(h),v=ht(s,c,3),g=Ke(m.length),y=0,b=f||Pt,w=t?b(u,g):r||a?b(u,0):void 0;g>y;y++)if((l||y in m)&&(p=v(d=m[y],y,h),e))if(t)w[y]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:Lt.call(w,d)}else switch(e){case 4:return!1;case 7:Lt.call(w,d)}return i?-1:n||o?o:w}},At={forEach:Mt(0),map:Mt(1),filter:Mt(2),some:Mt(3),every:Mt(4),find:Mt(5),findIndex:Mt(6),filterOut:Mt(7)},Tt=Object.keys||function(e){return Je(e,et)},It=H?Object.defineProperties:function(e,t){se(e);for(var r,n=Tt(t),o=n.length,i=0;o>i;)fe.f(e,r=n[i++],t[r]);return e},Rt=We("document","documentElement"),Nt="prototype",Dt="script",zt=je("IE_PROTO"),Ft=function(){},Bt=function(e){return"<"+Dt+">"+e+"</"+Dt+">"},Ht=function(){try{wt=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Ht=wt?function(e){e.write(Bt("")),e.close();var t=e.parentWindow.Object;return e=null,t}(wt):(t=ie("iframe"),r="java"+Dt+":",t.style.display="none",Rt.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Bt("document.F=Object")),e.close(),e.F);for(var n=et.length;n--;)delete Ht[Nt][et[n]];return Ht()};Pe[zt]=!0;var Ut=Object.create||function(e,t){var r;return null!==e?(Ft[Nt]=se(e),r=new Ft,Ft[Nt]=null,r[zt]=e):r=Ht(),void 0===t?r:It(r,t)},Wt=Ct("unscopables"),Vt=Array.prototype;null==Vt[Wt]&&fe.f(Vt,Wt,{configurable:!0,value:Ut(null)});var qt,Gt,Yt,Kt,$t=At.find,Qt="find",Zt=!0;Qt in[]&&Array(1)[Qt]((function(){Zt=!1})),function(e,t){var r,n,o,i,a,l=e.target,u=e.global,s=e.stat;if(r=u?F:s?F[l]||pe(l,{}):(F[l]||{}).prototype)for(n in t){if(i=t[n],o=e.noTargetGet?(a=pt(r,n))&&a.value:r[n],!dt(u?n:l+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;it(i,o)}(e.sham||o&&o.sham)&&de(i,"sham",!0),Be(r,n,i,e)}}({target:"Array",proto:!0,forced:Zt},{find:function(e){return $t(this,e,arguments.length>1?arguments[1]:void 0)}}),qt=Qt,Vt[Wt][qt]=!0;var Xt,Jt=function(e){e.hide=function(e){y(g.HIDE,{target:e})},e.rebuild=function(){y(g.REBUILD)},e.show=function(e){y(g.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.showTooltip({currentTarget:t&&e.detail.target},!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(Gt=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(g.HIDE,this.globalHide),window.addEventListener(g.HIDE,this.globalHide,!1),window.removeEventListener(g.REBUILD,this.globalRebuild),window.addEventListener(g.REBUILD,this.globalRebuild,!1),window.removeEventListener(g.SHOW,this.globalShow),window.addEventListener(g.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(g.HIDE,this.globalHide),window.removeEventListener(g.REBUILD,this.globalRebuild),window.removeEventListener(g.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(Gt=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,r=this.state,n=r.event,o=r.eventOff,i=e.getAttribute("data-event")||n,a=e.getAttribute("data-event-off")||o;i.split(" ").forEach((function(r){e.removeEventListener(r,_.get(e,r));var n=b.bind(t,a);_.set(e,r,n),e.addEventListener(r,n,!1)})),a&&a.split(" ").forEach((function(r){e.removeEventListener(r,t.hideTooltip),e.addEventListener(r,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,r=t.event,n=t.eventOff,o=r||e.getAttribute("data-event"),i=n||e.getAttribute("data-event-off");e.removeEventListener(o,_.get(e,r)),i&&e.removeEventListener(i,this.hideTooltip)}}(Gt=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(Gt=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(Gt=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,r=this.state,n=r.event,o=r.eventOff,i=r.possibleCustomEvents,a=r.possibleCustomEventsOff,l=k(),u=S(e,"data-event"),s=S(e,"data-event-off");null!=n&&(u[n]=!0),null!=o&&(s[o]=!0),i.split(" ").forEach((function(e){return u[e]=!0})),a.split(" ").forEach((function(e){return s[e]=!0})),this.unbindBodyListener(l);var c=this.bodyModeListeners={};for(var f in null==n&&(c.mouseover=x.bind(this,this.showTooltip,{}),c.mousemove=x.bind(this,this.updateTooltip,{respectEffect:!0}),c.mouseout=x.bind(this,this.hideTooltip,{})),u)c[f]=x.bind(this,(function(e){var r=e.currentTarget.getAttribute("data-event-off")||o;b.call(t,r,e)}),{customEvent:!0});for(var d in s)c[d]=x.bind(this,this.hideTooltip,{customEvent:!0});for(var p in c)l.addEventListener(p,c[p])},e.prototype.unbindBodyListener=function(e){e=e||k();var t=this.bodyModeListeners;for(var r in t)e.removeEventListener(r,t[r])}}((Kt=Yt=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=v(this,h(t).call(this,e))).state={uuid:e.uuid||"t"+(0,l.Z)(),place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,customColors:{},offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:A(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},r.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),r.mount=!0,r.delayShowLoop=null,r.delayHideLoop=null,r.delayReshow=null,r.intervalUpdateContent=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,e),s(t,null,[{key:"propTypes",get:function(){return{uuid:a().string,children:a().any,place:a().string,type:a().string,effect:a().string,offset:a().object,multiline:a().bool,border:a().bool,textColor:a().string,backgroundColor:a().string,borderColor:a().string,arrowColor:a().string,insecure:a().bool,class:a().string,className:a().string,id:a().string,html:a().bool,delayHide:a().number,delayUpdate:a().number,delayShow:a().number,event:a().string,eventOff:a().string,isCapture:a().bool,globalEventOff:a().string,getContent:a().any,afterShow:a().func,afterHide:a().func,overridePosition:a().func,disable:a().bool,scrollHide:a().bool,resizeHide:a().bool,wrapper:a().string,bodyMode:a().bool,possibleCustomEvents:a().string,possibleCustomEventsOff:a().string,clickable:a().bool}}}]),s(t,[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t),this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var e=this.tooltipRef;if(e){for(var t,r=e.parentNode;r.parentNode;)r=r.parentNode;switch(r.constructor.name){case"Document":case"HTMLDocument":case void 0:t=r.head;break;default:t=r}if(!t.querySelector("style[data-react-tooltip]")){var n=document.createElement("style");n.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom::before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right::before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',n.setAttribute("data-react-tooltip","true"),t.appendChild(n)}}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,r=[];if(e){var n=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t='[data-tip][data-for="'.concat(n,'"]')}else t="[data-tip]:not([data-for])";return T(document.getElementsByTagName("*")).filter((function(e){return e.shadowRoot})).forEach((function(e){r=r.concat(T(e.shadowRoot.querySelectorAll(t)))})),r.concat(T(document.querySelectorAll(t)))}},{key:"bindListener",value:function(){var e=this,t=this.props,r=t.id,n=t.globalEventOff,o=t.isCapture,i=this.getTargetArray(r);i.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(i):i.forEach((function(t){var r=e.isCapture(t),n=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,r),t.addEventListener("focus",e.showTooltip,r),"float"===n&&t.addEventListener("mousemove",e.updateTooltip,r),t.addEventListener("mouseleave",e.hideTooltip,r),t.addEventListener("blur",e.hideTooltip,r))})),n&&(window.removeEventListener(n,this.hideTooltip),window.addEventListener(n,this.hideTooltip,o)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,r=t.id,n=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(r).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),n&&window.removeEventListener(n,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,r=t.getContent,n=t.children;return r&&(e=Array.isArray(r)?r[0]&&r[0](this.state.originTooltip):r(this.state.originTooltip)),M(this.state.originTooltip,n,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(this.tooltipRef){if(t&&!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget})))return;var r=this.props,n=r.multiline,o=r.getContent,i=e.currentTarget.getAttribute("data-tip"),a=e.currentTarget.getAttribute("data-multiline")||n||!1,l=e instanceof window.FocusEvent||t,u=!0;e.currentTarget.getAttribute("data-scroll-hide")?u="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(u=this.props.scrollHide),e&&e.currentTarget&&e.currentTarget.setAttribute&&e.currentTarget.setAttribute("aria-describedby",this.state.uuid);var s=e.currentTarget.getAttribute("data-place")||this.props.place||"top",c=l?"solid":this.getEffect(e.currentTarget),f=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},d=O(e,e.currentTarget,this.tooltipRef,s,s,c,f);d.position&&this.props.overridePosition&&(d.position=this.props.overridePosition(d.position,e,e.currentTarget,this.tooltipRef,s,s,c,f));var p=d.isNewState?d.newState.place:s;this.clearTimer();var h=e.currentTarget,m=this.state.show?h.getAttribute("data-delay-update")||this.props.delayUpdate:0,v=this,g=function(){v.setState({originTooltip:i,isMultiline:a,desiredPlace:s,place:p,type:h.getAttribute("data-type")||v.props.type||"dark",customColors:{text:h.getAttribute("data-text-color")||v.props.textColor||null,background:h.getAttribute("data-background-color")||v.props.backgroundColor||null,border:h.getAttribute("data-border-color")||v.props.borderColor||null,arrow:h.getAttribute("data-arrow-color")||v.props.arrowColor||null},effect:c,offset:f,html:(h.getAttribute("data-html")?"true"===h.getAttribute("data-html"):v.props.html)||!1,delayShow:h.getAttribute("data-delay-show")||v.props.delayShow||0,delayHide:h.getAttribute("data-delay-hide")||v.props.delayHide||0,delayUpdate:h.getAttribute("data-delay-update")||v.props.delayUpdate||0,border:(h.getAttribute("data-border")?"true"===h.getAttribute("data-border"):v.props.border)||!1,extraClass:h.getAttribute("data-class")||v.props.class||v.props.className||"",disable:(h.getAttribute("data-tip-disable")?"true"===h.getAttribute("data-tip-disable"):v.props.disable)||!1,currentTarget:h},(function(){u&&v.addScrollListener(v.state.currentTarget),v.updateTooltip(e),o&&Array.isArray(o)&&(v.intervalUpdateContent=setInterval((function(){if(v.mount){var e=v.props.getContent,t=M(i,"",e[0](),a),r=v.isEmptyTip(t);v.setState({isEmptyTip:r}),v.updatePosition()}}),o[1]))}))};m?this.delayReshow=setTimeout(g,m):g()}}},{key:"updateTooltip",value:function(e){var t=this,r=this.state,n=r.delayShow,o=r.disable,i=this.props.afterShow,a=this.getTooltipContent(),l=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(a)&&!o){var u=this.state.show?0:parseInt(n,10),s=function(){if(Array.isArray(a)&&a.length>0||a){var r=!t.state.show;t.setState({currentEvent:e,currentTarget:l,show:!0},(function(){t.updatePosition(),r&&i&&i(e)}))}};clearTimeout(this.delayShowLoop),u?this.delayShowLoop=setTimeout(s,u):s()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},o=this.state.disable,i=n.isScroll?0:this.state.delayHide,a=this.props.afterHide,l=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(l)&&!o){if(t&&(!this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget}))||!this.state.show))return;e&&e.currentTarget&&e.currentTarget.removeAttribute&&e.currentTarget.removeAttribute("aria-describedby");var u=function(){var t=r.state.show;r.mouseOnToolTip()?r.listenForTooltipExit():(r.removeListenerForTooltipExit(),r.setState({show:!1},(function(){r.removeScrollListener(r.state.currentTarget),t&&a&&a(e)})))};this.clearTimer(),i?this.delayHideLoop=setTimeout(u,parseInt(i,10)):u()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(e){var t=this.isCapture(e);window.removeEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"updatePosition",value:function(){var e=this,t=this.state,r=t.currentEvent,n=t.currentTarget,o=t.place,i=t.desiredPlace,a=t.effect,l=t.offset,u=this.tooltipRef,s=O(r,n,u,o,i,a,l);if(s.position&&this.props.overridePosition&&(s.position=this.props.overridePosition(s.position,r,n,u,o,i,a,l)),s.isNewState)return this.setState(s.newState,(function(){e.updatePosition()}));u.style.left=s.position.left+"px",u.style.top=s.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"hasCustomColors",value:function(){var e=this;return Boolean(Object.keys(this.state.customColors).find((function(t){return"border"!==t&&e.state.customColors[t]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var e=this,r=this.state,n=r.extraClass,i=r.html,a=r.ariaProps,l=r.disable,u=r.uuid,s=this.getTooltipContent(),c=this.isEmptyTip(s),d=R(this.state.uuid,this.state.customColors,this.state.type,this.state.border),p="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||l||c?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),h=this.props.wrapper;t.supportedWrappers.indexOf(h)<0&&(h=t.defaultProps.wrapper);var m=[p,n].filter(Boolean).join(" ");if(i){var v="".concat(s,'\n<style aria-hidden="true">').concat(d,"</style>");return o().createElement(h,f({className:"".concat(m),id:this.props.id||u,ref:function(t){return e.tooltipRef=t}},a,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:v}}))}return o().createElement(h,f({className:"".concat(m),id:this.props.id||u},a,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),o().createElement("style",{dangerouslySetInnerHTML:{__html:d},"aria-hidden":"true"}),s)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.ariaProps,n=A(e);return Object.keys(n).some((function(e){return n[e]!==r[e]}))?p({},t,{ariaProps:n}):null}}]),t}(o().Component),c(Yt,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),c(Yt,"supportedWrappers",["div","span"]),c(Yt,"displayName","ReactTooltip"),(Xt=Gt=Kt).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var r=new t((function(t){for(var r=0;r<t.length;r++)for(var n=t[r],o=0;o<n.removedNodes.length;o++)if(n.removedNodes[o]===e.state.currentTarget)return void e.hideTooltip()}));r.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=r}},Gt=void(Xt.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||Gt))||Gt)||Gt)||Gt)||Gt)||Gt)||Gt;const er=Jt},77469:(e,t,r)=>{"use strict";var n=r(87363),o=60103;if(60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,i={},s=null,c=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,n)&&!u.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:c,props:i,_owner:a.current}}t.jsx=s,t.jsxs=s},45298:(e,t,r)=>{"use strict";e.exports=r(77469)},44080:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),o=new Uint8Array(16);function i(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)}for(var a=[],l=0;l<256;++l)a[l]=(l+256).toString(16).substr(1);const u=function(e,t){var r=t||0,n=a;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")};const s=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;++a)t[n+a]=o[a];return t||u(o)}},87363:e=>{"use strict";e.exports=React},61533:e=>{"use strict";e.exports=ReactDOM},65311:e=>{"use strict";e.exports=jQuery},12902:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function o(e){return!!e&&!!e[$]}function i(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Q}(e)||Array.isArray(e)||!!e[K]||!!(null===(t=e.constructor)||void 0===t?void 0:t[K])||p(e)||h(e))}function a(e){return o(e)||n(23,e),e[$].t}function l(e,t,r){void 0===r&&(r=!1),0===u(e)?(r?Object.keys:Z)(e).forEach((function(n){r&&"symbol"==typeof n||t(n,e[n],e)})):e.forEach((function(r,n){return t(n,r,e)}))}function u(e){var t=e[$];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:p(e)?2:h(e)?3:0}function s(e,t){return 2===u(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===u(e)?e.get(t):e[t]}function f(e,t,r){var n=u(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e){return V&&e instanceof Map}function h(e){return q&&e instanceof Set}function m(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X(e);delete t[$];for(var r=Z(t),n=0;n<r.length;n++){var o=r[n],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function g(e,t){return void 0===t&&(t=!1),b(e)||o(e)||!i(e)||(u(e)>1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&l(e,(function(e,t){return g(t,!0)}),!0)),e}function y(){n(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function w(e){var t=J[e];return t||n(18,e),t}function _(e,t){J[e]||(J[e]=t)}function x(){return U}function S(e,t){t&&(w("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){O(e),e.p.forEach(C),e.p=null}function O(e){e===U&&(U=e.l)}function E(e){return U={p:[],l:U,h:e,m:!0,_:0}}function C(e){var t=e[$];0===t.i||1===t.i?t.j():t.g=!0}function j(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.O||w("ES5").S(t,e,o),o?(r[$].P&&(k(t),n(4)),i(e)&&(e=P(t,e),t.l||M(t,e)),t.u&&w("Patches").M(r[$].t,e,t.u,t.s)):e=P(t,r,[]),k(t),t.u&&t.v(t.u,t.s),e!==Y?e:void 0}function P(e,t,r){if(b(t))return t;var n=t[$];if(!n)return l(t,(function(o,i){return L(e,n,t,o,i,r)}),!0),t;if(n.A!==e)return t;if(!n.P)return M(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var o=4===n.i||5===n.i?n.o=v(n.k):n.o,i=o,a=!1;3===n.i&&(i=new Set(o),o.clear(),a=!0),l(i,(function(t,i){return L(e,n,o,t,i,r,a)})),M(e,o,!1),r&&e.u&&w("Patches").N(n,r,e.u,e.s)}return n.o}function L(e,t,r,n,a,l,u){if(o(a)){var c=P(e,a,l&&t&&3!==t.i&&!s(t.R,n)?l.concat(n):void 0);if(f(r,n,c),!o(c))return;e.m=!1}else u&&r.add(a);if(i(a)&&!b(a)){if(!e.h.D&&e._<1)return;P(e,a),t&&t.A.l||M(e,a)}}function M(e,t,r){void 0===r&&(r=!1),!e.l&&e.h.D&&e.m&&g(t,r)}function A(e,t){var r=e[$];return(r?m(r):e)[t]}function T(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function R(e){e.o||(e.o=v(e.t))}function N(e,t,r){var n=p(t)?w("MapSet").F(t,r):h(t)?w("MapSet").T(t,r):e.O?function(e,t){var r=Array.isArray(e),n={i:r?1:0,A:t?t.A:x(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=n,i=ee;r&&(o=[n],i=te);var a=Proxy.revocable(o,i),l=a.revoke,u=a.proxy;return n.k=u,n.j=l,u}(t,r):w("ES5").J(t,r);return(r?r.A:x()).p.push(n),n}function D(e){return o(e)||n(22,e),function e(t){if(!i(t))return t;var r,n=t[$],o=u(t);if(n){if(!n.P&&(n.i<4||!w("ES5").K(n)))return n.t;n.I=!0,r=z(t,o),n.I=!1}else r=z(t,o);return l(r,(function(t,o){n&&c(n.t,t)===o||f(r,t,e(o))})),3===o?new Set(r):r}(e)}function z(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}function F(){function e(e,t){var r=i[e];return r?r.enumerable=t:i[e]=r={configurable:!0,enumerable:t,get:function(){var t=this[$];return ee.get(t,e)},set:function(t){var r=this[$];ee.set(r,e,t)}},r}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][$];if(!o.P)switch(o.i){case 5:n(o)&&I(o);break;case 4:r(o)&&I(o)}}}function r(e){for(var t=e.t,r=e.k,n=Z(r),o=n.length-1;o>=0;o--){var i=n[o];if(i!==$){var a=t[i];if(void 0===a&&!s(t,i))return!0;var l=r[i],u=l&&l[$];if(u?u.t!==a:!d(l,a))return!0}}var c=!!t[$];return n.length!==Z(t).length+(c?0:1)}function n(e){var t=e.k;if(t.length!==e.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return!0;for(var n=0;n<t.length;n++)if(!t.hasOwnProperty(n))return!0;return!1}var i={};_("ES5",{J:function(t,r){var n=Array.isArray(t),o=function(t,r){if(t){for(var n=Array(r.length),o=0;o<r.length;o++)Object.defineProperty(n,""+o,e(o,!0));return n}var i=X(r);delete i[$];for(var a=Z(i),l=0;l<a.length;l++){var u=a[l];i[u]=e(u,t||!!i[u].enumerable)}return Object.create(Object.getPrototypeOf(r),i)}(n,t),i={i:n?5:4,A:r?r.A:x(),P:!1,I:!1,R:{},l:r,t,k:o,o:null,g:!1,C:!1};return Object.defineProperty(o,$,{value:i,writable:!0}),o},S:function(e,r,i){i?o(r)&&r[$].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var r=t[$];if(r){var o=r.t,i=r.k,a=r.R,u=r.i;if(4===u)l(i,(function(t){t!==$&&(void 0!==o[t]||s(o,t)?a[t]||e(i[t]):(a[t]=!0,I(r)))})),l(o,(function(e){void 0!==i[e]||s(i,e)||(a[e]=!1,I(r))}));else if(5===u){if(n(r)&&(I(r),a.length=!0),i.length<o.length)for(var c=i.length;c<o.length;c++)a[c]=!1;else for(var f=o.length;f<i.length;f++)a[f]=!0;for(var d=Math.min(i.length,o.length),p=0;p<d;p++)i.hasOwnProperty(p)||(a[p]=!0),void 0===a[p]&&e(i[p])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?r(e):n(e)}})}function B(){function e(t){if(!i(t))return t;if(Array.isArray(t))return t.map(e);if(p(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(h(t))return new Set(Array.from(t).map(e));var r=Object.create(Object.getPrototypeOf(t));for(var n in t)r[n]=e(t[n]);return s(t,K)&&(r[K]=t[K]),r}function t(t){return o(t)?e(t):t}var r="add";_("Patches",{$:function(t,o){return o.forEach((function(o){for(var i=o.path,a=o.op,l=t,s=0;s<i.length-1;s++){var f=u(l),d=i[s];"string"!=typeof d&&"number"!=typeof d&&(d=""+d),0!==f&&1!==f||"__proto__"!==d&&"constructor"!==d||n(24),"function"==typeof l&&"prototype"===d&&n(24),"object"!=typeof(l=c(l,d))&&n(15,i.join("/"))}var p=u(l),h=e(o.value),m=i[i.length-1];switch(a){case"replace":switch(p){case 2:return l.set(m,h);case 3:n(16);default:return l[m]=h}case r:switch(p){case 1:return"-"===m?l.push(h):l.splice(m,0,h);case 2:return l.set(m,h);case 3:return l.add(h);default:return l[m]=h}case"remove":switch(p){case 1:return l.splice(m,1);case 2:return l.delete(m);case 3:return l.delete(o.value);default:return delete l[m]}default:n(17,a)}})),t},N:function(e,n,o,i){switch(e.i){case 0:case 4:case 2:return function(e,n,o,i){var a=e.t,u=e.o;l(e.R,(function(e,l){var f=c(a,e),d=c(u,e),p=l?s(a,e)?"replace":r:"remove";if(f!==d||"replace"!==p){var h=n.concat(e);o.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:d}),i.push(p===r?{op:"remove",path:h}:"remove"===p?{op:r,path:h,value:t(f)}:{op:"replace",path:h,value:t(f)})}}))}(e,n,o,i);case 5:case 1:return function(e,n,o,i){var a=e.t,l=e.R,u=e.o;if(u.length<a.length){var s=[u,a];a=s[0],u=s[1];var c=[i,o];o=c[0],i=c[1]}for(var f=0;f<a.length;f++)if(l[f]&&u[f]!==a[f]){var d=n.concat([f]);o.push({op:"replace",path:d,value:t(u[f])}),i.push({op:"replace",path:d,value:t(a[f])})}for(var p=a.length;p<u.length;p++){var h=n.concat([p]);o.push({op:r,path:h,value:t(u[p])})}a.length<u.length&&i.push({op:"replace",path:n.concat(["length"]),value:a.length})}(e,n,o,i);case 3:return function(e,t,n,o){var i=e.t,a=e.o,l=0;i.forEach((function(e){if(!a.has(e)){var i=t.concat([l]);n.push({op:"remove",path:i,value:e}),o.unshift({op:r,path:i,value:e})}l++})),l=0,a.forEach((function(e){if(!i.has(e)){var a=t.concat([l]);n.push({op:r,path:a,value:e}),o.unshift({op:"remove",path:a,value:e})}l++}))}(e,n,o,i)}},M:function(e,t,r,n){r.push({op:"replace",path:[],value:t===Y?void 0:t}),n.push({op:"replace",path:[],value:e})}})}r.d(t,{Js:()=>a,QE:()=>ae,Vk:()=>D,ZP:()=>le,aS:()=>ie,mv:()=>o,o$:()=>i,pV:()=>F,vI:()=>B,vV:()=>g});var H,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),V="undefined"!=typeof Map,q="undefined"!=typeof Set,G="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Y=W?Symbol.for("immer-nothing"):((H={})["immer-nothing"]=!0,H),K=W?Symbol.for("immer-draftable"):"__$immer_draftable",$=W?Symbol.for("immer-state"):"__$immer_state",Q=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),Z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X=Object.getOwnPropertyDescriptors||function(e){var t={};return Z(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},J={},ee={get:function(e,t){if(t===$)return e;var r=m(e);if(!s(r,t))return function(e,t,r){var n,o=T(t,r);return o?"value"in o?o.value:null===(n=o.get)||void 0===n?void 0:n.call(e.k):void 0}(e,r,t);var n=r[t];return e.I||!i(n)?n:n===A(e.t,t)?(R(e),e.o[t]=N(e.A.h,n,e)):n},has:function(e,t){return t in m(e)},ownKeys:function(e){return Reflect.ownKeys(m(e))},set:function(e,t,r){var n=T(m(e),t);if(null==n?void 0:n.set)return n.set.call(e.k,r),!0;if(!e.P){var o=A(m(e),t),i=null==o?void 0:o[$];if(i&&i.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(d(r,o)&&(void 0!==r||s(e.t,t)))return!0;R(e),I(e)}return e.o[t]===r&&(void 0!==r||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==A(e.t,t)||t in e.t?(e.R[t]=!1,R(e),I(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=m(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty:function(){n(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){n(12)}},te={};l(ee,(function(e,t){te[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),te.deleteProperty=function(e,t){return te.set.call(this,e,t,void 0)},te.set=function(e,t,r){return ee.set.call(this,e[0],t,r,e[0])};var re=function(){function e(e){var t=this;this.O=G,this.D=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var a=r;r=e;var l=t;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return l.produce(e,(function(e){var n;return(n=r).call.apply(n,[t,e].concat(o))}))}}var u;if("function"!=typeof r&&n(6),void 0!==o&&"function"!=typeof o&&n(7),i(e)){var s=E(t),c=N(t,e,void 0),f=!0;try{u=r(c),f=!1}finally{f?k(s):O(s)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return S(s,o),j(e,s)}),(function(e){throw k(s),e})):(S(s,o),j(u,s))}if(!e||"object"!=typeof e){if(void 0===(u=r(e))&&(u=e),u===Y&&(u=void 0),t.D&&g(u,!0),o){var d=[],p=[];w("Patches").M(e,u,d,p),o(d,p)}return u}n(21,e)},this.produceWithPatches=function(e,r){if("function"==typeof e)return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return t.produceWithPatches(r,(function(t){return e.apply(void 0,[t].concat(o))}))};var n,o,i=t.produce(e,r,(function(e,t){n=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,n,o]})):[i,n,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||n(8),o(e)&&(e=D(e));var t=E(this),r=N(this,e,void 0);return r[$].C=!0,O(t),r},t.finishDraft=function(e,t){var r=(e&&e[$]).A;return S(r,t),j(void 0,r)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!G&&n(20),this.O=e},t.applyPatches=function(e,t){var r;for(r=t.length-1;r>=0;r--){var n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));var i=w("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),ne=new re,oe=ne.produce,ie=ne.produceWithPatches.bind(ne),ae=(ne.setAutoFreeze.bind(ne),ne.setUseProxies.bind(ne),ne.applyPatches.bind(ne));ne.createDraft.bind(ne),ne.finishDraft.bind(ne);const le=oe},15280:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ACTION_CLOSE:()=>D,ACTION_NEXT:()=>R,ACTION_PREV:()=>I,ACTION_SWIPE:()=>N,ACTIVE_SLIDE_COMPLETE:()=>P,ACTIVE_SLIDE_ERROR:()=>j,ACTIVE_SLIDE_LOADING:()=>E,ACTIVE_SLIDE_PLAYING:()=>C,CLASS_FLEX_CENTER:()=>M,CLASS_FULLSIZE:()=>L,CLASS_NO_SCROLL:()=>A,CLASS_NO_SCROLL_PADDING:()=>T,Carousel:()=>At,CarouselModule:()=>Tt,CloseIcon:()=>Ke,Controller:()=>Et,ControllerContext:()=>kt,ControllerModule:()=>Ct,ELEMENT_BUTTON:()=>$,ELEMENT_ICON:()=>Q,EVENT_ON_KEY_DOWN:()=>W,EVENT_ON_KEY_UP:()=>V,EVENT_ON_POINTER_CANCEL:()=>U,EVENT_ON_POINTER_DOWN:()=>z,EVENT_ON_POINTER_LEAVE:()=>H,EVENT_ON_POINTER_MOVE:()=>F,EVENT_ON_POINTER_UP:()=>B,EVENT_ON_WHEEL:()=>q,ErrorIcon:()=>Xe,EventsContext:()=>Pe,EventsProvider:()=>Me,IMAGE_FIT_CONTAIN:()=>Z,IMAGE_FIT_COVER:()=>X,IconButton:()=>Ve,ImageSlide:()=>pt,Lightbox:()=>Jt,LightboxDefaultProps:()=>te,LightboxDispatchContext:()=>De,LightboxPropsContext:()=>Ae,LightboxPropsProvider:()=>Ie,LightboxStateContext:()=>Re,LightboxStateProvider:()=>Be,LoadingIcon:()=>Ze,MODULE_CAROUSEL:()=>o,MODULE_CONTROLLER:()=>i,MODULE_NAVIGATION:()=>a,MODULE_NO_SCROLL:()=>l,MODULE_PORTAL:()=>u,MODULE_ROOT:()=>s,MODULE_TOOLBAR:()=>c,Navigation:()=>Rt,NavigationButton:()=>It,NavigationModule:()=>Nt,NextIcon:()=>Qe,NoScroll:()=>Ht,NoScrollModule:()=>Ut,PLUGIN_CAPTIONS:()=>f,PLUGIN_COUNTER:()=>d,PLUGIN_DOWNLOAD:()=>p,PLUGIN_FULLSCREEN:()=>h,PLUGIN_INLINE:()=>m,PLUGIN_SHARE:()=>v,PLUGIN_SLIDESHOW:()=>g,PLUGIN_THUMBNAILS:()=>y,PLUGIN_ZOOM:()=>b,Portal:()=>qt,PortalModule:()=>Gt,PreviousIcon:()=>$e,Root:()=>Yt,RootModule:()=>Kt,SLIDE_STATUS_COMPLETE:()=>S,SLIDE_STATUS_ERROR:()=>x,SLIDE_STATUS_LOADING:()=>w,SLIDE_STATUS_PLACEHOLDER:()=>k,SLIDE_STATUS_PLAYING:()=>_,SwipeState:()=>ht,TimeoutsContext:()=>He,TimeoutsProvider:()=>We,Toolbar:()=>$t,ToolbarModule:()=>Qt,UNKNOWN_ACTION_TYPE:()=>J,VK_ARROW_LEFT:()=>Y,VK_ARROW_RIGHT:()=>K,VK_ESCAPE:()=>G,activeSlideStatus:()=>O,addToolbarButton:()=>Ce,cleanup:()=>he,clsx:()=>le,composePrefix:()=>fe,computeSlideRect:()=>_e,createIcon:()=>Ge,createIconDisabled:()=>Ye,createModule:()=>re,createNode:()=>ne,cssClass:()=>se,cssVar:()=>ce,default:()=>Jt,devicePixelRatio:()=>xe,getSlide:()=>Oe,getSlideIfPresent:()=>Ee,getSlideIndex:()=>Se,hasSlides:()=>ke,hasWindow:()=>ve,isImageFitCover:()=>be,isImageSlide:()=>ye,label:()=>pe,makeComposePrefix:()=>de,makeUseContext:()=>me,parseLengthPercentage:()=>we,round:()=>ge,setRef:()=>it,stopNavigationEventsPropagation:()=>je,useAnimation:()=>tt,useContainerRect:()=>rt,useController:()=>Ot,useDelay:()=>nt,useEventCallback:()=>ot,useEvents:()=>Le,useForkRef:()=>at,useLayoutEffect:()=>Je,useLightboxDispatch:()=>ze,useLightboxProps:()=>Te,useLightboxState:()=>Ne,useLoseFocus:()=>lt,useMotionPreference:()=>et,usePointerEvents:()=>vt,usePointerSwipe:()=>yt,usePreventSwipeNavigation:()=>_t,useRTL:()=>ut,useSensors:()=>st,useThrottle:()=>ct,useTimeouts:()=>Ue,useWheelSwipe:()=>xt,withPlugins:()=>ae});var n=r(87363);const o="carousel",i="controller",a="navigation",l="no-scroll",u="portal",s="root",c="toolbar",f="captions",d="counter",p="download",h="fullscreen",m="inline",v="share",g="slideshow",y="thumbnails",b="zoom",w="loading",_="playing",x="error",S="complete",k="placeholder",O=e=>`active-slide-${e}`,E=O(w),C=O(_),j=O(x),P=O(S),L="fullsize",M="flex_center",A="no_scroll",T="no_scroll_padding",I="prev",R="next",N="swipe",D="close",z="onPointerDown",F="onPointerMove",B="onPointerUp",H="onPointerLeave",U="onPointerCancel",W="onKeyDown",V="onKeyUp",q="onWheel",G="Escape",Y="ArrowLeft",K="ArrowRight",$="button",Q="icon",Z="contain",X="cover",J="Unknown action type";var ee=r(61533);const te={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[D]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Z,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullDown:!1,closeOnBackdropClick:!1},portal:{},on:{},styles:{},className:""};function re(e,t){return{name:e,component:t}}function ne(e,t){return{module:e,children:t}}function oe(e,t,r){return e.module.name===t?r(e):e.children?[ne(e.module,e.children.flatMap((e=>{var n;return null!==(n=oe(e,t,r))&&void 0!==n?n:[]})))]:[e]}function ie(e,t,r){return e.flatMap((e=>{var n;return null!==(n=oe(e,t,r))&&void 0!==n?n:[]}))}function ae(e,t=[],r=[]){let n=e;const o=e=>{const t=[...n];for(;t.length>0;){const r=t.pop();if((null==r?void 0:r.module.name)===e)return!0;(null==r?void 0:r.children)&&t.push(...r.children)}return!1},a=(e,t)=>{n=""!==e?ie(n,e,(e=>[ne(t,[e])])):[ne(t,n)]},l=(e,t)=>{n=ie(n,e,(e=>[ne(e.module,[ne(t,e.children)])]))},u=(e,t,r)=>{n=ie(n,e,(e=>{var n;return[ne(e.module,[...r?[ne(t)]:[],...null!==(n=e.children)&&void 0!==n?n:[],...r?[]:[ne(t)]])]}))},s=(e,t,r)=>{n=ie(n,e,(e=>[...r?[ne(t)]:[],e,...r?[]:[ne(t)]]))},c=e=>{l(i,e)},f=(e,t)=>{n=ie(n,e,(e=>[ne(t,e.children)]))},d=e=>{n=ie(n,e,(e=>e.children))},p=e=>{r.push(e)};return t.forEach((e=>{e({contains:o,addParent:a,append:l,addChild:u,addSibling:s,addModule:c,replace:f,remove:d,augment:p})})),{config:n,augmentation:e=>r.reduce(((e,t)=>t(e)),e)}}const le=(...e)=>[...e].filter((e=>Boolean(e))).join(" "),ue="yarl__",se=e=>`${ue}${e}`,ce=e=>`--${ue}${e}`,fe=(e,t)=>`${e}${t?`_${t}`:""}`,de=e=>t=>fe(e,t),pe=(e,t)=>e&&e[t]?e[t]:t,he=(...e)=>()=>{e.forEach((e=>{e()}))},me=(e,t,r)=>()=>{const o=n.useContext(r);if(!o)throw new Error(`${e} must be used within a ${t}.Provider`);return o},ve=()=>"undefined"!=typeof window;function ge(e,t=0){const r=10**t;return Math.round((e+Number.EPSILON)*r)/r}const ye=e=>void 0===e.type||"image"===e.type,be=(e,t)=>e.imageFit===X||e.imageFit!==Z&&t===X;function we(e){if("number"==typeof e)return{pixel:e};if("string"==typeof e){const t=parseInt(e,10);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function _e(e,t){const r=we(t),n=void 0!==r.percent?e.width/100*r.percent:r.pixel;return{width:Math.max(e.width-2*n,0),height:Math.max(e.height-2*n,0)}}const xe=()=>(ve()?null===window||void 0===window?void 0:window.devicePixelRatio:void 0)||1,Se=(e,t)=>t>0?(e%t+t)%t:0,ke=e=>e.length>0,Oe=(e,t)=>e[Se(t,e.length)],Ee=(e,t)=>ke(e)?Oe(e,t):void 0;function Ce(e,t,r){if(!r)return e;const{buttons:o,...i}=e,a=o.findIndex((e=>e===t)),l=n.isValidElement(r)?n.cloneElement(r,{key:t},null):r;if(a>=0){const e=[...o];return e.splice(a,1,l),{buttons:e,...i}}return{buttons:[l,...o],...i}}function je(){const e=e=>{e.stopPropagation()};return{onPointerDown:e,onKeyDown:e,onWheel:e}}const Pe=n.createContext(null),Le=me("useEvents","EventsContext",Pe);function Me({children:e}){const[t]=n.useState({});n.useEffect((()=>()=>{Object.keys(t).forEach((e=>delete t[e]))}),[t]);const r=n.useMemo((()=>{const e=(e,r)=>{var n;null===(n=t[e])||void 0===n||n.splice(0,t[e].length,...t[e].filter((e=>e!==r)))};return{publish:(...[e,r])=>{var n;null===(n=t[e])||void 0===n||n.forEach((e=>e(r)))},subscribe:(r,n)=>(t[r]||(t[r]=[]),t[r].push(n),()=>e(r,n)),unsubscribe:e}}),[t]);return n.createElement(Pe.Provider,{value:r},e)}const Ae=n.createContext(null),Te=me("useLightboxProps","LightboxPropsContext",Ae);function Ie({children:e,...t}){return n.createElement(Ae.Provider,{value:t},e)}const Re=n.createContext(null),Ne=me("useLightboxState","LightboxStateContext",Re),De=n.createContext(null),ze=me("useLightboxDispatch","LightboxDispatchContext",De);function Fe(e,t){switch(t.type){case"swipe":{const{slides:r}=e,n=(null==t?void 0:t.increment)||0,o=e.globalIndex+n,i=Se(o,r.length);return{slides:r,currentIndex:i,globalIndex:o,currentSlide:Ee(r,i),animation:n||t.duration?{increment:n,duration:t.duration,easing:t.easing}:void 0}}case"update":return{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:Ee(t.slides,t.index)};default:throw new Error(J)}}function Be({slides:e,index:t,children:r}){const[o,i]=n.useReducer(Fe,{slides:e,currentIndex:t,globalIndex:t,currentSlide:Ee(e,t)});n.useEffect((()=>{i({type:"update",slides:e,index:t})}),[e,t]);const a=n.useMemo((()=>({...o,state:o,dispatch:i})),[o,i]);return n.createElement(De.Provider,{value:i},n.createElement(Re.Provider,{value:a},r))}const He=n.createContext(null),Ue=me("useTimeouts","TimeoutsContext",He);function We({children:e}){const[t]=n.useState([]);n.useEffect((()=>()=>{t.forEach((e=>window.clearTimeout(e))),t.splice(0,t.length)}),[t]);const r=n.useMemo((()=>{const e=e=>{t.splice(0,t.length,...t.filter((t=>t!==e)))};return{setTimeout:(r,n)=>{const o=window.setTimeout((()=>{e(o),r()}),n);return t.push(o),o},clearTimeout:t=>{void 0!==t&&(e(t),window.clearTimeout(t))}}}),[t]);return n.createElement(He.Provider,{value:r},e)}const Ve=n.forwardRef((function({label:e,className:t,icon:r,renderIcon:o,onClick:i,style:a,...l},u){const{styles:s,labels:c}=Te();return n.createElement("button",{ref:u,type:"button","aria-label":pe(c,e),className:le(se($),t),onClick:i,style:{...a,...s.button},...l},o?o():n.createElement(r,{className:se(Q),style:s.icon}))}));function qe(e,t){const r=e=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...e},t);return r.displayName=e,r}function Ge(e,t){return qe(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}function Ye(e,t){return qe(e,n.createElement(n.Fragment,null,n.createElement("defs",null,n.createElement("mask",{id:"strike"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"white"}),n.createElement("path",{d:"M0 0L24 24",stroke:"black",strokeWidth:4}))),n.createElement("path",{d:"M0.70707 2.121320L21.878680 23.292883",stroke:"currentColor",strokeWidth:2}),n.createElement("g",{fill:"currentColor",mask:"url(#strike)"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t)))}const Ke=Ge("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),$e=Ge("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Qe=Ge("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Ze=Ge("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map(((e,t,r)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(t+1),transform:`rotate(${360/r.length*t}, 12, 12)`}))))),Xe=Ge("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Je=ve()?n.useLayoutEffect:n.useEffect;function et(){const[e,t]=n.useState(!1);return n.useEffect((()=>{var e,r;const n=null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-reduced-motion: reduce)");t(null==n?void 0:n.matches);const o=e=>t(e.matches);return null===(r=null==n?void 0:n.addEventListener)||void 0===r||r.call(n,"change",o),()=>{var e;return null===(e=null==n?void 0:n.removeEventListener)||void 0===e?void 0:e.call(n,"change",o)}}),[]),e}function tt(e,t){const r=n.useRef(),o=n.useRef(),i=et();return Je((()=>{var n,a,l;if(e.current&&void 0!==r.current&&!i){const{keyframes:i,duration:u,easing:s,onfinish:c}=t(r.current,e.current.getBoundingClientRect(),function(e){let t=0,r=0,n=0;const o=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(o){const e=o[1].split(",").map((e=>Number.parseInt(e,10)));6===e.length?(t=e[4],r=e[5]):16===e.length&&(t=e[12],r=e[13],n=e[14])}return{x:t,y:r,z:n}}(e.current))||{};if(i&&u){null===(n=o.current)||void 0===n||n.cancel(),o.current=void 0;try{o.current=null===(l=(a=e.current).animate)||void 0===l?void 0:l.call(a,i,{duration:u,easing:s})}catch(e){console.error(e)}o.current&&(o.current.onfinish=()=>{o.current=void 0,null==c||c()})}}r.current=void 0})),{prepareAnimation:e=>{r.current=e},isAnimationPlaying:()=>{var e;return"running"===(null===(e=o.current)||void 0===e?void 0:e.playState)}}}function rt(){const[e,t]=n.useState(),r=n.useRef(null),o=n.useRef(),i=n.useCallback((e=>{r.current=e,o.current&&(o.current.disconnect(),o.current=void 0);const n=()=>{if(e){const r=window.getComputedStyle(e),n=e=>parseFloat(e)||0;t({width:Math.round(e.clientWidth-n(r.paddingLeft)-n(r.paddingRight)),height:Math.round(e.clientHeight-n(r.paddingTop)-n(r.paddingBottom))})}else t(void 0)};n(),e&&"undefined"!=typeof ResizeObserver&&(o.current=new ResizeObserver(n),o.current.observe(e))}),[]);return n.useMemo((()=>({setContainerRef:i,containerRef:r,containerRect:e})),[i,r,e])}function nt(){const e=n.useRef(),{setTimeout:t,clearTimeout:r}=Ue();return n.useCallback(((n,o)=>{r(e.current),e.current=t(n,o>0?o:0)}),[t,r])}function ot(e){const t=n.useRef(e);return Je((()=>{t.current=e})),n.useCallback(((...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}function it(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function at(e,t){return n.useMemo((()=>null==e&&null==t?null:r=>{it(e,r),it(t,r)}),[e,t])}function lt(e,t=!1){const r=n.useRef(t);Je((()=>{t&&e()}),[t,e]);return{onFocus:n.useCallback((()=>{r.current=!0}),[]),onBlur:n.useCallback((()=>{r.current=!1}),[])}}function ut(){const[e,t]=n.useState(!1);return Je((()=>{t("rtl"===window.getComputedStyle(window.document.documentElement).direction)}),[]),e}function st(){const[e]=n.useState({});return n.useMemo((()=>{const t=(t,r)=>{var n;null===(n=e[t])||void 0===n||n.forEach((e=>{r.isPropagationStopped()||e(r)}))};return{registerSensors:{onPointerDown:e=>t(z,e),onPointerMove:e=>t(F,e),onPointerUp:e=>t(B,e),onPointerLeave:e=>t(H,e),onPointerCancel:e=>t(U,e),onKeyDown:e=>t(W,e),onKeyUp:e=>t(V,e),onWheel:e=>t(q,e)},subscribeSensors:(t,r)=>(e[t]||(e[t]=[]),e[t].unshift(r),()=>{const n=e[t];n&&n.splice(0,n.length,...n.filter((e=>e!==r)))})}}),[e])}function ct(e,t){const r=n.useRef(0),o=nt(),i=ot(((...t)=>{r.current=Date.now(),e(t)}));return n.useCallback(((...e)=>{o((()=>{i(e)}),t-(Date.now()-r.current))}),[t,i,o])}const ft=de("slide"),dt=de("slide_image");function pt({slide:e,offset:t,render:r,rect:o,imageFit:i,imageProps:a,onClick:l,onLoad:u,style:s}){var c,f,d,p,h,m,v;const[g,y]=n.useState(w),{publish:b}=Le(),{setTimeout:_}=Ue(),E=n.useRef(null);n.useEffect((()=>{0===t&&b(O(g))}),[t,g,b]);const C=ot((e=>{("decode"in e?e.decode():Promise.resolve()).catch((()=>{})).then((()=>{e.parentNode&&(y(S),_((()=>{null==u||u(e)}),0))}))})),j=n.useCallback((e=>{E.current=e,(null==e?void 0:e.complete)&&C(e)}),[C]),P=n.useCallback((e=>{C(e.currentTarget)}),[C]),L=n.useCallback((()=>{y(x)}),[]),M=be(e,i),A=(e,t)=>Number.isFinite(e)?e:t,T=A(Math.max(...(null!==(f=null===(c=e.srcSet)||void 0===c?void 0:c.map((e=>e.width)))&&void 0!==f?f:[]).concat(e.width?[e.width]:[])),(null===(d=E.current)||void 0===d?void 0:d.naturalWidth)||0),I=A(Math.max(...(null!==(h=null===(p=e.srcSet)||void 0===p?void 0:p.map((e=>e.height)))&&void 0!==h?h:[]).concat(e.height?[e.height]:[])),(null===(m=E.current)||void 0===m?void 0:m.naturalHeight)||0),R=T&&I?{maxWidth:`min(${T}px, 100%)`,maxHeight:`min(${I}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},N=null===(v=e.srcSet)||void 0===v?void 0:v.sort(((e,t)=>e.width-t.width)).map((e=>`${e.src} ${e.width}w`)).join(", "),D=N&&o&&ve()?`${Math.round(Math.min(o&&!M&&e.width&&e.height?o.height/e.height*e.width:Number.MAX_VALUE,o.width))}px`:void 0,{style:z,className:F,...B}=a||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:j,onLoad:P,onError:L,onClick:l,draggable:!1,className:le(se(dt()),M&&se(dt("cover")),g!==S&&se(dt("loading")),F),style:{...R,...s,...z},...B,alt:e.alt,sizes:D,srcSet:N,src:e.src}),g!==S&&n.createElement("div",{className:se(ft(k))},g===w&&((null==r?void 0:r.iconLoading)?r.iconLoading():n.createElement(Ze,{className:le(se(Q),se(ft(w)))})),g===x&&((null==r?void 0:r.iconError)?r.iconError():n.createElement(Xe,{className:le(se(Q),se(ft(x)))}))))}var ht,mt;function vt(e,t,r,o,i){n.useEffect((()=>i?()=>{}:he(e(z,t),e(F,r),e(B,o),e(H,o),e(U,o))),[e,t,r,o,i])}!function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL_DOWN=2]="PULL_DOWN",e[e.ANIMATION=3]="ANIMATION"}(ht||(ht={})),function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL_DOWN=2]="PULL_DOWN"}(mt||(mt={}));const gt=30;function yt(e,t,r,o,i,a,l,u,s,c,f,d,p){const h=n.useRef(0),m=n.useRef([]),v=n.useRef(),g=n.useRef(0),y=n.useRef(mt.NONE),b=n.useCallback((e=>{v.current===e.pointerId&&(v.current=void 0,y.current=mt.NONE);const t=m.current;t.splice(0,t.length,...t.filter((t=>t.pointerId!==e.pointerId)))}),[]),w=n.useCallback((e=>{b(e),e.persist(),m.current.push(e)}),[b]),_=ot((e=>{w(e)})),x=ot((e=>{if(m.current.find((t=>t.pointerId===e.pointerId))&&v.current===e.pointerId){const e=Date.now()-g.current,t=h.current;y.current===mt.SWIPE?Math.abs(t)>.3*r||Math.abs(t)>5&&e<o?l(t,e):u(t):y.current===mt.PULL_DOWN&&(t>2*gt?d(t,e):p(t)),h.current=0,y.current=mt.NONE}b(e)}));vt(e,_,ot((e=>{const r=m.current.find((t=>t.pointerId===e.pointerId));if(r){const n=v.current===e.pointerId;if(0===e.buttons)return void(n&&0!==h.current?x(e):b(r));const o=e.clientX-r.clientX,l=e.clientY-r.clientY;if(void 0===v.current){const r=t=>{w(e),v.current=e.pointerId,g.current=Date.now(),y.current=t};Math.abs(o)>Math.abs(l)&&Math.abs(o)>gt&&t(o)?(r(mt.SWIPE),i()):s&&Math.abs(l)>Math.abs(o)&&l>gt&&(r(mt.PULL_DOWN),c())}else n&&(y.current===mt.SWIPE?(h.current=o,a(o)):y.current===mt.PULL_DOWN&&(h.current=l,f(l)))}})),x)}const bt="wheel";function wt(e){(Math.abs(e.deltaX)>Math.abs(e.deltaY)||e.ctrlKey)&&e.preventDefault()}function _t(){const e=n.useRef(null);return n.useCallback((t=>{var r;t?t.addEventListener(bt,wt,{passive:!1}):null===(r=e.current)||void 0===r||r.removeEventListener(bt,wt),e.current=t}),[])}function xt(e,t,r,o,i,a,l,u,s){const c=n.useRef(0),f=n.useRef(0),d=n.useRef(),p=n.useRef(),h=n.useRef(0),m=n.useRef(0),{setTimeout:v,clearTimeout:g}=Ue(),y=n.useCallback((()=>{d.current&&(g(d.current),d.current=void 0)}),[g]),b=n.useCallback((()=>{p.current&&(g(p.current),p.current=void 0)}),[g]),w=ot((()=>{e!==ht.SWIPE&&(c.current=0,m.current=0,y(),b())}));n.useEffect(w,[e,w]);const _=ot((e=>{p.current=void 0,c.current===e&&s(c.current)})),x=ot((t=>{if(!(t.ctrlKey||Math.abs(t.deltaY)>Math.abs(t.deltaX)))if(e===ht.NONE){if(Math.abs(t.deltaX)<=1.2*Math.abs(h.current))return void(h.current=t.deltaX);if(!r(-t.deltaX))return;if(f.current+=t.deltaX,y(),Math.abs(f.current)>30)f.current=0,h.current=0,m.current=Date.now(),a();else{const e=f.current;d.current=v((()=>{d.current=void 0,e===f.current&&(f.current=0)}),i)}}else if(e===ht.SWIPE){let e=c.current-t.deltaX;if(e=Math.min(Math.abs(e),o)*Math.sign(e),c.current=e,l(e),b(),Math.abs(e)>.2*o)return h.current=t.deltaX,void u(e,Date.now()-m.current);p.current=v((()=>_(e)),2*i)}else h.current=t.deltaX}));n.useEffect((()=>t(q,x)),[t,x])}const St=de("container"),kt=n.createContext(null),Ot=me("useController","ControllerContext",kt);function Et({children:e,...t}){var r;const{carousel:o,animation:i,controller:a,on:l,styles:u,render:s}=t,[c,f]=n.useState(),d=Ne(),p=ze(),[h,m]=n.useState(ht.NONE),v=n.useRef(0),g=n.useRef(0),y=n.useRef(1),{registerSensors:b,subscribeSensors:w}=st(),{subscribe:_,publish:x}=Le(),S=nt(),k=nt(),O=nt(),{containerRef:E,setContainerRef:C,containerRect:j}=rt(),P=at(_t(),C),L=n.useRef(null),A=at(L,void 0),T=ut(),z=e=>(T?-1:1)*("number"==typeof e?e:1),F=ot((()=>{var e;return null===(e=E.current)||void 0===e?void 0:e.focus()})),B=ot((()=>t)),H=ot((()=>d)),U=n.useCallback((e=>x(I,e)),[x]),W=n.useCallback((e=>x(R,e)),[x]),q=n.useCallback((()=>x(D)),[x]),Y=e=>!(o.finite&&(z(e)>0&&0===d.currentIndex||z(e)<0&&d.currentIndex===d.slides.length-1)),K=e=>{var t;v.current=e,null===(t=E.current)||void 0===t||t.style.setProperty(ce("swipe_offset"),`${Math.round(e)}px`)},$=a.closeOnPullDown,Q=e=>{var t,r;g.current=e,y.current=Math.min(Math.max(ge(1-e/60*.5,2),.5),1),null===(t=E.current)||void 0===t||t.style.setProperty(ce("pull_down_offset"),`${Math.round(e)}px`),null===(r=E.current)||void 0===r||r.style.setProperty(ce("pull_down_opacity"),`${y.current}`)},{prepareAnimation:Z}=tt(L,((e,t,r)=>{if(L.current&&j)return{keyframes:[{transform:`translate(0, ${e.rect.y-t.y+r.y}px)`,opacity:e.opacity},{transform:"translate(0, 0)",opacity:1}],duration:e.duration,easing:i.easing.fade}})),X=(e,t)=>{if($){Q(e);let r=0;L.current&&(r=i.fade*(t?2:1),Z({rect:L.current.getBoundingClientRect(),opacity:y.current,duration:r})),O((()=>{Q(0),m(ht.NONE)}),r),m(ht.ANIMATION),t||q()}},{prepareAnimation:J,isAnimationPlaying:ee}=tt(L,((e,t,r)=>{var n;if(L.current&&j&&(null===(n=d.animation)||void 0===n?void 0:n.duration)){const n=we(o.spacing),i=(n.percent?n.percent*j.width/100:n.pixel)||0;return{keyframes:[{transform:`translate(${z(d.globalIndex-e.index)*(j.width+i)+e.rect.x-t.x+r.x}px, 0)`},{transform:"translate(0, 0)"}],duration:d.animation.duration,easing:d.animation.easing}}})),te=ot((e=>{var t,r;const n=e.offset||0,o=n?i.swipe:null!==(t=i.navigation)&&void 0!==t?t:i.swipe,a=n||ee()?i.easing.swipe:i.easing.navigation;let{direction:l}=e;const u=null!==(r=e.count)&&void 0!==r?r:1;let s=ht.ANIMATION,c=o*u;if(!l){const t=null==j?void 0:j.width,r=e.duration||0,i=t?o/t*Math.abs(n):o;0!==u?(r<i?c=c/i*Math.max(r,i/5):t&&(c=o/t*(t-Math.abs(n))),l=z(n)>0?I:R):c=o/2}let f=0;l===I?Y(z(1))?f=-u:(s=ht.NONE,c=o):l===R&&(Y(z(-1))?f=u:(s=ht.NONE,c=o)),c=Math.round(c),k((()=>{K(0),m(ht.NONE)}),c),L.current&&J({rect:L.current.getBoundingClientRect(),index:d.globalIndex}),m(s),x(N,{type:"swipe",increment:f,duration:c,easing:a})}));n.useEffect((()=>{var e,t;(null===(e=d.animation)||void 0===e?void 0:e.increment)&&(null===(t=d.animation)||void 0===t?void 0:t.duration)&&S((()=>p({type:"swipe",increment:0})),d.animation.duration)}),[d.animation,p,S]);const re=[w,Y,(null==j?void 0:j.width)||0,i.swipe,()=>m(ht.SWIPE),e=>K(e),(e,t)=>te({offset:e,duration:t,count:1}),e=>te({offset:e,count:0})],ne=[()=>{$&&m(ht.PULL_DOWN)},e=>Q(e),e=>X(e),e=>X(e,!0)];yt(...re,$,...ne),xt(h,...re);const oe=ot((()=>{var e;a.focus&&(null===(e=E.current)||void 0===e||e.focus())}));n.useEffect(oe,[oe]);const ie=ot((()=>{var e;null===(e=l.view)||void 0===e||e.call(l,{index:d.currentIndex})}));n.useEffect(ie,[d.globalIndex,ie]),n.useEffect((()=>he(_(I,(e=>te({direction:I,...e}))),_(R,(e=>te({direction:R,...e}))),_(N,(e=>p(e))))),[_,te,p]),n.useEffect((()=>w(V,(e=>{e.key===G&&q()}))),[w,q]);const ae=n.useMemo((()=>({prev:U,next:W,close:q,focus:F,slideRect:j?_e(j,o.padding):{width:0,height:0},containerRect:j||{width:0,height:0},subscribeSensors:w,containerRef:E,setCarouselRef:A,toolbarWidth:c,setToolbarWidth:f})),[U,W,q,F,w,j,E,A,c,f,o.padding]);return n.useImperativeHandle(a.ref,(()=>({prev:U,next:W,close:q,focus:F,getLightboxProps:B,getLightboxState:H})),[U,W,q,F,B,H]),n.createElement("div",{ref:P,className:le(se(St()),se(M)),style:{...h===ht.SWIPE?{[ce("swipe_offset")]:`${Math.round(v.current)}px`}:null,...h===ht.PULL_DOWN?{[ce("pull_down_offset")]:`${Math.round(g.current)}px`,[ce("pull_down_opacity")]:`${y.current}`}:null,..."none"!==a.touchAction?{[ce("controller_touch_action")]:a.touchAction}:null,...u.container},...a.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...b},j&&n.createElement(kt.Provider,{value:ae},e,null===(r=s.controls)||void 0===r?void 0:r.call(s)))}const Ct=re(i,Et);function jt(e){return fe(o,e)}function Pt(e){return fe("slide",e)}function Lt({slide:e,offset:t}){const r=n.useRef(null),{currentIndex:o}=Ne(),{slideRect:i,close:a}=Ot(),{render:l,carousel:{imageFit:u,imageProps:s},on:{click:c},controller:{closeOnBackdropClick:f},styles:{slide:d}}=Te();return n.createElement("div",{ref:r,className:le(se(Pt()),0===t&&se(Pt("current")),se(M)),onClick:e=>{const t=r.current,n=e.target instanceof HTMLElement?e.target:void 0;f&&n&&t&&(n===t||Array.from(t.children).find((e=>e===n))&&n.classList.contains(se(L)))&&a()},style:d},(()=>{var r,a,f,d;let p=null===(r=l.slide)||void 0===r?void 0:r.call(l,{slide:e,offset:t,rect:i});return!p&&ye(e)&&(p=n.createElement(pt,{slide:e,offset:t,render:l,rect:i,imageFit:u,imageProps:s,onClick:0===t?()=>null==c?void 0:c({index:o}):void 0})),p?n.createElement(n.Fragment,null,null===(a=l.slideHeader)||void 0===a?void 0:a.call(l,{slide:e}),(null!==(f=l.slideContainer)&&void 0!==f?f:({children:e})=>e)({slide:e,children:p}),null===(d=l.slideFooter)||void 0===d?void 0:d.call(l,{slide:e})):null})())}function Mt(){const e=Te().styles.slide;return n.createElement("div",{className:se("slide"),style:e})}function At({carousel:{finite:e,preload:t,padding:r,spacing:o}}){const{slides:i,currentIndex:a,globalIndex:l}=Ne(),{setCarouselRef:u}=Ot(),s=we(o),c=we(r),f=[];if((null==i?void 0:i.length)>0){for(let r=a-t;r<a;r+=1){const o=l+r-a;f.push(!e||r>=0?n.createElement(Lt,{key:o,slide:i[(r+t*i.length)%i.length],offset:r-a}):n.createElement(Mt,{key:o}))}f.push(n.createElement(Lt,{key:l,slide:i[a],offset:0}));for(let r=a+1;r<=a+t;r+=1){const t=l+r-a;f.push(!e||r<=i.length-1?n.createElement(Lt,{key:t,slide:i[r%i.length],offset:r-a}):n.createElement(Mt,{key:t}))}}return n.createElement("div",{ref:u,className:le(se(jt()),f.length>0&&se(jt("with_slides"))),style:{[`${ce(jt("slides_count"))}`]:f.length,[`${ce(jt("spacing_px"))}`]:s.pixel||0,[`${ce(jt("spacing_percent"))}`]:s.percent||0,[`${ce(jt("padding_px"))}`]:c.pixel||0,[`${ce(jt("padding_percent"))}`]:c.percent||0}},f)}const Tt=re(o,At);function It({label:e,icon:t,renderIcon:r,action:o,onClick:i,disabled:a}){return n.createElement(Ve,{label:e,icon:t,renderIcon:r,className:se(`navigation_${o}`),disabled:a,onClick:i,...lt(Ot().focus,a)})}function Rt({carousel:{finite:e},animation:t,render:{buttonPrev:r,buttonNext:o,iconPrev:i,iconNext:a}}){var l;const{slides:u,currentIndex:s}=Ne(),{prev:c,next:f,subscribeSensors:d}=Ot(),p=ut(),h=0===u.length||e&&0===s,m=0===u.length||e&&s===u.length-1,v=(null!==(l=t.navigation)&&void 0!==l?l:t.swipe)/2,g=ct(c,v),y=ct(f,v),b=ot((e=>{e.key!==Y||(p?m:h)||(p?y:g)(),e.key!==K||(p?h:m)||(p?g:y)()}));return n.useEffect((()=>d(W,b)),[d,b]),n.createElement(n.Fragment,null,r?r():n.createElement(It,{label:"Previous",action:I,icon:$e,renderIcon:i,disabled:h,onClick:c}),o?o():n.createElement(It,{label:"Next",action:R,icon:Qe,renderIcon:a,disabled:m,onClick:f}))}const Nt=re(a,Rt),Dt=se(A),zt=se(T);function Ft(e){return"style"in e}function Bt(e,t,r){const n=window.getComputedStyle(e),o=r?"padding-left":"padding-right",i=r?n.paddingLeft:n.paddingRight,a=e.style.getPropertyValue(o);return e.style.setProperty(o,`${(parseInt(i,10)||0)+t}px`),()=>{a?e.style.setProperty(o,a):e.style.removeProperty(o)}}function Ht({children:e}){const t=ut();return Je((()=>{const e=[],{body:r,documentElement:n}=document,o=Math.round(window.innerWidth-n.clientWidth);if(o>0){e.push(Bt(r,o,t));const n=r.getElementsByTagName("*");for(let r=0;r<n.length;r+=1){const i=n[r];Ft(i)&&"fixed"===window.getComputedStyle(i).getPropertyValue("position")&&!i.classList.contains(zt)&&e.push(Bt(i,o,t))}}return r.classList.add(Dt),()=>{r.classList.remove(Dt),e.forEach((e=>e()))}}),[t]),n.createElement(n.Fragment,null,e)}const Ut=re(l,Ht);function Wt(e){return fe(u,e)}function Vt(e,t,r){const n=e.getAttribute(t);return e.setAttribute(t,r),()=>{n?e.setAttribute(t,n):e.removeAttribute(t)}}function qt({children:e,animation:t,styles:r,className:o,on:i,portal:a,close:l}){const[u,s]=n.useState(!1),[c,f]=n.useState(!1),d=n.useRef([]),{setTimeout:p}=Ue(),{subscribe:h}=Le(),m=et()?0:t.fade;n.useEffect((()=>(s(!0),()=>{s(!1),f(!1)})),[]);const v=ot((()=>{var e;f(!1),null===(e=i.exiting)||void 0===e||e.call(i),p((()=>{var e;null===(e=i.exited)||void 0===e||e.call(i),l()}),m)}));n.useEffect((()=>h(D,v)),[h,v]);const g=ot((e=>{var t,r,n;e.scrollTop,f(!0),null===(t=i.entering)||void 0===t||t.call(i);const o=null!==(n=null===(r=e.parentNode)||void 0===r?void 0:r.children)&&void 0!==n?n:[];for(let t=0;t<o.length;t+=1){const r=o[t];-1===["TEMPLATE","SCRIPT","STYLE"].indexOf(r.tagName)&&r!==e&&(d.current.push(Vt(r,"inert","true")),d.current.push(Vt(r,"aria-hidden","true")))}p((()=>{var e;null===(e=i.entered)||void 0===e||e.call(i)}),m)})),y=ot((()=>{d.current.forEach((e=>e())),d.current=[]})),b=n.useCallback((e=>{e?g(e):y()}),[g,y]);return u?(0,ee.createPortal)(n.createElement("div",{ref:b,className:le(o,se("root"),se(Wt()),se(T),c&&se(Wt("open"))),role:"presentation","aria-live":"polite",style:{...t.fade!==te.animation.fade?{[ce("fade_animation_duration")]:`${m}ms`}:null,...t.easing.fade!==te.animation.easing.fade?{[ce("fade_animation_timing_function")]:t.easing.fade}:null,...r.root}},e),a.root||document.body):null}const Gt=re(u,qt);function Yt({children:e}){return n.createElement(n.Fragment,null,e)}const Kt=re(s,Yt);function $t({toolbar:{buttons:e},render:{buttonClose:t,iconClose:r}}){const{close:o,setToolbarWidth:i}=Ot(),{setContainerRef:a,containerRect:l}=rt();Je((()=>{i(null==l?void 0:l.width)}),[i,null==l?void 0:l.width]);return n.createElement("div",{ref:a,className:se(fe(c,u)),...je()},null==e?void 0:e.map((e=>e===D?t?t():n.createElement(Ve,{key:D,label:"Close",icon:Ke,renderIcon:r,onClick:o}):e)));var u}const Qt=re(c,$t);function Zt(e,t){var r;return n.createElement(e.module.component,{key:e.module.name,...t},null===(r=e.children)||void 0===r?void 0:r.map((e=>Zt(e,t))))}function Xt(e,t={}){const{easing:r,...n}=e,{easing:o,...i}=t;return{easing:{...r,...o},...n,...i}}function Jt({carousel:e,animation:t,render:r,toolbar:o,controller:i,on:a,plugins:l,slides:u,index:s,...c}){const{animation:f,carousel:d,render:p,toolbar:h,controller:m,on:v,slides:g,index:y,plugins:b,...w}=te,{config:_,augmentation:x}=ae([ne(Gt,[ne(Ut,[ne(Ct,[ne(Tt),ne(Qt),ne(Nt)])])])],l||b),S=x({animation:Xt(f,t),carousel:{...d,...e},render:{...p,...r},toolbar:{...h,...o},controller:{...m,...i},on:{...v,...a},...w,...c});return S.open?n.createElement(Ie,{...S},n.createElement(Be,{slides:u||g,index:s||y},n.createElement(We,null,n.createElement(Me,null,Zt(ne(Kt,_),S))))):null}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.nc=void 0;r(63572)})();
Save Changes
Rename File
Rename