diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d8434c..b9a9e094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.10.0-rc.15 +## mm/dd/2020 + +1. [](#bugfix) + * Disabled the EXIF library for Dropzone for fixing the orientation as it was getting applied twice [#1923](https://github.com/getgrav/grav-plugin-admin/issues/1923) + # v1.10.0-rc.14 ## 07/09/2020 diff --git a/themes/grav/app/forms/fields/files.js b/themes/grav/app/forms/fields/files.js index 1c61c1b7..0ea6c008 100644 --- a/themes/grav/app/forms/fields/files.js +++ b/themes/grav/app/forms/fields/files.js @@ -1,6 +1,6 @@ import $ from 'jquery'; import Dropzone from 'dropzone'; -import EXIF from 'exif-js'; +// import EXIF from 'exif-js'; import request from '../../utils/request'; import { config, translations } from 'grav-config'; @@ -71,7 +71,7 @@ const DropzoneMediaConfig = { `.trim() }; -global.EXIF = EXIF; +// global.EXIF = EXIF; const ACCEPT_FUNC = function(file, done, settings) { const resolution = settings.resolution; diff --git a/themes/grav/app/pages/page/media.js b/themes/grav/app/pages/page/media.js index 1a814ac1..ff5f555b 100644 --- a/themes/grav/app/pages/page/media.js +++ b/themes/grav/app/pages/page/media.js @@ -141,7 +141,7 @@ export default class PageMedia extends FilesField { let URL = target.closest('[data-media-path]').data('media-path'); let original = this.dropzone.files.filter((file) => encodeURIComponent(file.name) === filename).shift(); - original = original.extras.original || encodeURIComponent(original.name); + original = original && ((original.extras && original.extras.original) || encodeURIComponent(original.name)); target.attr('href', `${URL}/${original}`); }); diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index 4093f1a9..ad0bcd61 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -1,25 +1,25 @@ -var Grav=webpackJsonpGrav([0],[function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i);n(2),n(3);var o=n(4),s=r(o),l=n(349),c=r(l),u=n(350),d=r(u),f=n(370),p=r(f),h=n(375),m=r(h),g=n(464),v=r(g);n(632),n(642);var y=n(643),_=n(338),b=r(_),w=n(365),k=r(w);n(644),n(645),n(657),n(660),n(661),n(662),n(664);var x=n(665),C=r(x);c.default.start(),(0,a.default)(e).on("sidebar_state._grav",function(){Object.keys(p.default.Chart.Instances).forEach(function(e){setTimeout(function(){return p.default.Chart.Instances[e].chart.update()},10)})}),t.default={GPM:{GPM:s.default,Instance:o.Instance},KeepAlive:c.default,Dashboard:p.default,Pages:m.default,Forms:v.default,Updates:{Updates:d.default,Notifications:u.Notifications,Feed:u.Feed,Instance:u.Instance},Sidebar:{Sidebar:C.default,Instance:x.Instance},MediaFilter:{MediaFilter:y.Filter,Instance:y.Instance},Scrollbar:{Scrollbar:{deprecated:!0},Instance:{deprecated:!0}},Utils:{request:k.default,toastr:b.default}}}).call(t,function(){return this}())},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);!function(e,t){return t(e,a.default)}(void 0,function(e,t){function n(e){if(x&&"none"===e.css("animation-name")&&"none"===e.css("-webkit-animation-name")&&"none"===e.css("-moz-animation-name")&&"none"===e.css("-o-animation-name")&&"none"===e.css("-ms-animation-name"))return 0;var t,n,r,i,a=e.css("animation-duration")||e.css("-webkit-animation-duration")||e.css("-moz-animation-duration")||e.css("-o-animation-duration")||e.css("-ms-animation-duration")||"0s",o=e.css("animation-delay")||e.css("-webkit-animation-delay")||e.css("-moz-animation-delay")||e.css("-o-animation-delay")||e.css("-ms-animation-delay")||"0s",s=e.css("animation-iteration-count")||e.css("-webkit-animation-iteration-count")||e.css("-moz-animation-iteration-count")||e.css("-o-animation-iteration-count")||e.css("-ms-animation-iteration-count")||"1";for(a=a.split(", "),o=o.split(", "),s=s.split(", "),i=0,n=a.length,t=Number.NEGATIVE_INFINITY;it&&(t=r);return t}function r(){if(t(document).height()<=t(window).height())return 0;var e,n,r=document.createElement("div"),i=document.createElement("div");return r.style.visibility="hidden",r.style.width="100px",document.body.appendChild(r),e=r.offsetWidth,r.style.overflow="scroll",i.style.width="100%",r.appendChild(i),n=i.offsetWidth,r.parentNode.removeChild(r),e-n}function i(){if(!C){var e,n,i=t("html"),a=u("is-locked");i.hasClass(a)||(n=t(document.body),e=parseInt(n.css("padding-right"),10)+r(),n.css("padding-right",e+"px"),i.addClass(a))}}function a(){if(!C){var e,n,i=t("html"),a=u("is-locked");i.hasClass(a)&&(n=t(document.body),e=parseInt(n.css("padding-right"),10)-r(),n.css("padding-right",e+"px"),i.removeClass(a))}}function o(e,t,n,r){var i=u("is",t),a=[u("is",w.CLOSING),u("is",w.OPENING),u("is",w.CLOSED),u("is",w.OPENED)].join(" ");e.$bg.removeClass(a).addClass(i),e.$overlay.removeClass(a).addClass(i),e.$wrapper.removeClass(a).addClass(i),e.$modal.removeClass(a).addClass(i),e.state=t,!n&&e.$modal.trigger({type:t,reason:r},[{reason:r}])}function s(e,r,i){var a=0,o=function(e){e.target===this&&a++},s=function(e){e.target===this&&0===--a&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(e,t){i[t].off(y+" "+_)}),r())};t.each(["$bg","$overlay","$wrapper","$modal"],function(e,t){i[t].on(y,o).on(_,s)}),e(),0===n(i.$bg)&&0===n(i.$overlay)&&0===n(i.$wrapper)&&0===n(i.$modal)&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(e,t){i[t].off(y+" "+_)}),r())}function l(e){e.state!==w.CLOSED&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(t,n){e[n].off(y+" "+_)}),p(e),e.$bg.removeClass(e.settings.modifier),e.$overlay.removeClass(e.settings.modifier).hide(),e.$wrapper.hide(),0===S.length&&a(),o(e,w.CLOSED,!0))}function c(e){var t,n,r,i,a={};for(e=e.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),t=e.split(","),i=0,n=t.length;i=0&&S.slice(t,1)}function h(e,n){var r=t(document.body),i=r,a=this;a.id=e.attr("data-remodal-id"),a.settings=t.extend({},b,n),a.index=t[g].lookup.push(a)-1,a.state=w.CLOSED,null!==a.settings.appendTo&&a.settings.appendTo.length&&(i=t(a.settings.appendTo)),a.$overlay||(a.$overlay=t("
").addClass(u("overlay")+" "+u("is",w.CLOSED)).hide(),i.append(a.$overlay)),a.$bg=t("."+u("bg")).addClass(u("is",w.CLOSED)),a.$modal=e.addClass(v+" "+u("is-initialized")+" "+a.settings.modifier+" "+u("is",w.CLOSED)).attr("tabindex","-1"),a.$wrapper=t("
").addClass(u("wrapper")+" "+a.settings.modifier+" "+u("is",w.CLOSED)).hide().append(a.$modal),i.append(a.$wrapper),a.$wrapper.on("click."+v,'[data-remodal-action="close"]',function(e){e.preventDefault(),a.close()}),a.$wrapper.on("click."+v,'[data-remodal-action="cancel"]',function(e){e.preventDefault(),a.$modal.trigger(k.CANCELLATION),a.settings.closeOnCancel&&a.close(k.CANCELLATION)}),a.$wrapper.on("click."+v,'[data-remodal-action="confirm"]',function(e){e.preventDefault(),a.$modal.trigger(k.CONFIRMATION),a.settings.closeOnConfirm&&a.close(k.CONFIRMATION)}),a.$wrapper.on("click."+v,function(e){var n=t(e.target);n.hasClass(u("wrapper"))&&a.settings.closeOnOutsideClick&&a.close()})}var m,g="remodal",v=window.REMODAL_GLOBALS&&window.REMODAL_GLOBALS.NAMESPACE||g,y=t.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(e){return e+"."+v}).join(" "),_=t.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(e){return e+"."+v}).join(" "),b=t.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",stack:!1,appendTo:null},window.REMODAL_GLOBALS&&window.REMODAL_GLOBALS.DEFAULTS),w={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},k={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},x=function(){var e=document.createElement("div").style;return void 0!==e.animationName||void 0!==e.WebkitAnimationName||void 0!==e.MozAnimationName||void 0!==e.msAnimationName||void 0!==e.OAnimationName}(),C=/iPad|iPhone|iPod/.test(navigator.platform),S=[];h.prototype.open=function(){var e,n,r=this;r.state!==w.OPENING&&r.state!==w.CLOSING&&(r.id&&r.settings.hashTracking&&(m=t(window).scrollTop(),location.hash=r.id),r.settings.stack||(e=f(),e&&e!==r&&l(e)),n=S.push(r),r.$overlay.css("z-index",function(e,t){return parseInt(t,10)+n}),r.$wrapper.css("z-index",function(e,t){return parseInt(t,10)+n}),i(),r.$bg.addClass(r.settings.modifier),r.$overlay.addClass(r.settings.modifier).show(),r.$wrapper.show().scrollTop(0),r.$modal.focus(),s(function(){o(r,w.OPENING)},function(){o(r,w.OPENED)},r))},h.prototype.close=function(e){var n,r=this;r.state!==w.OPENING&&r.state!==w.CLOSING&&r.state!==w.CLOSED&&(p(r),r.settings.hashTracking&&r.id===location.hash.substr(1)&&(n=f(),n?location.hash=n.id:(location.hash="",t(window).scrollTop(m))),s(function(){o(r,w.CLOSING,!1,e)},function(){r.$bg.removeClass(r.settings.modifier),r.$overlay.removeClass(r.settings.modifier).hide(),r.$wrapper.hide(),0===S.length&&a(),o(r,w.CLOSED,!1,e)},r))},h.prototype.getState=function(){return this.state},h.prototype.destroy=function(){var e,n=t[g].lookup;l(this),this.$wrapper.remove(),delete n[this.index],e=t.grep(n,function(e){return!!e}).length,0===e&&(this.$overlay.remove(),this.$bg.removeClass(u("is",w.CLOSING)+" "+u("is",w.OPENING)+" "+u("is",w.CLOSED)+" "+u("is",w.OPENED)))},t[g]={lookup:[]},t.fn[g]=function(e){var n,r;return this.each(function(i,a){r=t(a),null==r.data(g)?(n=new h(r,e),r.data(g,n.index),n.settings.hashTracking&&n.id===location.hash.substr(1)&&n.open()):n=t[g].lookup[r.data(g)]}),n},t(document).ready(function(){t(document).on("click","[data-remodal-target]",function(e){e.preventDefault();var n=e.currentTarget,r=n.getAttribute("data-remodal-target"),i=t('[data-remodal-id="'+r+'"]');t[g].lookup[i.data(g)].open()}),t(document).find("."+v).each(function(e,n){var r=t(n),i=r.data("remodal-options");i?("string"==typeof i||i instanceof String)&&(i=c(i)):i={},r[g](i)}),t(document).on("keydown."+v,function(e){var t=f();t&&t.settings.closeOnEscape&&t.state===w.OPENED&&27===e.keyCode&&t.close()}),t(window).on("hashchange."+v,d)})})},function(e,t,n){(function(t){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}function n(e,t,n){function a(t){var n=u,r=d;return u=d=void 0,g=t,p=e.apply(r,n)}function o(e){var n=e-m;return void 0===m||n>=t||n<0||y&&e-g>=f}function s(){var e=Nr();return o(e)?l(e):void(h=setTimeout(s,function(e){var n=t-(e-m);return y?Lr(n,f-(e-g)):n}(e)))}function l(e){return h=void 0,_&&u?a(e):(u=d=void 0,p)}function c(){var e=Nr(),n=o(e);if(u=arguments,d=this,m=e,n){if(void 0===h)return function(e){return g=e,h=setTimeout(s,t),v?a(e):p}(m);if(y)return h=setTimeout(s,t),a(m)}return void 0===h&&(h=setTimeout(s,t)),p}var u,d,f,p,h,m,g=0,v=!1,y=!1,_=!0;if("function"!=typeof e)throw new TypeError(kr);return t=i(t)||0,r(n)&&(v=!!n.leading,f=(y="maxWait"in n)?jr(i(n.maxWait)||0,t):f,_="trailing"in n?!!n.trailing:_),c.cancel=function(){void 0!==h&&clearTimeout(h),g=0,u=m=d=h=void 0},c.flush=function(){return void 0===h?p:l(Nr())},c}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function i(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Pr.call(e)==Cr}(e))return xr;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Sr,"");var n=Ar.test(e);return n||Or.test(e)?Ir(e.slice(2),n?2:8):Er.test(e)?xr:+e}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Yr.call(e)==qr}(e))return Rr;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ur,"");var n=Vr.test(e);return n||$r.test(e)?Gr(e.slice(2),n?2:8):Br.test(e)?Rr:+e}function s(e){var t=-1,n=e?e.length:0;for(this.clear();++t0?Oe:Ae)(e)},De=Math.min,Me=function(e){return e>0?De(Ie(e),9007199254740991):0},Te=Math.max,Pe=Math.min,je=function(e){return function(t,n,r){var i,a=R(t),o=Me(a.length),s=function(e,t){var n=Ie(e);return n<0?Te(n+t,0):Pe(n,t)}(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Le={includes:je(!0),indexOf:je(!1)}.indexOf,Ne=function(e,t){var n,r=R(e),i=0,a=[];for(n in r)!V(me,n)&&V(r,n)&&a.push(n);for(;t.length>i;)V(r,n=t[i++])&&(~Le(a,n)||a.push(n));return a},ze=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fe=ze.concat("length","prototype"),Re={f:Object.getOwnPropertyNames||function(e){return Ne(e,Fe)}},qe={f:Object.getOwnPropertySymbols},Ue=Ee("Reflect","ownKeys")||function(e){var t=Re.f(J(e)),n=qe.f;return n?t.concat(n(e)):t},Be=function(e,t){for(var n=Ue(t),r=Q.f,i=Y.f,a=0;av;v++)if((o||v in h)&&(f=m(d=h[v],v,p),e))if(t)_[v]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return v;case 2:ut.call(_,d)}else if(i)return!1;return a?-1:r||i?i:_}},ft={forEach:dt(0),map:dt(1),filter:dt(2),some:dt(3),every:dt(4),find:dt(5),findIndex:dt(6)},pt=function(e,t){var n=[][e];return!!n&&O(function(){n.call(null,t||function(){throw 1},1)})},ht=Object.defineProperty,mt={},gt=function(e){throw e},vt=function(e,t){if(V(mt,e))return mt[e];t||(t={});var n=[][e],r=!!V(t,"ACCESSORS")&&t.ACCESSORS,i=V(t,0)?t[0]:gt,a=V(t,1)?t[1]:void 0;return mt[e]=!!n&&!O(function(){if(r&&!I)return!0;var e={length:-1};r?ht(e,1,{enumerable:!0,get:gt}):e[1]=1,n.call(e,i,a)})},yt=ft.forEach,_t=pt("forEach"),bt=vt("forEach"),wt=_t&&bt?[].forEach:function(e){return yt(this,e,arguments.length>1?arguments[1]:void 0)};Xe({target:"Array",proto:!0,forced:[].forEach!=wt},{forEach:wt});var kt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var xt in kt){var Ct=A[xt],St=Ct&&Ct.prototype;if(St&&St.forEach!==wt)try{Z(St,"forEach",wt)}catch(e){St.forEach=wt}}var Et,At,Ot=!("undefined"==typeof window||!window.document||!window.document.createElement),It=Ee("navigator","userAgent")||"",Dt=A.process,Mt=Dt&&Dt.versions,Tt=Mt&&Mt.v8;Tt?At=(Et=Tt.split("."))[0]+Et[1]:It&&(!(Et=It.match(/Edge\/(\d+)/))||Et[1]>=74)&&(Et=It.match(/Chrome\/(\d+)/))&&(At=Et[1]);var Pt=At&&+At,jt=st("species"),Lt=ft.filter,Nt=function(e){return Pt>=51||!O(function(){var t=[];return(t.constructor={})[jt]=function(){return{foo:1}},1!==t[e](Boolean).foo})}("filter"),zt=vt("filter");Xe({target:"Array",proto:!0,forced:!Nt||!zt},{filter:function(e){return Lt(this,e,arguments.length>1?arguments[1]:void 0)}});var Ft,Rt=Object.keys||function(e){return Ne(e,ze)},qt=I?Object.defineProperties:function(e,t){J(e);for(var n,r=Rt(t),i=r.length,a=0;i>a;)Q.f(e,n=r[a++],t[n]);return e},Ut=Ee("document","documentElement"),Bt=he("IE_PROTO"),Vt=function(){},$t=function(e){return""},Gt=function(){try{Ft=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;Gt=Ft?function(e){e.write($t("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Ft):((t=W("iframe")).style.display="none",Ut.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write($t("document.F=Object")),e.close(),e.F);for(var n=ze.length;n--;)delete Gt.prototype[ze[n]];return Gt()};me[Bt]=!0;var Wt=Object.create||function(e,t){var n;return null!==e?(Vt.prototype=J(e),n=new Vt,Vt.prototype=null,n[Bt]=e):n=Gt(),void 0===t?n:qt(n,t)},Ht=st("unscopables"),Kt=Array.prototype;null==Kt[Ht]&&Q.f(Kt,Ht,{configurable:!0,value:Wt(null)});var Yt,Jt,Xt,Qt=function(e){Kt[Ht][e]=!0},Zt={},en=!O(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),tn=he("IE_PROTO"),nn=Object.prototype,rn=en?Object.getPrototypeOf:function(e){return e=et(e),V(e,tn)?e[tn]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?nn:null},an=st("iterator"),on=!1;[].keys&&("next"in(Xt=[].keys())?(Jt=rn(rn(Xt)))!==Object.prototype&&(Yt=Jt):on=!0),null==Yt&&(Yt={}),V(Yt,an)||Z(Yt,an,function(){return this});var sn={IteratorPrototype:Yt,BUGGY_SAFARI_ITERATORS:on},ln=Q.f,cn=st("toStringTag"),un=function(e,t,n){e&&!V(e=n?e:e.prototype,cn)&&ln(e,cn,{configurable:!0,value:t})},dn=sn.IteratorPrototype,fn=function(){return this},pn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return J(n),function(e){if(!q(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),hn=sn.IteratorPrototype,mn=sn.BUGGY_SAFARI_ITERATORS,gn=st("iterator"),vn=function(){return this},yn=function(e,t,n,r,i,a,o){!function(e,t,n){var r=t+" Iterator";e.prototype=Wt(dn,{next:P(1,n)}),un(e,r,!1),Zt[r]=fn}(n,t,r);var s,l,c,u=function(e){if(e===i&&m)return m;if(!mn&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,p=e.prototype,h=p[gn]||p["@@iterator"]||i&&p[i],m=!mn&&h||u(i),g="Array"==t&&p.entries||h;if(g&&(s=rn(g.call(new e)),hn!==Object.prototype&&s.next&&(rn(s)!==hn&&(pn?pn(s,hn):"function"!=typeof s[gn]&&Z(s,gn,vn)),un(s,d,!0))),"values"==i&&h&&"values"!==h.name&&(f=!0,m=function(){return h.call(this)}),p[gn]!==m&&Z(p,gn,m),Zt[t]=m,i)if(l={values:u("values"),keys:a?m:u("keys"),entries:u("entries")},o)for(c in l)!mn&&!f&&c in p||xe(p,c,l[c]);else Xe({target:t,proto:!0,forced:mn||f},l);return l},_n=ke.set,bn=ke.getterFor("Array Iterator"),wn=yn(Array,"Array",function(e,t){_n(this,{type:"Array Iterator",target:R(e),index:0,kind:t})},function(){var e=bn(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");Zt.Arguments=Zt.Array,Qt("keys"),Qt("values"),Qt("entries");var kn=Object.assign,xn=Object.defineProperty,Cn=!kn||O(function(){if(I&&1!==kn({b:1},kn(xn({},"a",{enumerable:!0,get:function(){xn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!=kn({},e)[n]||"abcdefghijklmnopqrst"!=Rt(kn({},t)).join("")})?function(e,t){for(var n=et(e),r=arguments.length,i=1,a=qe.f,o=T.f;r>i;)for(var s,l=z(arguments[i++]),c=a?Rt(l).concat(a(l)):Rt(l),u=c.length,d=0;u>d;)s=c[d++],I&&!o.call(l,s)||(n[s]=l[s]);return n}:kn;Xe({target:"Object",stat:!0,forced:Object.assign!==Cn},{assign:Cn});var Sn={};Sn[st("toStringTag")]="z";var En="[object z]"===String(Sn),An=st("toStringTag"),On="Arguments"==L(function(){return arguments}()),In=En?L:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),An))?n:On?L(t):"Object"==(r=L(t))&&"function"==typeof t.callee?"Arguments":r},Dn=En?{}.toString:function(){return"[object "+In(this)+"]"};En||xe(Object.prototype,"toString",Dn,{unsafe:!0});var Mn="\t\n\v\f\r                 \u2028\u2029\ufeff",Tn="["+Mn+"]",Pn=RegExp("^"+Tn+Tn+"*"),jn=RegExp(Tn+Tn+"*$"),Ln=function(e){return function(t){var n=String(F(t));return 1&e&&(n=n.replace(Pn,"")),2&e&&(n=n.replace(jn,"")),n}},Nn={start:Ln(1),end:Ln(2),trim:Ln(3)}.trim,zn=A.parseInt,Fn=/^[+-]?0[Xx]/,Rn=8!==zn(Mn+"08")||22!==zn(Mn+"0x16")?function(e,t){var n=Nn(String(e));return zn(n,t>>>0||(Fn.test(n)?16:10))}:zn;Xe({global:!0,forced:parseInt!=Rn},{parseInt:Rn});var qn=function(e){return function(t,n){var r,i,a=String(F(t)),o=Ie(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},Un={codeAt:qn(!1),charAt:qn(!0)},Bn=Un.charAt,Vn=ke.set,$n=ke.getterFor("String Iterator");yn(String,"String",function(e){Vn(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=$n(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Bn(n,r),t.index+=e.length,{value:e,done:!1})});var Gn=function(e,t,n){for(var r in t)xe(e,r,t[r],n);return e},Wn=!O(function(){return Object.isExtensible(Object.preventExtensions({}))}),Hn=e(function(e){var t=Q.f,n=fe("meta"),r=0,i=Object.isExtensible||function(){return!0},a=function(e){t(e,n,{value:{objectID:"O"+ ++r,weakData:{}}})},o=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!q(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!V(e,n)){if(!i(e))return"F";if(!t)return"E";a(e)}return e[n].objectID},getWeakData:function(e,t){if(!V(e,n)){if(!i(e))return!0;if(!t)return!1;a(e)}return e[n].weakData},onFreeze:function(e){return Wn&&o.REQUIRED&&i(e)&&!V(e,n)&&a(e),e}};me[n]=!0}),Kn=(Hn.REQUIRED,Hn.fastKey,Hn.getWeakData,Hn.onFreeze,st("iterator")),Yn=Array.prototype,Jn=st("iterator"),Xn=function(e,t,n,r){try{return r?t(J(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&J(i.call(e)),t}},Qn=e(function(e){var t=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,n,r,i,a){var o,s,l,c,u,d,f,p,h=Ze(n,r,i?2:1);if(a)o=e;else{if("function"!=typeof(s=function(e){if(null!=e)return e[Jn]||e["@@iterator"]||Zt[In(e)]}(e)))throw TypeError("Target is not iterable");if(void 0!==(p=s)&&(Zt.Array===p||Yn[Kn]===p)){for(l=0,c=Me(e.length);c>l;l++)if((u=i?h(J(f=e[l])[0],f[1]):h(e[l]))&&u instanceof t)return u;return new t(!1)}o=s.call(e)}for(d=o.next;!(f=d.call(o)).done;)if("object"==typeof(u=Xn(o,h,f.value,i))&&u&&u instanceof t)return u;return new t(!1)}).stop=function(e){return new t(!0,e)}}),Zn=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},er=st("iterator"),tr=!1;try{var nr=0,rr={next:function(){return{done:!!nr++}},return:function(){tr=!0}};rr[er]=function(){return this},Array.from(rr,function(){throw 2})}catch(e){}var ir=function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=r?"set":"add",o=A[e],s=o&&o.prototype,l=o,c={},u=function(e){var t=s[e];xe(s,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!q(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return i&&!q(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!q(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(Ye(e,"function"!=typeof o||!(i||s.forEach&&!O(function(){(new o).entries().next()}))))l=n.getConstructor(t,e,r,a),Hn.REQUIRED=!0;else if(Ye(e,!0)){var d=new l,f=d[a](i?{}:-0,1)!=d,p=O(function(){d.has(1)}),h=function(e,t){if(!t&&!tr)return!1;var n=!1;try{var r={};r[er]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}(function(e){new o(e)}),m=!i&&O(function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)});h||((l=t(function(t,n){Zn(t,l,e);var i=function(e,t,n){var r,i;return pn&&"function"==typeof(r=t.constructor)&&r!==n&&q(i=r.prototype)&&i!==n.prototype&&pn(e,i),e}(new o,t,l);return null!=n&&Qn(n,i[a],i,r),i})).prototype=s,s.constructor=l),(p||m)&&(u("delete"),u("has"),r&&u("get")),(m||f)&&u(a),i&&s.clear&&delete s.clear}return c[e]=l,Xe({global:!0,forced:l!=o},c),un(l,e),i||n.setStrong(l,e,r),l},ar=Hn.getWeakData,or=ke.set,sr=ke.getterFor,lr=ft.find,cr=ft.findIndex,ur=0,dr=function(e){return e.frozen||(e.frozen=new fr)},fr=function(){this.entries=[]},pr=function(e,t){return lr(e.entries,function(e){return e[0]===t})};fr.prototype={get:function(e){var t=pr(this,e);if(t)return t[1]},has:function(e){return!!pr(this,e)},set:function(e,t){var n=pr(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=cr(this.entries,function(t){return t[0]===e});return~t&&this.entries.splice(t,1),!!~t}};var hr={getConstructor:function(e,t,n,r){var i=e(function(e,a){Zn(e,i,t),or(e,{type:t,id:ur++,frozen:void 0}),null!=a&&Qn(a,e[r],e,n)}),a=sr(t),o=function(e,t,n){var r=a(e),i=ar(J(t),!0);return!0===i?dr(r).set(t,n):i[r.id]=n,e};return Gn(i.prototype,{delete:function(e){var t=a(this);if(!q(e))return!1;var n=ar(e);return!0===n?dr(t).delete(e):n&&V(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!q(e))return!1;var n=ar(e);return!0===n?dr(t).has(e):n&&V(n,t.id); -}}),Gn(i.prototype,n?{get:function(e){var t=a(this);if(q(e)){var n=ar(e);return!0===n?dr(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return o(this,e,t)}}:{add:function(e){return o(this,e,!0)}}),i}},mr=(e(function(e){var t,n=ke.enforce,r=!A.ActiveXObject&&"ActiveXObject"in A,i=Object.isExtensible,a=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},o=e.exports=ir("WeakMap",a,hr);if(le&&r){t=hr.getConstructor(a,"WeakMap",!0),Hn.REQUIRED=!0;var s=o.prototype,l=s.delete,c=s.has,u=s.get,d=s.set;Gn(s,{delete:function(e){if(q(e)&&!i(e)){var r=n(this);return r.frozen||(r.frozen=new t),l.call(this,e)||r.frozen.delete(e)}return l.call(this,e)},has:function(e){if(q(e)&&!i(e)){var r=n(this);return r.frozen||(r.frozen=new t),c.call(this,e)||r.frozen.has(e)}return c.call(this,e)},get:function(e){if(q(e)&&!i(e)){var r=n(this);return r.frozen||(r.frozen=new t),c.call(this,e)?u.call(this,e):r.frozen.get(e)}return u.call(this,e)},set:function(e,r){if(q(e)&&!i(e)){var a=n(this);a.frozen||(a.frozen=new t),c.call(this,e)?d.call(this,e,r):a.frozen.set(e,r)}else d.call(this,e,r);return this}})}}),st("iterator")),gr=st("toStringTag"),vr=wn.values;for(var yr in kt){var _r=A[yr],br=_r&&_r.prototype;if(br){if(br[mr]!==vr)try{Z(br,mr,vr)}catch(e){br[mr]=vr}if(br[gr]||Z(br,gr,yr),kt[yr])for(var wr in wn)if(br[wr]!==wn[wr])try{Z(br,wr,wn[wr])}catch(e){br[wr]=wn[wr]}}}var kr="Expected a function",xr=NaN,Cr="[object Symbol]",Sr=/^\s+|\s+$/g,Er=/^[-+]0x[0-9a-f]+$/i,Ar=/^0b[01]+$/i,Or=/^0o[0-7]+$/i,Ir=parseInt,Dr="object"==typeof S&&S&&S.Object===Object&&S,Mr="object"==typeof self&&self&&self.Object===Object&&self,Tr=Dr||Mr||Function("return this")(),Pr=Object.prototype.toString,jr=Math.max,Lr=Math.min,Nr=function(){return Tr.Date.now()},zr=function(e,t,i){var a=!0,o=!0;if("function"!=typeof e)throw new TypeError(kr);return r(i)&&(a="leading"in i?!!i.leading:a,o="trailing"in i?!!i.trailing:o),n(e,t,{leading:a,maxWait:t,trailing:o})},Fr="Expected a function",Rr=NaN,qr="[object Symbol]",Ur=/^\s+|\s+$/g,Br=/^[-+]0x[0-9a-f]+$/i,Vr=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,Gr=parseInt,Wr="object"==typeof S&&S&&S.Object===Object&&S,Hr="object"==typeof self&&self&&self.Object===Object&&self,Kr=Wr||Hr||Function("return this")(),Yr=Object.prototype.toString,Jr=Math.max,Xr=Math.min,Qr=function(){return Kr.Date.now()},Zr=function(e,t,n){function r(t){var n=u,r=d;return u=d=void 0,g=t,p=e.apply(r,n)}function i(e){var n=e-m;return void 0===m||n>=t||n<0||y&&e-g>=f}function s(){var e=Qr();return i(e)?l(e):void(h=setTimeout(s,function(e){var n=t-(e-m);return y?Xr(n,f-(e-g)):n}(e)))}function l(e){return h=void 0,_&&u?r(e):(u=d=void 0,p)}function c(){var e=Qr(),n=i(e);if(u=arguments,d=this,m=e,n){if(void 0===h)return function(e){return g=e,h=setTimeout(s,t),v?r(e):p}(m);if(y)return h=setTimeout(s,t),r(m)}return void 0===h&&(h=setTimeout(s,t)),p}var u,d,f,p,h,m,g=0,v=!1,y=!1,_=!0;if("function"!=typeof e)throw new TypeError(Fr);return t=o(t)||0,a(n)&&(v=!!n.leading,f=(y="maxWait"in n)?Jr(o(n.maxWait)||0,t):f,_="trailing"in n?!!n.trailing:_),c.cancel=function(){void 0!==h&&clearTimeout(h),g=0,u=m=d=h=void 0},c.flush=function(){return void 0===h?p:l(Qr())},c},ei="Expected a function",ti="__lodash_hash_undefined__",ni="[object Function]",ri="[object GeneratorFunction]",ii=/^\[object .+?Constructor\]$/,ai="object"==typeof S&&S&&S.Object===Object&&S,oi="object"==typeof self&&self&&self.Object===Object&&self,si=ai||oi||Function("return this")(),li=Array.prototype,ci=Function.prototype,ui=Object.prototype,di=si["__core-js_shared__"],fi=function(){var e=/[^.]+$/.exec(di&&di.keys&&di.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pi=ci.toString,hi=ui.hasOwnProperty,mi=ui.toString,gi=RegExp("^"+pi.call(hi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=li.splice,yi=p(si,"Map"),_i=p(Object,"create");s.prototype.clear=function(){this.__data__=_i?_i(null):{}},s.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},s.prototype.get=function(e){var t=this.__data__;if(_i){var n=t[e];return n===ti?void 0:n}return hi.call(t,e)?t[e]:void 0},s.prototype.has=function(e){var t=this.__data__;return _i?void 0!==t[e]:hi.call(t,e)},s.prototype.set=function(e,t){return this.__data__[e]=_i&&void 0===t?ti:t,this},l.prototype.clear=function(){this.__data__=[]},l.prototype.delete=function(e){var t=this.__data__,n=u(t,e);return!(n<0||(n==t.length-1?t.pop():vi.call(t,n,1),0))},l.prototype.get=function(e){var t=this.__data__,n=u(t,e);return n<0?void 0:t[n][1]},l.prototype.has=function(e){return u(this.__data__,e)>-1},l.prototype.set=function(e,t){var n=this.__data__,r=u(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},c.prototype.clear=function(){this.__data__={hash:new s,map:new(yi||l),string:new s}},c.prototype.delete=function(e){return f(this,e).delete(e)},c.prototype.get=function(e){return f(this,e).get(e)},c.prototype.has=function(e){return f(this,e).has(e)},c.prototype.set=function(e,t){return f(this,e).set(e,t),this},h.Cache=c;var bi=h,wi=function(){function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map: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 n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,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 n=0,r=this.__entries__;n0},e.prototype.connect_=function(){ki&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Oi?(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(){ki&&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,n=void 0===t?"":t;Ai.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Di=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),zi="undefined"!=typeof WeakMap?new WeakMap:new wi,Fi=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 n=Ii.getInstance(),r=new Ni(t,n,this);zi.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){Fi.prototype[e]=function(){var t;return(t=zi.get(this))[e].apply(t,arguments)}});var Ri=void 0!==xi.ResizeObserver?xi.ResizeObserver:Fi,qi=null,Ui=null;Ot&&window.addEventListener("resize",function(){Ui!==window.devicePixelRatio&&(Ui=window.devicePixelRatio,qi=null)});var Bi=function(e){return function(t,n,r,i){Qe(n);var a=et(t),o=z(a),s=Me(a.length),l=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(l in o){i=o[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in o&&(i=n(i,o[l],l,a));return i}},Vi={left:Bi(!1),right:Bi(!0)}.left,$i=pt("reduce"),Gi=vt("reduce",{1:0});Xe({target:"Array",proto:!0,forced:!$i||!Gi},{reduce:function(e){return Vi(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Wi=Q.f,Hi=Function.prototype,Ki=Hi.toString,Yi=/^\s*function ([^ (]*)/;!I||"name"in Hi||Wi(Hi,"name",{configurable:!0,get:function(){try{return Ki.call(this).match(Yi)[1]}catch(e){return""}}});var Ji,Xi,Qi=function(){var e=J(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Zi={UNSUPPORTED_Y:O(function(){var e=k("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),BROKEN_CARET:O(function(){var e=k("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},ea=RegExp.prototype.exec,ta=String.prototype.replace,na=ea,ra=(Ji=/a/,Xi=/b*/g,ea.call(Ji,"a"),ea.call(Xi,"a"),0!==Ji.lastIndex||0!==Xi.lastIndex),ia=Zi.UNSUPPORTED_Y||Zi.BROKEN_CARET,aa=void 0!==/()??/.exec("")[1];(ra||aa||ia)&&(na=function(e){var t,n,r,i,a=this,o=ia&&a.sticky,s=Qi.call(a),l=a.source,c=0,u=e;return o&&(-1===(s=s.replace("y","")).indexOf("g")&&(s+="g"),u=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(l="(?: "+l+")",u=" "+u,c++),n=new RegExp("^(?:"+l+")",s)),aa&&(n=new RegExp("^"+l+"$(?!\\s)",s)),ra&&(t=a.lastIndex),r=ea.call(o?n:a,u),o?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:ra&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),aa&&r&&r.length>1&&ta.call(r[0],n,function(){for(i=1;i")}),ca="$0"==="a".replace(/./,"$0"),ua=st("replace"),da=!!/./[ua]&&""===/./[ua]("a","$0"),fa=!O(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),pa=function(e,t,n,r){var i=st(e),a=!O(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),o=a&&!O(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[sa]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});if(!a||!o||"replace"===e&&(!la||!ca||da)||"split"===e&&!fa){var s=/./[i],l=n(i,""[e],function(e,t,n,r,i){return t.exec===oa?a&&!i?{done:!0,value:s.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}},{REPLACE_KEEPS_$0:ca,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:da}),c=l[0],u=l[1];xe(String.prototype,e,c),xe(RegExp.prototype,i,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}r&&Z(RegExp.prototype[i],"sham",!0)},ha=Un.charAt,ma=function(e,t,n){return t+(n?ha(e,t).length:1)},ga=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==L(e))throw TypeError("RegExp#exec called on incompatible receiver");return oa.call(e,t)};pa("match",1,function(e,t,n){return[function(t){var n=F(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=J(e),a=String(this);if(!i.global)return ga(i,a);var o=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;null!==(s=ga(i,a));){var u=String(s[0]);l[c]=u,""===u&&(i.lastIndex=ma(a,Me(i.lastIndex),o)),c++}return 0===c?null:l}]});var va=Math.max,ya=Math.min,_a=Math.floor,ba=/\$([$&'`]|\d\d?|<[^>]*>)/g,wa=/\$([$&'`]|\d\d?)/g;pa("replace",2,function(e,t,n,r){function i(e,n,r,i,a,o){var s=r+e.length,l=i.length,c=wa;return void 0!==a&&(a=et(a),c=ba),t.call(o,c,function(t,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(s);case"<":c=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return t;if(u>l){var d=_a(u/10);return 0===d?t:d<=l?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}c=i[u-1]}return void 0===c?"":c})}var a=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=a?"$":"$0";return[function(n,r){var i=F(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!a&&o||"string"==typeof r&&-1===r.indexOf(s)){var l=n(t,e,this,r);if(l.done)return l.value}var c=J(e),u=String(this),d="function"==typeof r;d||(r=String(r));var f=c.global;if(f){var p=c.unicode;c.lastIndex=0}for(var h=[];;){var m=ga(c,u);if(null===m)break;if(h.push(m),!f)break;""===String(m[0])&&(c.lastIndex=ma(u,Me(c.lastIndex),p))}for(var g,v="",y=0,_=0;_=y&&(v+=u.slice(y,w)+E,y=w+b.length)}return v+u.slice(y)}]});var ka=function(e){return Array.prototype.reduce.call(e,function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,function(e,t){return t.toUpperCase()});switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e},{})},xa=function(){function e(t,n){var r=this;this.onScroll=function(){var e=x(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],a=r.axis[r.draggedAxis].scrollbar,o=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var l=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-a.size)*(o-s);"x"===r.draggedAxis&&(l=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?l-(i+a.size):l,l=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-l:l),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=function(e){var t=C(r.el),n=x(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout(function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=zr(this.recalculate.bind(this),64),this.onMouseMove=zr(this.onMouseMove.bind(this),64),this.hideScrollbars=Zr(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Zr(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=bi(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='
';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),a=e.getOffset(r);n.scrollLeft=999;var o=e.getOffset(r);return{isRtlScrollingInverted:i.left!==a.left&&a.left-o.left!=0,isRtlScrollbarInverted:i.left!==a.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=C(e),r=x(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Ot&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,function(t){return t.classList.contains(e.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=x(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(t){e.el.addEventListener(t,e.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||Ri;this.resizeObserver=new r(function(){n&&e.recalculate()}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame(function(){n=!0}),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=x(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||t>0,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=r?(t||l)+"px":"auto",this.placeholderEl.style.height=s+"px";var c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==t&&l>t,this.axis.y.isOverflowing=s>c,this.axis.x.isOverflowing="hidden"!==a&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>i-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>c-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.axis[t].scrollbar,o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(o="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-o:o)/(n-i),l=~~((r-a.size)*s);l="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?l+(r-a.size):l,a.el.style.transform="x"===t?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=C(this.el),r=x(this.el),i=this.axis[t].scrollbar,a="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=a-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)}, -t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=x(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],a=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,l=-1===s?o-a:o+a;!function e(){var i,a;-1===s?o>l&&(o-=40,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=o,i)),r.requestAnimationFrame(e)):o=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(e){return n.call(e,t)})[0]},e}();return xa.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},xa.instances=new WeakMap,xa.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'),function(e){xa.instances.has(e)||new xa(e,ka(e.attributes))})},xa.removeObserver=function(){this.globalObserver.disconnect()},xa.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(xa.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},xa.handleMutations=function(e){e.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!xa.instances.has(e)&&new xa(e,ka(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar]:not([data-simplebar="init"])'),function(e){!xa.instances.has(e)&&new xa(e,ka(e.attributes))}))}),Array.prototype.forEach.call(e.removedNodes,function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?xa.instances.has(e)&&xa.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),function(e){xa.instances.has(e)&&xa.instances.get(e).unMount()}))})})},xa.getOptions=ka,Ot&&xa.initHtmlApi(),xa})}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"getUpdates";r(this,n);var t=i(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.payload={},t.raw={},t.action=e,t}return a(n,t),o(n,[{key:"setPayload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.payload=e,this.emit("payload",e),this}},{key:"setAction",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"getUpdates";return this.action=e,this.emit("action",e),this}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=new FormData;i.append("admin-nonce",l.config.admin_nonce),r&&i.append("flush",!0),this.emit("fetching",this),e(l.config.base_url_relative+"/update.json/task"+l.config.param_sep+"getUpdates",{credentials:"same-origin",method:"post",body:i}).then(function(e){return t.raw=e,e}).then(s.parseStatus).then(s.parseJSON).then(function(e){return t.response(e)}).then(function(e){return n(e,t.raw)}).then(function(e){return t.emit("fetched",t.payload,t.raw,t)}).catch(s.userFeedbackError)})},{key:"response",value:function(e){return this.payload=e,e}}]),n}(c.EventEmitter);t.default=u;t.Instance=new u}).call(t,n(5))},function(e,t,n){(function(t,n){(function(){!function(e){"use strict";function n(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function i(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function a(e){this.map={},e instanceof a?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?t.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new t(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function l(e){var t=new FileReader,n=s(t);return t.readAsArrayBuffer(e),n}function c(e){var t=new FileReader,n=s(t);return t.readAsText(e),n}function u(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}function h(e,t){t=t||{};var n=t.body;if(e instanceof h){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new a(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new a(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function m(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function g(e){var t=new a,n=e.replace(/\r?\n[\t ]+/g," ");return n.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}}),t}function v(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new a(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(y.arrayBuffer)var _=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},w=ArrayBuffer.isView||function(e){return e&&_.indexOf(Object.prototype.toString.call(e))>-1};a.prototype.append=function(e,t){e=n(e),t=r(t);var i=this.map[e];this.map[e]=i?i+","+t:t},a.prototype.delete=function(e){delete this.map[n(e)]},a.prototype.get=function(e){return e=n(e),this.has(e)?this.map[e]:null},a.prototype.has=function(e){return this.map.hasOwnProperty(n(e))},a.prototype.set=function(e,t){this.map[n(e)]=r(t)},a.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},a.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),i(e)},a.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),i(e)},a.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),i(e)},y.iterable&&(a.prototype[Symbol.iterator]=a.prototype.entries);var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new a(this.headers),url:this.url})},v.error=function(){var e=new v(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];v.redirect=function(e,t){if(x.indexOf(t)===-1)throw new RangeError("Invalid status code");return new v(null,{status:t,headers:{location:e}})},e.Headers=a,e.Request=h,e.Response=v,e.fetch=function(e,n){return new t(function(t,r){var i=new h(e,n),a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:g(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;t(new v(n,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&y.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),e.exports=n.fetch}).call(n)}).call(t,n(6),function(){return this}())},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return e}function a(e){return e.text().then(function(e){var t=e;try{t=JSON.parse(e)}catch(t){var n=document.createElement("div");n.innerHTML=e;var r=new Error;throw r.stack=(0,g.default)(n.innerText),r}return t})}function o(e){if(v)return!0;var t=e.status||(e.error?"error":""),n=e.message||(e.error?e.error.message:null),r=e.toastr||null,i=void 0;switch(t){case"unauthenticated":throw document.location.href=h.config.base_url_relative,y("Logged out");case"unauthorized":t="error",n=n||"Unauthorized.";break;case"error":t="error",n=n||"Unknown error.";break;case"success":t="success",n=n||"";break;default:t="error",n=n||"Invalid AJAX response."}return r&&(i=Object.assign({},d.default.options),Object.keys(r).forEach(function(e){d.default.options[e]=r[e]})),n&&(p.default||!p.default&&"error"!==t)&&d.default["success"===t?"success":"error"](n),r&&(d.default.options=i),e}function s(e){if(v)return!0;var t=e.stack?"
"+e.stack+"
":"";d.default.error("Fetch Failed:
"+e.message+" "+t),console.error(e.message+" at "+e.stack)}Object.defineProperty(t,"__esModule",{value:!0}),t.parseStatus=i,t.parseJSON=a,t.userFeedback=o,t.userFeedbackError=s;var l=n(1),c=r(l),u=n(338),d=r(u),f=n(341),p=r(f),h=n(342),m=n(343),g=r(m),v=!1,y=function e(t){var e=new Error(t.statusText||t||"");return e.response=t,e};(0,c.default)(e).on("beforeunload._ajax",function(){v=!0})}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(339),a=r(i);a.default.options.positionClass="toast-top-right",a.default.options.preventDuplicates=!0,t.default=a.default},,,function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),o=n(341),s=r(o),l=(0,a.default)("#offline-status");(0,a.default)(window).on("offline",function(){l.slideDown()}),(0,a.default)(window).on("online",function(){l.slideUp()}),(0,a.default)(document).ready(function(){s.default||l.slideDown()}),t.default="undefined"==typeof e.navigator.onLine||e.navigator.onLine}).call(t,function(){return this}())},function(e,t){e.exports=GravAdmin},function(e,t,n){function r(e,t){return e=i(e),t=t||a,o(s(e,t),t)}var i=n(344),a=n(345),o=n(346),s=n(347);e.exports=r},function(e,t){function n(e){return null==e?"":e.toString()}e.exports=n},function(e,t){e.exports=[" ","\n","\r","\t","\f","\v"," "," ","᠎"," "," "," "," "," "," "," "," "," "," "," ","\u2028","\u2029"," "," "," "]},function(e,t,n){function r(e,t){e=i(e),t=t||a;for(var n,r,o=0,s=e.length,l=t.length,c=!0;c&&o=s?"":e.substr(o,s)}var i=n(344),a=n(345);e.exports=r},function(e,t,n){function r(e,t){e=i(e),t=t||a;for(var n,r,o=e.length-1,s=t.length,l=!0;l&&o>=0;)for(l=!1,n=-1,r=e.charAt(o);++n=0?e.substring(0,o+1):""}var i=n(344),a=n(345);e.exports=r},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,l=0;l0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){(function(e){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.setPayload(t),this.task="task"+u.config.param_sep}return a(e,[{key:"setPayload",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.payload=e,this}},{key:"fetch",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return p.Instance.fetch(function(t){return e.setPayload(t)},t),this}},{key:"maintenance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"hide",t=(0,s.default)("#updates [data-update-packages]");return t["show"===e?"fadeIn":"fadeOut"](),"hide"===e&&(0,s.default)(".badges.with-updates").removeClass("with-updates").find(".badge.updates").remove(),this}},{key:"grav",value:function(){var e=this.payload.grav;if(e&&e.isUpdatable){var t=this.task,n="";n+=e.isSymlink?'':'",n+="\n Grav v"+e.available+" "+u.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+'! ('+u.translations.PLUGIN_ADMIN.CURRENT+" v"+e.version+")\n ";var r=(0,s.default)("[data-gpm-grav]").removeClass("hidden");r.is(":empty")&&r.hide(),r.addClass("grav").html(""+n).slideDown(150).parent("#messages").addClass("default-box-shadow")}return(0,s.default)("#grav-update-button").on("click",function(){(0,s.default)(this).html(u.translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT+" "+(0,f.default)(e.assets["grav-update"].size)+"..")}),this}},{key:"resources",value:function(){if(!this.payload||!this.payload.resources||!this.payload.resources.total)return this.maintenance("hide");var e=!0,t=["plugins","themes"],n=["plugin","theme"],r=this.payload.resources,i=r.plugins,a=r.themes;return this.payload.resources.total?([i,a].forEach(function(r,i){if(r&&!Array.isArray(r)){var a=Object.keys(r).length,o=t[i];(0,s.default)('#admin-menu a[href$="/'+t[i]+'"]').find(".badges").addClass("with-updates").find(".badge.updates").text(a);var l="";l="plugins"===o?u.translations.PLUGIN_ADMIN.PLUGINS:u.translations.PLUGIN_ADMIN.THEMES;var d=(0,s.default)(".grav-update."+o);d.css("display","block").html('\n

\n '+u.translations.PLUGIN_ADMIN.UPDATE+" "+u.translations.PLUGIN_ADMIN.ALL+" "+l+'\n \n '+a+" "+u.translations.PLUGIN_ADMIN.OF_YOUR+" "+l.toLowerCase()+" "+u.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE+"\n

\n ");var f=(0,s.default)("[data-update-packages]").attr("data-packages-slugs")||"";f=f?f.split(","):[];var p=(0,c.default)(f.concat(Object.keys(r))).join();(0,s.default)("[data-update-packages]").attr("data-packages-slugs",""+p),Object.keys(r).forEach(function(t){var a=(0,s.default)("[data-gpm-"+n[i]+'="'+t+'"]'),l=a.find(".gpm-name"),c=l.find("a"),d=a.parents(".content-wrapper");if("plugins"!==o||l.find(".badge.update").length?"themes"===o&&(l.append('"),d.addClass("has-updates")):(l.append(''+u.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE+"!"),d.addClass("has-updates")),a.length){var f=(0,s.default)(".grav-update."+n[i]);if(f.length){var p="testing"===r[t].type?'test release':"";f.html('\n

\n '+u.translations.PLUGIN_ADMIN.UPDATE+" "+(n[i].charAt(0).toUpperCase()+n[i].substr(1).toLowerCase())+'\n \n v'+r[t].available+" "+p+" "+u.translations.PLUGIN_ADMIN.OF_THIS+" "+n[i]+" "+u.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+"!\n

\n ").css("display","block"),e=!1}}}),(0,s.default)("[data-update-packages]").removeClass("hidden")}}),(0,s.default)(".content-wrapper").addClass("updates-checked"),void(e||(0,s.default)(".warning-reinstall-not-latest-release").removeClass("hidden"))):this}}]),e}();t.default=y;var _=new y;t.Instance=_,t.Notifications=m.default,t.Feed=v.default,p.Instance.on("fetched",function(e,t){_.setPayload(e.payload||{}),_.grav().resources()}),"1"===u.config.enable_auto_updates_check&&p.Instance.fetch()},function(e,t,n){function r(e,t){return t=t||i,a(e,function(e,n,r){for(var i=r.length;++n0&&void 0!==arguments[0]?arguments[0]:{},n=t.filter,r=void 0===n?f():n,i=t.refresh,a=void 0!==i&&i;if(!d())return!1;var o=(0,s.default)("#notifications"),c=o.find(".widget-loader"),p=o.find(".widget-content > ul");c.find("div").remove(),c.find(".fa-warning").removeClass("fa-warning").addClass("fa-refresh fa-spin"),c.show(),p.hide();var h=function(t){var n=t.notifications;(0,s.default)("#notifications").find(".widget-content > ul").empty(),n&&Object.keys(n).forEach(function(t){return e.processLocation(t,n[t])})};(0,u.default)(l.config.base_url_relative+"/task"+l.config.param_sep+"getNotifications",{method:"post", -body:{refresh:a,filter:r}},function(e){h(e)}).catch(function(){var e=(0,s.default)("#notifications .widget-content");e.find(".widget-loader").find("div").remove(),e.find(".widget-loader").append("
Failed to retrieve notifications
").find(".fa-spin").removeClass("fa-spin fa-refresh").addClass("fa-warning")})}}],[{key:"addShowAllInFeed",value:function(){(0,s.default)("#notifications ul").append('
  • Show all
  • ')}},{key:"showNotificationInFeed",value:function(t){var n=(0,s.default)("#notifications").removeClass("hidden"),r=n.find(".widget-loader").hide(),i=n.find(".widget-content > ul").show();r.find("div").remove(),r.find(".fa-warning").removeClass("fa-warning").addClass("fa-refresh fa-spin"),i.append(t).find("li:nth-child(n+11)").addClass("hidden"),i.find("li.hidden").length&&e.addShowAllInFeed()}},{key:"showNotificationInTop",value:function(e){var t=(0,s.default)(".top-notifications-container"),n=(0,s.default)("
    ").html(e);t.removeClass("hidden").append(n.children()),n.children().slideDown(150)}},{key:"showNotificationInDashboard",value:function(e){var t=(0,s.default)(".dashboard-notifications-container"),n=(0,s.default)("
    ").html(e);t.removeClass("hidden").append(n.children()),n.children().slideDown(150)}},{key:"showNotificationInPlugins",value:function(e){var t=(0,s.default)(".plugins-notifications-container"),n=(0,s.default)("
    ").html(e);t.removeClass("hidden").append(n.children()),n.children().slideDown(150)}},{key:"showNotificationInThemes",value:function(e){var t=(0,s.default)(".themes-notifications-container"),n=(0,s.default)("
    ").html(e);t.removeClass("hidden").append(n.children()),n.children().slideDown(150)}},{key:"processLocation",value:function(t,n){switch(t){case"feed":e.showNotificationInFeed(n);break;case"top":n.read||e.showNotificationInTop(n);break;case"dashboard":n.read||e.showNotificationInDashboard(n);break;case"plugins":n.read||e.showNotificationInPlugins(n);break;case"themes":n.read||e.showNotificationInThemes(n)}}}]),e}(),h=new p;t.default=h,d()&&(h.fetch(),(0,s.default)(document).on("click",'[data-notification-action="hide-notification"]',function(e){var t=(0,s.default)(e.currentTarget),n=t.parent();n.slideUp(function(){return n.remove()})}),(0,s.default)(document).on("click",'[data-notification-action="show-all-notifications"]',function(e){(0,s.default)("#notifications .show-all").hide(),(0,s.default)("#notifications .hidden").removeClass("hidden")}),(0,s.default)(document).on("click",'[data-refresh="notifications"]',function(e){e.preventDefault(),h.fetch({filter:["feed"],refresh:!0})}))},function(e,t,n){(function(e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(337),i=n(342),a=void 0,o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("function"==typeof n&&(o=n,n={}),n.method&&"post"===n.method){var s=new FormData;n.body=Object.assign({"admin-nonce":i.config.admin_nonce},n.body||{}),Object.keys(n.body).map(function(e){return s.append(e,n.body[e])}),n.body=s}return n=Object.assign({credentials:"same-origin",headers:{Accept:"application/json"}},n),e(t,n).then(function(e){return a=e,e}).then(r.parseStatus).then(r.parseJSON).then(r.userFeedback).then(function(e){return o(e,a)}).catch(r.userFeedbackError)};t.default=o}).call(t,n(5))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};(0,u.default)(d,{method:"post",body:{refresh:t}},function(t){e.data=t,n(t)})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,s.default)("#news-feed .widget-content");if(t.length){var n=t.find(".widget-loader");n.find("div").remove(),n.find(".fa-warning").removeClass("fa-warning").addClass("fa-refresh fa-spin"),n.show(),t.find("> ul").hide(),!this.data||this.data.error||e?this.fetch(e,this.updateContent.bind(this)):this.updateContent()}}},{key:"updateContent",value:function(){var e=(0,s.default)("#news-feed .widget-content");if(e.length){var t=e.find(".widget-loader").hide(),n=e.find("> ul").empty().show();return this.data.error||"error"===this.data.status?(t.show().find("div").remove(),t.find(".fa-refresh").removeClass("fa-refresh fa-spin").addClass("fa-warning"),void t.append("
    "+(this.data.error?this.data.error.message:this.data.message||"Unable to download news feed")+"
    ")):void(this.data&&this.data.feed_data&&n.append(this.data.feed_data))}}}]),e}(),p=new f;(0,s.default)(document).ready(function(){return p.refresh()}),(0,s.default)(document).on("click",'[data-refresh="feed"]',function(e){e.preventDefault(),p.refresh(!0)}),t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(4),s=n(342),l=n(338),c=r(l);(0,a.default)("[data-gpm-checkupdates]").on("click",function(){var e=(0,a.default)(this);e.find("i").addClass("fa-spin"),o.Instance.fetch(function(t){e.find("i").removeClass("fa-spin");var n=t.payload;if(n)if(n.grav.isUpdatable||n.resources.total){var r=n.grav.isUpdatable?"Grav v"+n.grav.available:"",i=n.resources.total?n.resources.total+" "+s.translations.PLUGIN_ADMIN.UPDATES_ARE_AVAILABLE:"";i||(r+=" "+s.translations.PLUGIN_ADMIN.IS_AVAILABLE_FOR_UPDATE),c.default.info(r+(r&&i?" "+s.translations.PLUGIN_ADMIN.AND+" ":"")+i)}else c.default.success(s.translations.PLUGIN_ADMIN.EVERYTHING_UP_TO_DATE)},!0)})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(365),s=r(o);(0,a.default)("body").on("click","[data-maintenance-update]",function(){var e=(0,a.default)(this),t=e.data("maintenanceUpdate");e.attr("disabled","disabled").find("> .fa").removeClass("fa-cloud-download").addClass("fa-refresh fa-spin"),(0,s.default)(t,function(t){"updategrav"===t.type&&((0,a.default)("[data-gpm-grav]").remove(),(0,a.default)("#footer .grav-version").html(t.version)),e.removeAttr("disabled").find("> .fa").removeClass("fa-refresh fa-spin").addClass("fa-cloud-download")})})},function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r),a=n(365),o=t(a),s=(0,i.default)('input[type="radio"][name="channel-switch"]');s&&s.on("change",function(t){var n=(0,i.default)(t.target),r=""+n.parent("[data-url]").data("url");(0,o.default)(r,{method:"post",body:{task:"gpmRelease",release:n.val()}},function(t){t.reload&&e.location.reload()})})}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(371),a=r(i),o=n(373);n(374),t.default={Chart:{Chart:a.default,UpdatesChart:i.UpdatesChart,Instances:i.Instances},Cache:o.Instance}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(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}function a(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)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instances=t.UpdatesChart=t.defaults=void 0;var s=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;if(void 0!==o)return o.call(r)},l=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(o(this,e),this.element=(0,u.default)(t)||[],this.element[0]){var a=(this.element.data("chart-type")||"pie").toLowerCase();this.type=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),r=Object.assign({},g.options[this.type],r),i=Object.assign({},g.data,i),Object.assign(this,{options:r,data:i}),this.chart=f.default[this.type](this.element.find(".ct-chart").empty()[0],this.data,this.options),this.chart.on("created",function(){n.element.find(".hidden").removeClass("hidden"),n.element.find(".ct-label").each(function(e,t){t=(0,u.default)(t);var n=t.html().replace("<","<").replace(">",">");t.html(n)})})}}return l(e,[{key:"updateData",value:function(e){Object.assign(this.data,e),this.chart.update(this.data)}}]),e}();t.default=v;var y=t.UpdatesChart=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o(this,t);var a=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));return a.chart.on("draw",function(e){return a.draw(e)}),h.Instance.on("fetched",function(e){if(e.payload){var t=e.payload.grav,n=100*(e.payload.resources.total+(t.isUpdatable?1:0))/(e.payload.installed+(t.isUpdatable?1:0)),r=100-n;a.updateData({series:[r,n]}),e.payload.resources.total&&m.Instance.maintenance("show")}}),a}return a(t,e),l(t,[{key:"draw",value:function(e){if(!e.index){var t=p.translations.PLUGIN_ADMIN[100===e.value?"FULLY_UPDATED":"UPDATES_AVAILABLE"];this.element.find(".numeric span").text(Math.round(e.value)+"%"),this.element.find(".js__updates-available-description").html(t),this.element.find(".hidden").removeClass("hidden")}}},{key:"updateData",value:function(e){s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateData",this).call(this,e),this.data.series[0]<100&&this.element.closest("#updates").find("[data-update-packages]").fadeIn()}}]),t}(v),_={};(0,u.default)("[data-chart-name]").each(function(){var e=(0,u.default)(this),t=e.data("chart-name")||"",n=e.data("chart-options")||{},r=e.data("chart-data")||{};"updates"===t?_[t]=new y(e,n,r):_[t]=new v(e,n,r)});t.Instances=_},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";return e&&(e="cleartype:"+e+"/"),l.config.base_url_relative+"/cache.json/task"+l.config.param_sep+"clearCache/"+e+"admin-nonce"+l.config.param_sep+l.config.admin_nonce},f=function(){function e(){var t=this;i(this,e),this.element=(0,s.default)("[data-clear-cache]"),(0,s.default)("body").on("click","[data-clear-cache]",function(e){return t.clear(e,e.target)})}return a(e,[{key:"clear",value:function(e,t){var n=this,r="";e&&e.preventDefault&&e.preventDefault(),"string"==typeof e&&(r=e),t=t?(0,s.default)(t):(0,s.default)('[data-clear-cache-type="'+r+'"]'),r=r||(0,s.default)(t).data("clear-cache-type")||"";var i=t.data("clearCache")||d(r);this.disable(),(0,u.default)(i,function(){return n.enable()})}},{key:"enable",value:function(){this.element.removeAttr("disabled").find("> .fa").removeClass("fa-refresh fa-spin fa-retweet").addClass("fa-retweet")}},{key:"disable",value:function(){this.element.attr("disabled","disabled").find("> .fa").removeClass("fa-retweet").addClass("fa-refresh fa-spin")}}]),e}();t.default=f;var p=new f;t.Instance=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(342),s=n(365),l=r(s),c=n(371);(0,a.default)('[data-backup][data-ajax*="backup/"]').on("click",function(){var e=(0,a.default)(this),t=e.data("ajax"),n=e.closest(".dropdown-menu");(n.length?n:e).closest(".button-group").find("> button:first").attr("disabled","disabled").find("> .fa").removeClass("fa-life-ring").addClass("fa-spin fa-refresh"),(0,l.default)(t,function(){c.Instances&&c.Instances.backups&&(c.Instances.backups.updateData({series:[0,100]}),c.Instances.backups.element.find(".numeric").html("0 "+o.translations.PLUGIN_ADMIN.DAYS.toLowerCase()+"")),(n.length?n:e).closest(".button-group").find("> button:first").removeAttr("disabled").find("> .fa").removeClass("fa-spin fa-refresh").addClass("fa-life-ring")})}),(0,a.default)('[data-backup][data-ajax*="backupDelete"]').on("click",function(){var e=(0,a.default)(this),t=e.data("ajax"),n=e.closest("tr");n.addClass("deleting"),(0,l.default)(t,function(e){"success"===e.status?n.remove():n.removeClass("deleting")})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i),o=n(376),s=r(o),l=n(377),c=r(l),u=n(385),d=r(u),f=function(e,t){return("000"+e).substr(-t)},p=null,h=(0,a.default)("#ordering");h.length&&(p=new s.default(h.get(0),{filter:".ignore",onUpdate:function(){var e=[],t=h.children(),n=(t.length+"").split("").length;t.each(function(t,r){r=(0,a.default)(r),e.push(r.data("id")),r.find(".page-order").text(f(t+1,n)+".")}),(0,a.default)("[data-order]").val(e.join(","))}}),(0,a.default)(document).on("input",'[name="data[folder]"]',function(e){var t=(0,a.default)(e.currentTarget),n=(0,a.default)("[data-id][data-active-id]");n.data("id",t.val()),p.options.onUpdate()})),t.default={Ordering:p,Page:d.default,PageFilters:{PageFilters:c.default,Instance:l.Instance}}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var 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},o=function(){function e(e,t){for(var n=0;n=0?i=setTimeout(r,t-c):(i=null,n||(l=e.apply(o,a),o=a=null))}var i,a,o,s,l;null==t&&(t=100);var c=function(){o=this,a=arguments,s=Date.now();var c=n&&!i;return i||(i=setTimeout(r,t)),c&&(l=e.apply(o,a),o=a=null),l};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(l=e.apply(o,a),o=a=null,clearTimeout(i),i=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0;i(this,e),this.query=t,this.elements=(0,s.default)(void 0!==r?r:this.query),this.session=JSON.parse(sessionStorage.getItem(l)||"{}"),this.elements.length&&(this.restore(),this.elements.find(".page-icon").on("click",function(e){return n.toggle(e.target)}),this.elements.data("tree_init",1),(0,s.default)("[data-page-toggleall]").on("click",function(e){var t=(0,s.default)(e.target).closest("[data-page-toggleall]"),r=t.data("page-toggleall");n[r]()}))}return a(e,[{key:"reload",value:function(){var e=(0,s.default)(this.query).filter(function(e,t){return!(0,s.default)(t).data("tree_init")});e.length&&this.constructor(this.query,e)}},{key:"toggle",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"string"==typeof e&&(e=(0,s.default)('[data-nav-id="'+e+'"]').find('[data-toggle="children"]')),e=(0,s.default)(e||this.elements),e.each(function(e,r){r=(0,s.default)(r);var i=t.getState(r.closest('[data-toggle="children"]'));t[i.isOpen?"collapse":"expand"](i.id,n)})}},{key:"collapse",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"string"==typeof e&&(e=(0,s.default)('[data-nav-id="'+e+'"]').find('[data-toggle="children"]')),e=(0,s.default)(e||this.elements),e.each(function(e,r){r=(0,s.default)(r);var i=t.getState(r);i.isOpen&&(i.children.hide(),i.icon.removeClass("children-open").addClass("children-closed"),n||delete t.session[i.id])}),n||this.save()}},{key:"expand",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"==typeof e){var r=(0,s.default)('[data-nav-id="'+e+'"]'),i=r.parents("[data-nav-id]");if(i.length)return i=i.find('[data-toggle="children"]:first'),i=i.add(r.find('[data-toggle="children"]:first')),this.expand(i,n);e=r.find('[data-toggle="children"]:first')}e=(0,s.default)(e||this.elements),e.each(function(e,r){r=(0,s.default)(r);var i=t.getState(r);i.isOpen||(i.children.show(),i.icon.removeClass("children-closed").addClass("children-open"),n||(t.session[i.id]=1))}),n||this.save()}},{key:"restore",value:function(){var e=this;this.collapse(null,!0),Object.keys(this.session).forEach(function(t){e.expand(t,"no-store")})}},{key:"save",value:function(){return sessionStorage.setItem(l,JSON.stringify(this.session))}},{key:"getState",value:function(e){return e=(0,s.default)(e),{id:e.closest("[data-nav-id]").data("nav-id"),children:e.closest("li.page-item").find("ul:first"),icon:e.find(".page-icon"),get isOpen(){return this.icon.hasClass("children-open")}}}}]),e}();t.default=c;var u=new c('[data-toggle="children"]');t.Instance=u},function(e,t){"use strict";!function(){function e(){var e="localStoragePollyfill";try{return localStorage.setItem(e,e),localStorage.removeItem(e),sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}if(!e())try{Storage.prototype._data={},Storage.prototype.setItem=function(e,t){return this._data[e]=String(t),this._data[e]},Storage.prototype.getItem=function(e){return this._data.hasOwnProperty(e)?this._data[e]:void 0},Storage.prototype.removeItem=function(e){return delete this._data[e]},Storage.prototype.clear=function(){return this._data={},this._data}}catch(e){console.error("localStorage pollyfill error: ",e)}}()},,,,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(381),a=r(i);a.default.define("required-fix",function(e){var t=this;this.refreshValidityState=function(){if(!t.isRequired)return!1;var e=!t.items.length;t.isInvalid=e,e?(t.$control_input.attr("required",""),t.$input.removeAttr("required")):(t.$control_input.removeAttr("required"),t.$input.attr("required"))}})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=r(i);n(386),n(389),n(390),n(391),n(392);var o=n(393),s=r(o);n(463);var l=(0,a.default)('input[type="radio"][name="mode-switch"]');if(l){var c=l.closest(":checked").data("leave-url"),u=(0,a.default)('');l.parent().append(u),l.siblings("label").on("mousedown touchdown",function(t){t.preventDefault();var n=(0,a.default)('[data-remodal-id="changes"] [data-leave-action="continue"]');n.one("click",function(){(0,a.default)(e).on("beforeunload._grav"),u.off("click._grav"),(0,a.default)(t.target).trigger("click")}),u.trigger("click._grav")}),l.on("change",function(e){var t=(0,a.default)(e.target);c=t.data("leave-url"),setTimeout(function(){return u.attr("href",c).get(0).click()},5)})}t.default={Media:{PageMedia:s.default,PageMediaInstances:o.Instance}}}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);n(387);var o=n(365),s=r(o),l=n(342),c=!1,u=(0,a.default)('[data-remodal-id="modal"] input[name="data[folder]"], [data-remodal-id="modular"] input[name="data[folder]"]'),d=(0,a.default)('[data-remodal-id="modal"] input[name="data[title]"], [data-remodal-id="modular"] input[name="data[title]"]'),f=function(e,t){t=(0,a.default)(t);var n='[data-remodal-id="'+t.closest("[data-remodal-id]").data("remodal-id")+'"]';return{title:"title"===e?(0,a.default)(t):(0,a.default)(n+' input[name="data[title]"]'),folder:"folder"===e?(0,a.default)(t):(0,a.default)(n+' input[name="data[folder]"]')}};d.on("input focus blur",function(e){if(c)return!0;var t=f("title",e.currentTarget),n=a.default.slugify(t.title.val(),{custom:{"'":""}});t.folder.val(n)}),u.on("input",function(e){var t=f("folder",e.currentTarget),n=t.folder.get(0),r=t.folder.val(),i={start:n.selectionStart,end:n.selectionEnd};r=r.toLowerCase().replace(/\s/g,"-").replace(/[^a-z0-9_\-]/g,""),t.folder.val(r),c=!!r,n.setSelectionRange(i.start,i.end)}),u.on("focus blur",function(e){return f("title",e.currentTarget).title.trigger("input")}),(0,a.default)(document).on("change",'[name="data[route]"]',function(e){var t=(0,a.default)(e.currentTarget).val(),n=(0,a.default)('[name="data[name]"]'),r=l.config.base_url_relative+"/ajax.json/task"+l.config.param_sep+"getChildTypes";0!==n.length&&(0,s.default)(r,{method:"post",body:{rawroute:t}},function(e){var t=e.child_type;""!==t&&"default"!==t&&(n.val(t),n.data("selectize").setValue(t))})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(388),s=r(o);a.default.expr[":"].noparents=a.default.expr.createPseudo(function(e){return function(t){return(0,a.default)(t).parents(e).length<1}}),a.default.fn.slugify=function(e,t){return(void 0).each(function(e){var n=(0,a.default)(e),r=(0,a.default)(r);n.on("keyup change",function(){n.data("locked",""!==n.val()&&void 0!==n.val())}),r.on("keyup change",function(){if(n.data("locked")===!0)return!0;var e=n.is("input")||n.is("textarea");n[e?"val":"text"](a.default.slugify(r.val(),t))})})},a.default.slugify=function(e,t){return t=a.default.extend({},a.default.slugify.options,t),t.lang=t.lang||(0,a.default)("html").prop("lang"),"function"==typeof t.preSlug&&(e=t.preSlug(e)),e=t.slugFunc(e,t),"function"==typeof t.postSlug&&(e=t.postSlug(e)),e},a.default.slugify.options={preSlug:null,postSlug:null,slugFunc:function(e,t){return(0,s.default)(e,t)}}},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);(0,a.default)(document).on("click",'[data-page-move] button[name="task"][value="save"]',function(e){var t=(0,a.default)(e.currentTarget).closest("[data-remodal-id]"),n=t.data("parents")||{},r=n.finder;if(!n||!r)return!0;var i=n.field,o=n.parentLabel,s=n.parentName,l=r.findLastActive().item[0],c=l._item[r.config.valueKey],u=l._item[r.config.labelKey];i.val(c),o.text(c),s.text(u),r.config.defaultPath=c,(0,a.default)("
    ").css({backgroundColor:"rgba(255, 255, 255, 0.1)",position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:15e3}).appendTo((0,a.default)("body"))})},function(e,t,n){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r);(0,i.default)(document).on("click",'[data-remodal-target="delete"]',function(){var e=(0,i.default)('[data-remodal-id="delete"] [data-delete-action]'),t=(0,i.default)(this).data("delete-url");e.data("delete-action",t)}),(0,i.default)(document).on("click","[data-delete-action]",function(){var t=i.default.remodal.lookup[(0,i.default)('[data-remodal-id="delete"]').data("remodal")];e.location.href=(0,i.default)(this).data("delete-action"),t.close()})}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);(0,a.default)(document).on("click",".dz-unset",function(){var e=(0,a.default)(this).closest(".files-upload");(0,a.default)(this).closest(".dz-image-preview").remove();var t=(0,a.default)(this).closest(".dz-image-preview").find("[data-dz-name]").text().trim(),n=JSON.parse(e.find('input[data-grav-field="hidden"]').val())||{},r={};a.default.each(n,function(e,n){e.endsWith(t)||(r[e]=n)}),e.find('input[data-grav-field="hidden"]').val(JSON.stringify(r))})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);(0,a.default)(".disable-after-click").on("click",function(){(0,a.default)(this).addClass("pointer-events-disabled")})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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}function o(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var s=function(){function e(e,t){for(var n=0;n\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    '+m.translations.PLUGIN_ADMIN.DELETE+'\n \n '+m.translations.PLUGIN_ADMIN.VIEW+'\n '+m.translations.PLUGIN_ADMIN.INSERT+"\n
    ").trim(),b=function(t){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,r=void 0===t?"#grav-dropzone":t,o=e.options,s=void 0===o?{}:o; -i(this,n),s=Object.assign(s,{previewTemplate:_});var l=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,{container:r,options:s}));if(!l.container.length)return a(l);l.urls={fetch:l.container.data("media-url")+"/task"+m.config.param_sep+"listmedia",add:l.container.data("media-url")+"/task"+m.config.param_sep+"addmedia",delete:l.container.data("media-url")+"/task"+m.config.param_sep+"delmedia"},l.dropzone.options.url=l.urls.add,("undefined"==typeof l.options.fetchMedia||l.options.fetchMedia)&&l.fetchMedia(),("undefined"==typeof l.options.attachDragDrop||l.options.attachDragDrop)&&l.attachDragDrop();var c=(0,u.default)('[name="'+l.container.data("dropzone-field")+'"]');return c.length&&(l.sortable=new y.default(l.container.get(0),{animation:150,setData:function(e,t){t=(0,u.default)(t);var n=encodeURI(t.find(".dz-filename").text()),r=(0,p.UriToMarkdown)(n);l.dropzone.disable(),t.addClass("hide-backface"),e.effectAllowed="copy",e.setData("text",r)},onSort:function(){var e=[];l.container.find("[data-dz-name]").each(function(t,n){n=(0,u.default)(n);var r=n.text().trim();e.push(r)}),c.val(e.join(","))}})),l}return o(n,t),s(n,[{key:"fetchMedia",value:function(){var e=this,t=this.container.closest(".form-field").find('[name="data[header][media_order]"]').val(),n={uri:this.getURI(),order:t},r=this.urls.fetch;(0,f.default)(r,{method:"post",body:n},function(t){var n=t.results;Object.keys(n).forEach(function(t){var r=n[t],i={name:t,size:r.size,accepted:!0,extras:r};e.dropzone.files.push(i),e.dropzone.options.addedfile.call(e.dropzone,i),e.dropzone.options.thumbnail.call(e.dropzone,i,r.url)}),e.container.find(".dz-preview").prop("draggable","true")})}},{key:"onDropzoneSending",value:function(e,t,n){n.append("name",this.options.dotNotation||e.name),n.append("admin-nonce",m.config.admin_nonce),n.append("uri",this.getURI())}},{key:"onDropzoneComplete",value:function(e){l(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"onDropzoneComplete",this).call(this,e),this.sortable.options.onSort(),(0,u.default)(".dz-preview").prop("draggable","true")}},{key:"onDropzoneRemovedFile",value:function(e){for(var t,r=arguments.length,i=Array(r>1?r-1:0),a=1;a');var c=s.find(".meta-content").html("
      ").find("ul");Object.keys(o.metadata).forEach(function(e){c.append("
    • "+(e?e+":":"")+" "+o.metadata[e]+"
    • ")}),l.open()}),this.container.delegate(".dz-preview","dragstart",function(e){var n=(0,u.default)(e.currentTarget),r=encodeURI(n.find(".dz-filename").text()),i=(0,p.UriToMarkdown)(r);t.dropzone.disable(),n.addClass("hide-backface"),e.originalEvent.dataTransfer.effectAllowed="copy",e.originalEvent.dataTransfer.setData("text",i)}),this.container.delegate(".dz-preview","dragend",function(e){var n=(0,u.default)(e.currentTarget);t.dropzone.enable(),n.removeClass("hide-backface")})}}]),n}(h.default);t.default=b;t.Instance=new b}).call(t,function(){return this}())},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return e=e.replace(/@3x|@2x|@1x/,""),e=e.replace(/\(/g,"%28"),e=e.replace(/\)/g,"%29"),e.match(/\.(jpe?g|png|gif|svg|mp4|webm|ogv|mov)$/i)?"![]("+e+")":"["+decodeURI(e)+"]("+e+")"}Object.defineProperty(t,"__esModule",{value:!0}),t.Instances=void 0;var o=function(){function e(e,t){for(var n=0;n"),dictRemoveFileConfirmation:"[placeholder]",previewTemplate:('\n ").trim()};e.EXIF=f.default;var y=function(e,t,n){var r=n.resolution;if(!r)return t();var i=new FileReader,a="",o=r.min&&(r.min.width||r.min.height),s=r.max&&(r.max.width||r.max.height);return o||!n.resizeWidth&&!n.resizeHeight&&s?(i.onload=function(e){var i=new Image;i.src=e.target.result,i.onload=function(){var e=this;return r.min&&Object.keys(r.min).forEach(function(t){r.min[t]&&e[t]r.max[t]&&(a+=m.translations.PLUGIN_FORM.RESOLUTION_MAX.replace(/{{attr}}/g,t).replace(/{{max}}/g,r.max[t]))}),a?t(a):t()}},void i.readAsDataURL(e)):a?t(a):t()},_=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.container,a=void 0===r?".dropzone.files-upload":r,o=n.options,s=void 0===o?{}:o;i(this,t),this.container=(0,l.default)(a),this.container.length&&(this.urls={},this.customPost=this.container.data("filePostAdd")||{},this.options=Object.assign({},g,v,{klass:this,url:this.container.data("file-url-add")||m.config.current_url,acceptedFiles:this.container.data("media-types"),init:this.initDropzone},this.container.data("dropzone-options"),s),this.options=Object.assign({},this.options,{accept:function(e,t){y(e,t,this.options)}}),this.dropzone=new u.default(a,this.options),this.dropzone.on("complete",this.onDropzoneComplete.bind(this)),this.dropzone.on("success",this.onDropzoneSuccess.bind(this)),this.dropzone.on("removedfile",this.onDropzoneRemovedFile.bind(this)),this.dropzone.on("sending",this.onDropzoneSending.bind(this)),this.dropzone.on("error",this.onDropzoneError.bind(this)),this.container.on("mouseenter","[data-dz-view]",function(t){var n=JSON.parse(e.container.find('[name][type="hidden"]').val()||"{}"),r=(0,l.default)(t.currentTarget),i=r.parent(".dz-preview").find(".dz-filename"),a=encodeURI(i.text()),o=Object.keys(n).filter(function(e){return n[e].name===a}).shift();r.attr("href",m.config.base_url_simple+"/"+o)}))}return o(t,[{key:"initDropzone",value:function(){var e=this,t=this.options.klass.container.find("[data-file]"),n=this;t.length&&t.each(function(t,r){r=(0,l.default)(r);var i=r.data("file"),a={name:i.name,size:i.size,type:i.type,status:u.default.ADDED,accepted:!0,url:e.options.url,removeUrl:i.remove};n.files.push(a),n.options.addedfile.call(n,a),a.type.match(/^image\//)&&(n.options.thumbnail.call(n,a,i.path),n.createThumbnailFromUrl(a,i.path)),r.remove()})}},{key:"getURI",value:function(){return this.container.data("mediaUri")||""}},{key:"onDropzoneSending",value:function(e,t,n){var r=this;Object.keys(this.customPost).length?Object.keys(this.customPost).forEach(function(e){n.append(e,r.customPost[e])}):(n.append("name",this.options.dotNotation),n.append("task","filesupload"),n.append("uri",this.getURI())),n.append("admin-nonce",m.config.admin_nonce)}},{key:"onDropzoneSuccess",value:function(t,n,r){if(n="string"==typeof n?JSON.parse(n):n,this.options.reloadPage&&e.location.reload(),n.session){t.sessionParams=n.session,t.removeUrl=this.options.url;var i=this.container.find('[name][type="hidden"]'),a=i.val();i.val(a+" ")}return this.handleError({file:t,data:n,mode:"removeFile",msg:"

      "+m.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD+" "+t.name+"

      \n
      "+n.message+"
      "})}},{key:"onDropzoneComplete",value:function(t){if(!t.accepted&&!t.rejected){var n={status:"error",message:m.translations.PLUGIN_ADMIN.FILE_UNSUPPORTED+": "+t.name.match(/\..+/).join("")};return this.handleError({file:t,data:n,mode:"removeFile",msg:"

      "+m.translations.PLUGIN_ADMIN.FILE_ERROR_ADD+" "+t.name+"

      \n
      "+n.message+"
      "})}this.options.reloadPage&&e.location.reload()}},{key:"b64_to_utf8",value:function(e){return e=e.replace(/\s/g,""),decodeURIComponent(escape(window.atob(e)))}},{key:"onDropzoneRemovedFile",value:function(e){var t=this;if(e.accepted&&!e.rejected){var n=e.removeUrl||this.urls.delete||this.options.url,r=(n||"").match(/path:(.*)\//),i={filename:e.name,uri:this.getURI()};e.sessionParams&&(i.task="filessessionremove",i.session=e.sessionParams);var a=this.container.data("filePostRemove")||{};Object.keys(a).length&&(i={},Object.keys(a).forEach(function(e){i[e]=a[e]})),i.filename=e.name,i["admin-nonce"]=m.config.admin_nonce,(0,h.default)(n,{method:"post",body:i},function(){if(r){r=t.b64_to_utf8(r[1]);var e=t.container.find('[name][type="hidden"]'),n=JSON.parse(e.val()||"{}");delete n[r],e.val(JSON.stringify(n))}})}}},{key:"onDropzoneError",value:function(e,t,n){var r=n?t.error.message:t;return(0,l.default)(e.previewElement).find("[data-dz-errormessage]").html(r),this.handleError({file:e,data:{status:"error"},msg:"
      "+r+"
      "})}},{key:"handleError",value:function(e){var t=e.file,n=e.data,r=e.mode,i=e.msg;if("error"===n.status||"unauthorized"===n.status){switch(r){case"addBack":t instanceof File?this.dropzone.addFile.call(this.dropzone,t):(this.dropzone.files.push(t),this.dropzone.options.addedfile.call(this.dropzone,t),this.dropzone.options.thumbnail.call(this.dropzone,t,t.extras.url));break;case"removeFile":default:~this.dropzone.files.indexOf(t)&&(t.rejected=!0,this.dropzone.removeFile.call(this.dropzone,t,{silent:!0}))}var a=(0,l.default)('[data-remodal-id="generic"]');a.find(".error-content").html(i),l.default.remodal.lookup[a.data("remodal")].open()}}}]),t}();t.default=_;var b=[],w=(0,l.default)(),k=function(e,t){var n=(0,l.default)(t).find(".dropzone.files-upload");n.length&&n.each(function(e,t){t=(0,l.default)(t),~w.index(t)||x(t)})},x=function(e){e=(0,l.default)(e);var t=e.find('input[type="file"]'),n=e.data("grav-file-settings")||{};n.accept&&~n.accept.indexOf("*")&&(n.accept=[""]);var r={url:e.data("file-url-add")||(e.closest("form").attr("action")||m.config.current_url)+".json",paramName:n.paramName||"file",dotNotation:n.name||"file",acceptedFiles:n.accept?n.accept.join(","):t.attr("accept")||e.data("media-types"),maxFilesize:"undefined"!=typeof n.filesize?n.filesize:256,maxFiles:n.limit||null,resizeWidth:n.resizeWidth||null,resizeHeight:n.resizeHeight||null,resizeQuality:n.resizeQuality||null,accept:function(e,t){y(e,t,n)}};w=w.add(e),e=e[0],b.push(new _({container:e,options:r}))};t.Instances=function(){return(0,l.default)(".dropzone.files-upload").each(function(e,t){return x(t)}),(0,l.default)("body").on("mutation._grav",k),b}()}).call(t,function(){return this}())},,,function(e,t,r){var i,a;(function(){function r(e){return!!e.exifdata}function o(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var n=atob(e),r=n.length,i=new ArrayBuffer(r),a=new Uint8Array(i),o=0;o4?p:t+8,o=[],l=0;l4?p:t+8,g(e,a,f-1);case 3:if(1==f)return e.getUint16(t+8,!i);for(a=f>2?p:t+8,o=[],l=0;le.byteLength)return{};var a=f(e,t,t+i,E,r);if(a.Compression)switch(a.Compression){case 6:if(a.JpegIFOffset&&a.JpegIFByteCount){var o=t+a.JpegIFOffset,s=a.JpegIFByteCount;a.blob=new Blob([new Uint8Array(e.buffer,o,s)],{type:"image/jpeg"})}break;case 1:console.log("Thumbnail image format is TIFF, which is not implemented.");break;default:console.log("Unknown thumbnail image format '%s'",a.Compression)}else 2==a.PhotometricInterpretation&&console.log("Thumbnail image format is RGB, which is not implemented.");return a}function g(e,t,r){var i="";for(n=t;n")+8;s=s.substring(s.indexOf("0){t["@attributes"]={};for(var n=0;n0)for(var n=0;n\n
      \n
      \n
    \n '}}}]),a(e,[{key:"renderButtons",value:function(){var e=this,t={actions:"navigation",modes:"states"};["actions","modes"].forEach(function(n){e.ui.navigation.find(".grav-editor-"+n).empty().append("