Files
Grav-Admin-Plugin/themes/grav/js/admin.min.js

30 lines
546 KiB
JavaScript
Raw Normal View History

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),o=n(2),s=r(o),l=n(342),u=r(l),c=n(343),f=r(c),d=n(363),p=r(d),h=n(368),m=r(h),v=n(457),g=r(v),y=n(604),_=r(y);n(613),n(623);var b=n(624),w=n(331),x=r(w),k=n(358),S=r(k);n(625),n(626),n(638),n(639),n(640);var C=n(642),E=r(C);u.default.start(),e.setInterval(function(){y.Instance.update(),C.Instance.scroller.update()},150),(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:u.default,Dashboard:p.default,Pages:m.default,Forms:g.default,Scrollbar:{Scrollbar:_.default,Instance:y.Instance},Updates:{Updates:f.default,Notifications:c.Notifications,Feed:c.Feed,Instance:c.Instance},Sidebar:{Sidebar:E.default,Instance:C.Instance},MediaFilter:{MediaFilter:b.Filter,Instance:b.Instance},Utils:{request:S.default,toastr:x.default}}}).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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(330),l=n(335),u=n(341),c=function(t){function n(){var e=arguments.length>0&&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}(u.EventEmitter);t.default=c;t.Instance=new c}).call(t,n(3))},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):A
n*=4503599627370496,t=52-t,t>0){for(d(0,n),r=u;r>=7;)d(1e7,0),r-=7;for(d(m(10,r,1),0),r=t-1;r>=23;)p(1<<23),r-=23;p(1<<r),d(1,1),p(2),y=h()}else d(0,n),d(1<<-t,0),y=h()+o.call(f,u);return u>0?(s=y.length,y=g+(s<=u?"0."+o.call(f,u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u))):y=g+y,y}})},function(e,t,n){var r=n(37);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(41),i=n(38);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(11),i=n(10),a=n(92),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(11);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(11),i=n(7).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(11);r(r.S,"Number",{isInteger:n(98)})},function(e,t,n){var r=n(16),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(11);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(11),i=n(98),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(11);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(11);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(11),i=n(88);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(11),i=n(84);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(11),i=n(106),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(11),a=Math.asinh;i(i.S+i.F*!(a&&1/a(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(11),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(11),i=n(110);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(11);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(11),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(11),i=n(114);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(11);r(r.S,"Math",{fround:n(116)})},function(e,t,n){var r=n(110),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126),u=function(e){return e+1/a-1/a};e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),c=r(e);return i<l?c*u(i/l/o)*l*o:(t=(1+o/a)*i,n=t-(t-i),n>s||n!=n?c*(1/0):c*n)}},function(e,t,n){var r=n(11),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o<s;)n=i(arguments[o++]),l<n?(r=l/n,a=a*r*r+1,l=n):n>0?(r=n/l,a+=r*r):a+=n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(11),i=Math.imul;r(r.S+r.F*n(10)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,a=n&r,o=n&i;return 0|a*o+((n&r>>>16)*o+a*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(11);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(11);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=
return l.def(f(this,d),e,t)}},_=e.exports=n(222)(d,g,y,l,!0,!0);c(function(){return 7!=(new _).set((Object.freeze||Object)(v),7).get(v)})&&(r=l.getConstructor(g,d),s(r.prototype,y),o.NEED=!0,i(["delete","has","get","set"],function(e){var t=_.prototype,n=t[e];a(t,e,function(t,i){if(u(t)&&!h(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)})}))},function(e,t,n){"use strict";var r=n(218),i=n(25).getWeak,a=n(15),o=n(16),s=n(209),l=n(210),u=n(176),c=n(8),f=n(221),d=u(5),p=u(6),h=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},g=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e(function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,void 0!=r&&l(r,n,e[a],e)});return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return n===!0?m(f(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return n===!0?m(f(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return r===!0?m(e).set(t,n):r[e._i]=n,e},ufstore:m}},function(e,t,n){"use strict";var r=n(225),i=n(221),a="WeakSet";n(222)(a,function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,a),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(11),i=n(228),a=n(229),o=n(15),s=n(42),l=n(40),u=n(16),c=n(7).ArrayBuffer,f=n(211),d=a.ArrayBuffer,p=a.DataView,h=i.ABV&&c.isView,m=d.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,g,{isView:function(e){return h&&h(e)||u(e)&&v in e}}),r(r.P+r.U+r.F*n(10)(function(){return!new d(2).slice(1,void 0).byteLength}),g,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(f(this,d))(l(i-r)),u=new p(this),c=new p(a),h=0;r<i;)c.setUint8(h++,u.getUint8(r++));return a}}),n(196)(g)},function(e,t,n){for(var r,i=n(7),a=n(13),o=n(22),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,f=0,d=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<d;)(r=i[p[f++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){"use strict";function r(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?U(2,-24)-U(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for(e=q(e),e!=e||e===F?(i=e!=e?1:0,r=l):(r=V(B(e)/G),e*(a=U(2,-r))<1&&(r--,a*=2),e+=r+u>=1?c/a:c*U(2,1-u),e*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*U(2,t),r+=u):(i=e*U(2,u-1)*U(2,t),r=0));t>=8;o[f++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[f++]=255&r,r/=256,s-=8);return o[--f]|=128*d,o}function i(e,t,n){var r,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-F:F;r+=U(2,t),c-=o}return(u?-1:1)*r*U(2,c-t)}function a(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function o(e){return[255&e]}function s(e){return[255&e,e>>8&255]}function l(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function u(e){return r(e,52,8)}function c(e){return r(e,23,4)}function f(e,t,n){E(e[T],t,{get:function(){return this[n]}})}function d(e,t,n,r){var i=+n,a=S(i);if(a+t>e[Y])throw N(j);var o=e[K]._b,s=a+e[J],l=o.slice(s,s+t);return r?l:l.reverse()}function p(e,t,n,r,i,a){var o=+n,s=S(o);if(s+t>e[Y])throw N(j);for(var l=e[K]._b,u=s+e[J],c=r(+i),f=0;f<t;f++)l[u+f]=c[a?f:t-f-1]}var h=n(7),m=n(9),v=n(27),g=n(228),y=n(13),_=n(218),b=n(10),w=n(209),x=n(41),k=n(40),S=n(230),C=n(52).f,E=n(14).f,A=n(192),I=n(28),M="ArrayBuffer",O="DataView",T="prototype",P="Wrong length!",j="Wrong index!",D=h[M
t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function p(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function m(e){if(e){var t=e[w];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(_.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=g,t.done=!0,t};return r.next=r}}return{next:v}}function v(){return{value:g,done:!0}}var g,y=Object.prototype,_=y.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",x=b.asyncIterator||"@@asyncIterator",k=b.toStringTag||"@@toStringTag",S="object"==typeof e,C=t.regeneratorRuntime;if(C)return void(S&&(e.exports=C));C=t.regeneratorRuntime=S?e.exports:{},C.wrap=r;var E="suspendedStart",A="suspendedYield",I="executing",M="completed",O={},T={};T[w]=function(){return this};var P=Object.getPrototypeOf,j=P&&P(P(m([])));j&&j!==y&&_.call(j,w)&&(T=j);var D=s.prototype=a.prototype=Object.create(T);o.prototype=D.constructor=s,s.constructor=o,s[k]=o.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k in e||(e[k]="GeneratorFunction")),e.prototype=Object.create(D),e},C.awrap=function(e){return{__await:e}},l(u.prototype),u.prototype[x]=function(){return this},C.AsyncIterator=u,C.async=function(e,t,n,i){var a=new u(r(e,t,n,i));return C.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},l(D),D[k]="Generator",D[w]=function(){return this},D.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=m,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(p),!e)for(var t in this)"t"===t.charAt(0)&&_.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=g)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=g),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=_.call(i,"catchLoc"),s=_.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&_.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tr
c.default)(t);var n=t.html().replace("&lt;","<").replace("&gt;",">");t.html(n)})})}}return l(e,[{key:"updateData",value:function(e){Object.assign(this.data,e),this.chart.update(this.data)}}]),e}();t.default=y;var _=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}(y),b={};(0,c.default)("[data-chart-name]").each(function(){var e=(0,c.default)(this),t=e.data("chart-name")||"",n=e.data("chart-options")||{},r=e.data("chart-data")||{};"updates"===t?b[t]=new _(e,n,r):b[t]=new y(e,n,r)});t.Instances=b},,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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1),s=r(o),l=n(335),u=n(358),c=r(u),f=function(){var e=arguments.length>0&&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},d=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")||f(r);this.disable(),(0,c.default)(i,function(){return n.enable()})}},{key:"enable",value:function(){this.element.removeAttr("disabled").find("> .fa").removeClass("fa-refresh fa-spin").addClass("fa-trash")}},{key:"disable",value:function(){this.element.attr("disabled","disabled").find("> .fa").removeClass("fa-trash").addClass("fa-refresh fa-spin")}}]),e}();t.default=d;var p=new d;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(335),s=n(358),l=r(s),u=n(364);(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(){u.Instances&&u.Instances.backups&&(u.Instances.backups.updateData({series:[0,100]}),u.Instances.backups.element.find(".numeric").html("0 <em>"+o.translations.PLUGIN_ADMIN.DAYS.toLowerCase()+"</em>")),(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*
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:c.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:"<p>"+m.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD+" <strong>"+t.name+"</strong></p>\n <pre>"+n.message+"</pre>"})}},{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:"<p>"+m.translations.PLUGIN_ADMIN.FILE_ERROR_ADD+" <strong>"+t.name+"</strong></p>\n <pre>"+n.message+"</pre>"})}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:"<pre>"+r+"</pre>"})}},{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)(),x=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)||k(t)})},k=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.resizeQ
"preview"===n.data("grav-editor-mode")&&t.addClass("editor-active"),t.on("click.states.preview",function(){var e=n.data("grav-editor-preview-container"),i=n.parent(".grav-editor-content");t.siblings().removeClass("editor-active"),t.addClass("editor-active"),n.data("grav-editor-mode","preview"),e||(e=(0,a.default)('<div class="grav-editor-preview" />'),i.after(e),n.data("grav-editor-preview-container",e)),e.css({height:i.height()}),e.addClass("is-active"),i.removeClass("is-active"),r.navigation.find(".grav-editor-actions").css("visibility","hidden");var s=n.data("grav-urlpreview")+"/task"+o.config.param_sep+"processmarkdown",u=n.closest("form").serializeArray(),c={};u.map(function(e){c[e.name]=e.value}),(0,l.default)(s,{method:"post",body:c},function(t){return e.html(t.preview)})})}}},{fullscreen:{identifier:"fullscreen",title:o.translations.PLUGIN_ADMIN.FULLSCREEN,label:'<i class="fa fa-fw fa-expand"></i>',action:function(t){var n=t.codemirror,r=t.button,i=t.textarea;r.on("click.editor.fullscreen",function(){var t=i.closest(".grav-editor"),r=n.getWrapperElement(),o=(0,a.default)(".content-wrapper");if(t.hasClass("grav-editor-fullscreen")){e.document.documentElement.style.overflow="";var s=i.data("fullScreenRestore");r.style.width=s.width,r.style.height=s.height,e.scrollTo(s.scrollLeft,s.scrollTop);var l=t.find(".grav-editor-toolbar .hint--bottom");l&&(l.removeClass("hint--bottom").addClass("hint--top"),(0,a.default)(l[l.length-1]).removeClass("hint--bottom-left")),o&&o.css("overflow","auto")}else{i.data("fullScreenRestore",{scrollTop:e.pageYOffset,scrollLeft:e.pageXOffset,width:r.style.width,height:r.style.height}),r.style.width="",r.style.height=i.parent(".grav-editor-content").height()+"px",e.document.documentElement.style.overflow="hidden";var u=t.find(".grav-editor-toolbar .hint--top");u&&(u.removeClass("hint--top").addClass("hint--bottom"),(0,a.default)(u[u.length-1]).addClass("hint--bottom-left")),o&&o.css("overflow","visible")}t.toggleClass("grav-editor-fullscreen"),setTimeout(function(){n.refresh(),(0,a.default)(e).trigger("resize")},5)})}}}]}}).call(t,function(){return this}())},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){!function(e){e(n(393))}(function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}function n(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.defineMode("css",function(t,n){function r(e,t){return h=t,e}function i(e,t){var n=e.next();if(g[n]){var i=g[n](e,t);if(i!==!1)return i}return"@"==n?(e.eatWhile(/[\w\\\-]/),r("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?r(null,"compare"):'"'==n||"'"==n?(t.tokenize=a(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):"!"==n?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),r("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):("u"==n||"U"==n)&&e.match(/rl(-prefix)?\(/i)||("d"==n||"D"==n)&&e.match("omain(",!0,!0)||("r"==n||"R"==n)&&e.match("egexp(",!0,!0)?(e.backUp(1),t.tokenize=o,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?r("variable-2","variable-definition"):r("variable-2","variable")):e.match(/^\w+-/)?r("meta","meta"):void 0}function a(e){return function(t,n){for(var i,a=!1;null!=(i=t.next());){if(i==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==i}return(i==e||!a&&")"!=e)&&(n.tokenize=null),r("string","string")}}function o(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=a(")"),r(null,"(")}function s(e,t,n){this.type=e,this.indent=t,this.prev=n}function l(e,t,n,r){return e.context=new s(n,t.indentation()+(r===!1?0:v),e.context),n}function u(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function c(e,t,n){return
a.setext=a.header),a.thisLine.header=!0,a.f=a.inline,f(a)):y?(t.skipToEnd(),a.hr=!0,a.thisLine.hr=!0,x.hr):"["===t.peek()?i(t,a,g):i(t,a,a.inline)}function u(t,n){var r=b.token(t,n.htmlState);if(!w){var i=e.innerMode(b,n.htmlState);("xml"==i.mode.name&&null===i.state.tagStart&&!i.state.context&&i.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return r}function c(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,o=r+3;if(t.fencedEndRE&&t.indentation<=o&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting="code-block");var s;return i||(s=f(t)),t.localMode=t.localState=null,t.block=l,t.f=p,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?a(e,t,t.block):s}return t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),x.code)}function f(e){var t=[];if(e.formatting){t.push(x.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(x.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(x.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(x.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(x.linkHref,"url"):(e.strong&&t.push(x.strong),e.em&&t.push(x.em),e.strikethrough&&t.push(x.strikethrough),e.emoji&&t.push(x.emoji),e.linkText&&t.push(x.linkText),e.code&&t.push(x.code),e.image&&t.push(x.image),e.imageAltText&&t.push(x.imageAltText,"link"),e.imageMarker&&t.push(x.imageMarker)),e.header&&t.push(x.header,x.header+"-"+e.header),e.quote&&(t.push(x.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(x.quote+"-"+e.quote):t.push(x.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?1===i?t.push(x.list2):t.push(x.list3):t.push(x.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function d(e,t){if(e.match(M,!0))return f(t)}function p(t,r){var i=r.text(t,r);if("undefined"!=typeof i)return i;if(r.list)return r.list=null,f(r);if(r.taskList){var o=" "===t.match(E,!0)[1];return o?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,f(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),f(r);var s=t.next();if(r.linkTitle){r.linkTitle=!1;var l=s;"("===s&&(l=")"),l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var c="^\\s*(?:[^"+l+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return x.linkHref}if("`"===s){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var v=t.current().length;if(0!=r.code||r.quote&&1!=v){if(v==r.code){var g=f(r);return r.code=0,g}return r.formatting=d,f(r)}return r.code=v,f(r)}if(r.code)return f(r);if("\\"===s&&(t.next(),n.highlightFormatting)){var y=f(r),_=x.formatting+"-escape";return y?y+" "+_:_}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),f(r);if("["===s&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),f(r);if("]"===s&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var y=f(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=m,y}if("["===s&&!r.image)return r.linkText&&t.match(/^.*?\]/)?f(r):(r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),f(r));if("]"===s&&r.linkText){n.highlightFormatting&&(r.formatting="link");var y=f(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?m:p,y}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link");var y=f(r);return y?y+=" ":y="",y+x.linkInline}if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/
},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||u}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},function(e,t,n){!function(e){e(n(393))}(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){return Re=e,qe=n,t}function a(e,t){var n=e.next();if('"'==n||"'"==n)return t.tokenize=o(n),t.tokenize(e,t);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i))return i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/),i("number","number");if("/"==n)return e.eat("*")?(t.tokenize=s,s(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):Fe(e,t,1)?(r(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),i("regexp","string-2")):(e.eat("="),i("operator","operator",e.current()));if("`"==n)return t.tokenize=l,l(e,t);if("#"==n)return e.skipToEnd(),i("error","error");if(Ke.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),i("operator","operator",e.current());if($e.test(n)){e.eatWhile($e);var a=e.current();if("."!=t.lastType){if(We.propertyIsEnumerable(a)){var u=We[a];return i(u.type,u.style,a)}if("async"==a&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return i("async","keyword",a)}return i("variable","variable",a)}}function o(e){return function(t,n){var r,o=!1;if(Be&&"@"==t.peek()&&t.match(Ye))return n.tokenize=a,i("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||o);)o=!o&&"\\"==r;return o||(n.tokenize=a),i("string","string")}}function s(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=a;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(He){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),l=Je.indexOf(s);if(l>=0&&l<3){if(!i){++o;break}if(0==--i){"("==s&&(a=!0);break}}else if(l>=3&&l<6)++i;else if($e.test(s))a=!0;else{if(/["'\/]/.test(s))return;if(a&&!i){++o;break}}}a&&!i&&(t.fatArrowAt=o)}}function c(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,null!=r&&(this.align=r)}function f(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var a=e.cc;for(Qe.state=e,Qe.stream=i,Qe.marked=null,Qe.cc=a,Qe.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var o=a.length?a.pop():Ge?M:A;if(o(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return Qe.marked?Qe.marked:"variable"==n&&f(e,r)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)Qe.cc.push(arguments[e])}function h(){return p.apply(null,arguments),!0}function m(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function v(e){var t=Qe.state;if(Qe.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=g(e,t.context);if(null!=r)return void(t.context=r)}else if(!m(e,t.localVars))return void(t.localVars=new b(e,t.localVars));n.globalVars&&!m(e,t.globalVars)&&(t.globalVars=new b(e,t.globalVars))}function g(e,t){if(t){if(t.block){var n=g(e,t.prev);return n?n==t.prev?t:new _(n,t.vars,!0):null}return m(e,t.vars)?t:new _(t.prev,new b(e,t.vars),!1)}return null}function y(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function _(e,t,n){this.prev=e,this.vars=t,this.block=n}function b(e,t){this.name=e,this.next=t}function w(){Qe.state.context
for(var a=0;a<t.length;++a)e.defineMIME(t[a],n)}function v(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function g(e){return function(t,n){for(var r;r=t.next();){if("*"==r&&t.eat("/")){if(1==e){n.tokenize=null;break}return n.tokenize=g(e-1),n.tokenize(t,n)}if("/"==r&&t.eat("*"))return n.tokenize=g(e+1),n.tokenize(t,n)}return"comment"}}function y(e){return function(t,n){for(var r,i=!1,a=!1;!t.eol();){if(!e&&!i&&t.match('"')){a=!0;break}if(e&&t.match('"""')){a=!0;break}r=t.next(),!i&&"$"==r&&t.match("{")&&t.skipTo("}"),i=!i&&"\\"==r&&!e}return!a&&e||(n.tokenize=null),"string"}}function _(e){return function(t,n){for(var r,i=!1,a=!1;!t.eol();){if(!i&&t.match('"')&&("single"==e||t.match('""'))){a=!0;break}if(!i&&t.match("``")){x=_(e),a=!0;break}r=t.next(),i="single"==e&&!i&&"\\"==r}return a&&(n.tokenize=null),"string"}}e.defineMode("clike",function(o,l){function u(e,t){var n=e.next();if(S[n]){var r=S[n](e,t);if(r!==!1)return r}if('"'==n||"'"==n)return t.tokenize=c(n),t.tokenize(e,t);if(M.test(n))return p=n,null;if(O.test(n)){if(e.backUp(1),e.match(T))return"number";e.next()}if("/"==n){if(e.eat("*"))return t.tokenize=f,f(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(P.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(P););return"operator"}if(e.eatWhile(j),I)for(;e.match(I);)e.eatWhile(j);var i=e.current();return s(y,i)?(s(w,i)&&(p="newstatement"),s(x,i)&&(h=!0),"keyword"):s(_,i)?"type":s(b,i)?(s(w,i)&&(p="newstatement"),"builtin"):s(k,i)?"atom":"variable"}function c(e){return function(t,n){for(var r,i=!1,a=!1;null!=(r=t.next());){if(r==e&&!i){a=!0;break}i=!i&&"\\"==r}return(a||!i&&!C)&&(n.tokenize=null),"string"}}function f(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function d(e,t){l.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=i(e,t,e.pos))}var p,h,m=o.indentUnit,v=l.statementIndentUnit||m,g=l.dontAlignCalls,y=l.keywords||{},_=l.types||{},b=l.builtin||{},w=l.blockKeywords||{},x=l.defKeywords||{},k=l.atoms||{},S=l.hooks||{},C=l.multiLineStrings,E=l.indentStatements!==!1,A=l.indentSwitch!==!1,I=l.namespaceSeparator,M=l.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,O=l.numberStart||/[\d\.]/,T=l.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,P=l.isOperatorChar||/[+\-*&%=<>!?|\/]/,j=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-m,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return d(e,t),null;p=h=null;var s=(t.tokenize||u)(e,t);if("comment"==s||"meta"==s)return s;if(null==o.align&&(o.align=!0),";"==p||":"==p||","==p&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==p)n(t,e.column(),"}");else if("["==p)n(t,e.column(),"]");else if("("==p)n(t,e.column(),")");else if("}"==p){for(;"statement"==o.type;)o=r(t);for("}"==o.type&&(o=r(t));"statement"==o.type;)o=r(t)}else p==o.type?r(t):E&&(("}"==o.type||"top"==o.type)&&";"!=p||"statement"==o.type&&"newstatement"==p)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),S.token){var c=S.token(e,t,s);void 0!==c&&(s=c)}return"def"==s&&l.styleDefs===!1&&(s="variable"),t.startOfLine=!1,t.prevToken=h?"def":s||p,d(e,t),s},indent:function(t,n){if(t.tokenize!=u&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0),a=i==r.type;if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var o=S.indent(t,r,n,m);if("number"==typeof o)return o}var s=r.prev&&"switch"==r.prev.info;if(l.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:v):!r.align||g&&")"==r.type?")"!=r.type||a?
if(!o)return;o.then?o.then(function(e){t.operation(function(){h(t,e)})}):t.operation(function(){h(t,o)})}}function h(e,t){s(e);for(var n=e.state.lint,r=n.options,i=c(t),a=0;a<i.length;++a){var o=i[a];if(o){for(var d=null,p=n.hasGutter&&document.createDocumentFragment(),h=0;h<o.length;++h){var m=o[h],v=m.severity;v||(v="error"),d=u(d,v),r.formatAnnotation&&(m=r.formatAnnotation(m)),n.hasGutter&&p.appendChild(f(m)),m.to&&n.marked.push(e.markText(m.from,m.to,{className:"CodeMirror-lint-mark-"+v,__annotation:m}))}n.hasGutter&&e.setGutterMarker(a,y,l(p,d,o.length>1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function m(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){p(e)},t.options.delay||500))}function v(e,t){for(var n=t.target||t.srcElement,r=document.createDocumentFragment(),a=0;a<e.length;a++){var o=e[a];r.appendChild(f(o))}i(t,r,n)}function g(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,a=(r.top+r.bottom)/2,o=e.findMarksAt(e.coordsChar({left:i,top:a},"client")),s=[],l=0;l<o.length;++l){var u=o[l].__annotation;u&&s.push(u)}s.length&&v(s,t)}}var y="CodeMirror-lint-markers";e.defineOption("lint",!1,function(t,n,r){if(r&&r!=e.Init&&(s(t),t.state.lint.options.lintOnChange!==!1&&t.off("change",m),e.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),n){for(var i=t.getOption("gutters"),l=!1,u=0;u<i.length;++u)i[u]==y&&(l=!0);var c=t.state.lint=new a(t,o(t,n),l);c.options.lintOnChange!==!1&&t.on("change",m),0!=c.options.tooltips&&"gutter"!=c.options.tooltips&&e.on(t.getWrapperElement(),"mouseover",c.onMouseOver),p(t)}}),e.defineExtension("performLint",function(){this.state.lint&&p(this)})})},function(e,t,n){var r=n(448);"string"==typeof r&&(r=[[e.id,r,""]]);var i,a={};a.transform=i;n(450)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(449)(!1),t.push([e.id,'.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,i
return i!==gn&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,gn);return a!==gn&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,l){if(t.call(n,e,a,l))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(xn,a),s=0;return new w(function(){for(;;){var a=o.next();if(a.done)return a;var l=a.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return x(i,r?u:s++,c,a)}})},i}function ft(e,t,n){var r=fe().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function dt(e,t,n){var r=o(e),i=(u(e)?Qe():fe()).asMutable();e.__iterate(function(a,o){i.update(t.call(n,a,o,e),function(e){return e=e||[],e.push(r?[o,a]:a),e})});var a=At(e);return i.map(function(t){return St(e,a(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),g(t,n,i))return e;var a=y(t,i),o=_(n,i);if(a!==a||o!==o)return pt(e.toSeq().cacheResult(),t,n,r);var s,l=o-a;l===l&&(s=l<0?0:l);var u=It(e);return u.size=0===s?s:e.size&&s||void 0,!r&&N(e)&&s>=0&&(u.get=function(t,n){return t=m(this,t),t>=0&&t<s?e.get(t+a,n):n}),u.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var o=0,l=!0,u=0;return e.__iterate(function(e,n){if(!l||!(l=o++<a))return u++,t(e,r?n:u-1,i)!==!1&&u!==s}),u},u.__iteratorUncached=function(t,n){if(0!==s&&n)return this.cacheResult().__iterator(t,n);var i=0!==s&&e.__iterator(t,n),o=0,l=0;return new w(function(){for(;o++<a;)i.next();if(++l>s)return k();var e=i.next();return r||t===wn?e:t===bn?x(t,l-1,void 0,e):x(t,l-1,e.value[1],e)})},u}function ht(e,t,n){var r=It(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++o&&r(e,i,a)}),o},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(xn,i),s=!0;return new w(function(){if(!s)return k();var e=o.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,a)?r===xn?e:x(r,l,u,e):(s=!1,k())})},r}function mt(e,t,n,r){var i=It(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,l=0;return e.__iterate(function(e,a,u){if(!s||!(s=t.call(n,e,a,u)))return l++,i(e,r?a:l-1,o)}),l},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(xn,a),l=!0,u=0;return new w(function(){var e,a,c;do{if(e=s.next(),e.done)return r||i===wn?e:i===bn?x(i,u++,void 0,e):x(i,u++,e.value[1],e);var f=e.value;a=f[0],c=f[1],l&&(l=t.call(n,c,a,o))}while(l);return i===xn?e:x(i,a,c,e)})},i}function vt(e,t){var r=o(e),i=[e].concat(t).map(function(e){return a(e)?r&&(e=n(e)):e=r?R(e):q(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var l=i[0];if(l===e||r&&o(l)||s(e)&&s(l))return l}var u=new j(i);return r?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),u}function gt(e,t,n){var r=It(e);return r.__iterateUncached=function(r,i){function o(e,u){var c=this;e.__iterate(function(e,i){return(!t||u<t)&&a(e)?o(e,u+1):r(e,n?i:s++,c)===!1&&(l=!0),!l},i)}var s=0,l=!1;return o(e,0),s},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),s=[],l=0;return new w(function(){for(;o;){var e=o.next();if(e.done===!1){var u=e.value;if(r===xn&&(u=u[1]),t&&!(s.length<t)||!a(u))return n?e:x(r,l++,u,e);s.push(o),o=u.__iterator(r,i)}else o=s.pop()}return k()})},r}function yt(e,t,n){var r=At(e);return e.toSeq().map(function(i,a){return r(t.call(n,i,a,e))}).flatten(!0)}function _t(e,t){var n=It(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var i=this,a=0;return e.__iterate(function(e,r){return(!a||n(t,a++,i)!==!1)&&n(e,a++,i)!==!1},r),a},n.__iteratorUncached=function(n,r){var i,a=e.__iterator(wn,r),o=0;return new w(function(){return(!i||o%2)&&(i=a.next(),i.done)
for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Kt(i,a)},$t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},$t.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},$t.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,x(e,n++,t)}return k()})},$t.isStack=Wt;var ir="@@__IMMUTABLE_STACK__@@",ar=$t.prototype;ar[ir]=!0,ar.withMutations=Vn.withMutations,ar.asMutable=Vn.asMutable,ar.asImmutable=Vn.asImmutable,ar.wasAltered=Vn.wasAltered;var or;t.Iterator=w,Jt(t,{toArray:function(){ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return fe(this.toKeyedSeq())},toObject:function(){ce(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Vt(o(this)?this.valueSeq():this)},toSet:function(){return Nt(o(this)?this.valueSeq():this)},toSetSeq:function(){return new at(this)},toSeq:function(){return s(this)?this.toIndexedSeq():o(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return $t(o(this)?this.valueSeq():this)},toList:function(){return Re(o(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=ln.call(arguments,0);return St(this,vt(this,e))},includes:function(e){return this.some(function(t){return Y(t,e)})},entries:function(){return this.__iterator(xn)},every:function(e,t){ce(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return St(this,ct(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ce(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,lt(this,e,t))},reduce:function(e,t,n){ce(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,a,o){i?(i=!1,r=t):r=e.call(n,r,t,a,o)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ut(this,!0))},slice:function(e,t){return St(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return h(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ft(this,e,t)},equals:function(e){return J(this,e)},entrySeq:function(){var e=this;if(e._cache)return new j(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:f
2019-06-01 20:23:22 -07:00
},{key:"sortItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.data("action-sort"),r=t.data("action-sort-dir")||"asc",i=(0,s.default)(t.closest('[data-type="collection"]')),a=i.closest('[data-type="collection"]').find("> ul > [data-collection-item]");a.sort(function(e,t){var i=(0,s.default)(e).find('[name$="['+n+']"]'),a=(0,s.default)(t).find('[name$="['+n+']"]'),o=void 0;return o="asc"===r?i.val()<a.val()?-1:i.val()>a.val()?1:0:i.val()>a.val()?-1:i.val()<a.val()?1:0}).each(function(e,t){(0,s.default)(t).parent().append(t)}),this.reindex(i)}},{key:"observeKey",value:function(e){var t=(0,s.default)(e.target),n=t.val(),r=t.closest("[data-collection-key]");r.data("collection-key-backup",r.data("collection-key")).data("collection-key",n),this.reindex(null,r)}},{key:"reindex",value:function(e,t){t=t||(0,s.default)(e).closest('[data-type="collection"]').find("> ul > [data-collection-item]"),t.each(function(e,t){t=(0,s.default)(t);var n=t.find("[data-key-observe]"),r=n.val(),i=n.length,a=t.data("collection-key-backup");t.attr("data-collection-key",i?r:e),["name","data-grav-field-name","for","id","data-grav-file-settings"].forEach(function(e){t.find("["+e+"], [_"+e+"]").each(function(){var t=(0,s.default)(this),n=[],o=[new RegExp("\\[(\\d+|\\*|"+a+")\\]","g"),new RegExp("\\.(\\d+|\\*|"+a+")\\.","g")];if(i&&!r)return t.attr("_"+e,t.attr(e)),void t.attr(e,null);t.attr("_"+e)&&(t.attr(e,t.attr("_"+e)),t.attr("_"+e,null)),t.parents("[data-collection-key]").map(function(e,t){return n.push((0,s.default)(t).attr("data-collection-key"))}),n.reverse();var l=a,u=t.attr(e).replace(o[0],function(){return l=n.shift()||l,"["+l+"]"});u=u.replace(o[1],function(){return l=n.shift()||l,"."+l+"."}),t.attr(e,u)})})})}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find('[data-type="collection"]');r.length&&r.each(function(e,t){t=(0,s.default)(t),~n.lists.index(t)||n.addList(t)})}},{key:"_updateActionsStateBasedOnMinMax",value:function(e){var t=e.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),n=e.data("min"),r=e.data("max");e.find('> .collection-actions [data-action="add"]').attr("disabled",!1),e.find('> ul > li > .item-actions [data-action="delete"]').attr("disabled",!1),"undefined"!=typeof n&&t.length<=n&&e.find('> ul > li > .item-actions [data-action="delete"]').attr("disabled",!0),"undefined"!=typeof r&&t.length>=r&&e.find('> .collection-actions [data-action="add"]').attr("disabled",!0)}}]),e}();t.default=c;t.Instance=new c},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;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1),s=r(o),l=n(335);n(472);var u=function(){function e(t){var n=this;i(this,e),this.items=(0,s.default)(),this.options=Object.assign({},this.defaults,t),(0,s.default)("[data-grav-datetime]").each(function(e,t){return n.addItem(t)}),(0,s.default)("body").on("mutation._grav",this._onAddedNodes.bind(this))}return a(e,[{key:"defaults",get:function(){return{showTodayButton:!0,showClear:!0,locale:l.config.language||"en",icons:{time:"fa fa-clock-o",date:"fa fa-calendar-o",up:"fa fa-chevron-up",down:"fa fa-chevron-down",previous:"fa fa-chevron-left",next:"fa fa-chevron-right",today:"fa fa-bullseye",clear:"fa fa-trash-o",close:"fa fa-remove"}}}}]),a(e,[{key:"addItem",value:function(e){if(e=(0,s.default)(e),this.items=this.items.add(e),!e.data("DateTimePicker")){var t=Object.assign({},this.options,e.data("grav-datetime")||{});e.datetimepicker(t).on("dp.show dp.update",this._disableDecades),e.siblings(".field-icons").on("click",function(){return e.mousedown().focus()})}}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find("[data-grav-datetime]");r.length&&r.eac
* gemini-scrollbar
* @version 1.5.3
* @link http://noeldelgado.github.io/gemini-scrollbar/
* @license MIT
*/
!function(){function t(){var e,t=document.createElement("div");return t.style.position="absolute",t.style.top="-9999px",t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t),e=t.offsetWidth-t.clientWidth,document.body.removeChild(t),e}function n(e,t){return e.classList?t.forEach(function(t){e.classList.add(t)}):void(e.className+=" "+t.join(" "))}function r(e,t){return e.classList?t.forEach(function(t){e.classList.remove(t)}):void(e.className=e.className.replace(new RegExp("(^|\\b)"+t.join("|")+"(\\b|$)","gi")," "))}function i(){var e=navigator.userAgent.toLowerCase();return e.indexOf("msie")!==-1||e.indexOf("trident")!==-1||e.indexOf(" edge/")!==-1}function a(e){this.element=null,this.autoshow=!1,this.createElements=!0,this.forceGemini=!1,this.onResize=null,this.minThumbSize=20,Object.keys(e||{}).forEach(function(t){this[t]=e[t]},this),o=t(),s=0===o&&this.forceGemini===!1,this._cache={events:{}},this._created=!1,this._cursorDown=!1,this._prevPageX=0,this._prevPageY=0,this._document=null,this._viewElement=this.element,this._scrollbarVerticalElement=null,this._thumbVerticalElement=null,this._scrollbarHorizontalElement=null,this._scrollbarHorizontalElement=null}var o,s,l;l={element:"gm-scrollbar-container",verticalScrollbar:"gm-scrollbar -vertical",horizontalScrollbar:"gm-scrollbar -horizontal",thumb:"thumb",view:"gm-scroll-view",autoshow:"gm-autoshow",disable:"gm-scrollbar-disable-selection",prevented:"gm-prevented",resizeTrigger:"gm-resize-trigger"},a.prototype.create=function(){if(s){if(n(this.element,[l.prevented]),this.onResize){if(this.createElements===!0){for(this._viewElement=document.createElement("div");this.element.childNodes.length>0;)this._viewElement.appendChild(this.element.childNodes[0]);this.element.appendChild(this._viewElement)}else this._viewElement=this.element.querySelector("."+l.view);n(this.element,[l.element]),n(this._viewElement,[l.view]),this._createResizeTrigger()}return this}if(this._created===!0)return console.warn("calling on a already-created object"),this;if(this.autoshow&&n(this.element,[l.autoshow]),this._document=document,this.createElements===!0){for(this._viewElement=document.createElement("div"),this._scrollbarVerticalElement=document.createElement("div"),this._thumbVerticalElement=document.createElement("div"),this._scrollbarHorizontalElement=document.createElement("div"),this._thumbHorizontalElement=document.createElement("div");this.element.childNodes.length>0;)this._viewElement.appendChild(this.element.childNodes[0]);this._scrollbarVerticalElement.appendChild(this._thumbVerticalElement),this._scrollbarHorizontalElement.appendChild(this._thumbHorizontalElement),this.element.appendChild(this._scrollbarVerticalElement),this.element.appendChild(this._scrollbarHorizontalElement),this.element.appendChild(this._viewElement)}else this._viewElement=this.element.querySelector("."+l.view),this._scrollbarVerticalElement=this.element.querySelector("."+l.verticalScrollbar.split(" ").join(".")),this._thumbVerticalElement=this._scrollbarVerticalElement.querySelector("."+l.thumb),this._scrollbarHorizontalElement=this.element.querySelector("."+l.horizontalScrollbar.split(" ").join(".")),this._thumbHorizontalElement=this._scrollbarHorizontalElement.querySelector("."+l.thumb);return n(this.element,[l.element]),n(this._viewElement,[l.view]),n(this._scrollbarVerticalElement,l.verticalScrollbar.split(/\s/)),n(this._scrollbarHorizontalElement,l.horizontalScrollbar.split(/\s/)),n(this._thumbVerticalElement,[l.thumb]),n(this._thumbHorizontalElement,[l.thumb]),this._scrollbarVerticalElement.style.display="",this._scrollbarHorizontalElement.style.display="",this._createResizeTrigger(),this._created=!0,this._bindEvents().update()},a.prototype._createResizeTrigger=function(){var e=document.createElement("object");n(e,[l.resizeTrigger]),e.type="text/html",e.setAttribute("tabindex","-1");var t=this._resizeHandler.bind(this);e.onload=function(){var n=e.contentDocument.defaultView;n.addEventListener("resize",t)},i()||(e.data="about:b
e||h.trigger("cron:change",d.getCron()))}),k.push(o),o}var i,a,o,s,l,u,c,f=!1,d=this,p=this,h=e('<span class="jqCron-container"></span>'),m=e('<span class="jqCron-blocks"></span>'),v=e('<span class="jqCron-period"></span>'),g=e('<span class="jqCron-dom"></span>'),y=e('<span class="jqCron-month"></span>'),_=e('<span class="jqCron-mins"></span>'),b=e('<span class="jqCron-dow"></span>'),w=e('<span class="jqCron-time"></span>'),x=e('<span class="jqCron-cross">&#10008;</span>'),k=[];this.disable=function(){h.addClass("disable"),t.disable=!0,d.closeSelectors()},this.isDisabled=function(){return 1==t.disable},this.enable=function(){h.removeClass("disable"),t.disable=!1},this.getCron=function(){var e=i.getValue(),t=["*","*","*","*","*"];return"hour"==e&&(t[0]=a.getCronValue()),"day"!=e&&"week"!=e&&"month"!=e&&"year"!=e||(t[0]=s.getCronValue(),t[1]=o.getCronValue()),"month"!=e&&"year"!=e||(t[2]=u.getCronValue()),"year"==e&&(t[3]=c.getCronValue()),"week"==e&&(t[4]=l.getCronValue()),t.join(" ")},this.setCron=function(e){if(e)try{e=e.replace(/\s+/g," ").replace(/^ +/,"").replace(/ +$/,"");var t=e.replace(/[^\* ]/g,"-").replace(/-+/g,"-").replace(/ +/g,""),n=e.split(" ");5!=n.length&&d.error(d.getText("error2")),"*****"==t?i.setValue("minute"):"-****"==t?(i.setValue("hour"),a.setCronValue(n[0]),s.setCronValue(n[0])):"***"==t.substring(2,t.length)?(i.setValue("day"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1])):"-**"==t.substring(2,t.length)?(i.setValue("month"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),u.setCronValue(n[2])):"**-"==t.substring(2,t.length)?(i.setValue("week"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),l.setCronValue(n[4])):"-*"==t.substring(3,t.length)?(i.setValue("year"),a.setCronValue(n[0]),s.setCronValue(n[0]),o.setCronValue(n[1]),u.setCronValue(n[2]),c.setCronValue(n[3])):d.error(d.getText("error4")),d.clearError()}catch(e){}},this.closeSelectors=function(){for(var e=k.length;e--;)k[e].close()},this.getId=function(){return p.attr("id")},this.getText=function(e){var n=t.texts[t.lang][e]||null;return"string"==typeof n&&n.match("<b")&&(n=n.replace(/(<b *\/>)/gi,'</span><b /><span class="jqCron-text">'),n='<span class="jqCron-text">'+n+"</span>"),n},this.getHumanText=function(){var t=[];return h.find("> span > span:visible").find(".jqCron-text, .jqCron-selector > span").each(function(){var n=e(this).text().replace(/\s+$/g,"").replace(/^\s+/g,"");n&&t.push(n)}),t.join(" ").replace(/\s:\s/g,":")},this.getSettings=function(){return t},this.error=function(e){throw console&&console.error("[jqCron Error] "+e),h.addClass("jqCron-error").attr("title",e),e},this.clearError=function(){h.attr("title","").removeClass("jqCron-error")},this.clear=function(){u.setValue([]),l.setValue([]),a.setValue([]),c.setValue([]),o.setValue([]),s.setValue([]),d.triggerChange()},this.init=function(){var n,S,C;if(!f){for(t=jqCronMergeSettings(t),t.jquery_element||d.error(d.getText("error3")),p=t.jquery_element,p.append(h),h.data("id",t.id),h.data("jqCron",d),h.append(m),t.no_reset_button||h.append(x),!t.disable||h.addClass("disable"),m.append(v),/^(ko)$/i.test(t.lang)?m.append(y,g):m.append(g,y),m.append(_),m.append(b),m.append(w),x.click(function(){d.isDisabled()||d.clear()}),h.bind("cron:change",function(e,n){t.bind_to&&(t.bind_method.set&&t.bind_method.set(t.bind_to,n),d.clearError())}),v.append(d.getText("text_period")),i=r(v,!1,"period"),t.enabled_minute&&i.add("minute",d.getText("name_minute")),t.enabled_hour&&i.add("hour",d.getText("name_hour")),t.enabled_day&&i.add("day",d.getText("name_day")),t.enabled_week&&i.add("week",d.getText("name_week")),t.enabled_month&&i.add("month",d.getText("name_month")),t.enabled_year&&i.add("year",d.getText("name_year")),i.$.bind("selector:change",function(e,t){g.hide(),y.hide(),_.hide(),b.hide(),w.hide(),"hour"==t?_.show():"day"==t?w.show():"week"==t?(b.show(),w.show()):"month"==t?(g.show(),w.show()):"year"==t&&(g.show(),y.show(),w.show())}),i.setValue(t.default_period),_.append(d.getText("text_mins")),a=r(_,t.multiple_mins,"minutes"),n=0,C=t.minute
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
2018-10-08 16:43:17 -07:00
* @version v4.2.5+7f2b526d
*/
!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function r(e){return"function"==typeof e}function i(e){H=e}function a(e){$=e}function o(){return function(){return t.nextTick(f)}}function s(){return"undefined"!=typeof G?function(){G(f)}:c()}function l(){var e=0,t=new Y(f),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function u(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function c(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<B;e+=2){var t=Q[e],n=Q[e+1];t(n),Q[e]=void 0,Q[e+1]=void 0}B=0}function d(){try{var e=Function("return this")().require("vertx");return G=e.runOnLoop||e.runOnContext,s()}catch(e){return c()}}function p(e,t){var n=this,r=new this.constructor(m);void 0===r[ee]&&j(r);var i=n._state;if(i){var a=arguments[i-1];$(function(){return O(i,r,a,n._result)})}else A(n,r,e,t);return r}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(m);return k(n,e),n}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(e){return ie.error=e,ie}}function _(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function b(e,t,n){$(function(e){var r=!1,i=_(n,t,function(n){r||(r=!0,t!==n?k(e,n):C(e,n))},function(t){r||(r=!0,E(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,E(e,i))},e)}function w(e,t){t._state===ne?C(e,t._result):t._state===re?E(e,t._result):A(t,void 0,function(t){return k(e,t)},function(t){return E(e,t)})}function x(e,t,n){t.constructor===e.constructor&&n===p&&t.constructor.resolve===h?w(e,t):n===ie?(E(e,ie.error),ie.error=null):void 0===n?C(e,t):r(n)?b(e,t,n):C(e,t)}function k(t,n){t===n?E(t,v()):e(n)?x(t,n,y(n)):C(t,n)}function S(e){e._onerror&&e._onerror(e._result),I(e)}function C(e,t){e._state===te&&(e._result=t,e._state=ne,0!==e._subscribers.length&&$(I,e))}function E(e,t){e._state===te&&(e._state=re,e._result=t,$(S,e))}function A(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+ne]=n,i[a+re]=r,0===a&&e._state&&$(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?O(n,r,i,a):i(a);e._subscribers.length=0}}function M(e,t){try{return e(t)}catch(e){return ie.error=e,ie}}function O(e,t,n,i){var a=r(n),o=void 0,s=void 0,l=void 0,u=void 0;if(a){if(o=M(n,i),o===ie?(u=!0,s=o.error,o.error=null):l=!0,t===o)return void E(t,g())}else o=i,l=!0;t._state!==te||(a&&l?k(t,o):u?E(t,s):e===ne?C(t,o):e===re&&E(t,o))}function T(e,t){try{t(function(t){k(e,t)},function(t){E(e,t)})}catch(t){E(e,t)}}function P(){return ae++}function j(e){e[ee]=ae++,e._state=void 0,e._result=void 0,e._subscribers=[]}function D(){return new Error("Array Methods must be provided an Array")}function L(e){return new oe(this,e).promise}function z(e){var t=this;return new t(V(e)?function(n,r){for(var i=e.length,a=0;a<i;a++)t.resolve(e[a]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function N(e){var t=this,n=new t(m);return E(n,e),n}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function R(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function q(){var e=void 0;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=se}var U=void 0;U=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.cal
null!=i&&d(i),g(n,{__mapKeysData__:u("c",e=[]),__mapValuesData__:u("c",t=[])}),i?(p(i,function(n){var r=l(n)[0];n=n[1],a.call(e,r)===-1&&(e.push(r),t.push(n))},n),n):n},m&&(o&&o(r,Map),r.prototype=Object.create(Map.prototype,{constructor:u(r)})),c(g(r.prototype,{clear:u(function(){this.__mapKeysData__.length&&(i.call(this.__mapKeysData__),i.call(this.__mapValuesData__),this.emit("_clear"))}),delete:u(function(e){var t=a.call(this.__mapKeysData__,e);return t!==-1&&(this.__mapKeysData__.splice(t,1),this.__mapValuesData__.splice(t,1),this.emit("_delete",t,e),!0)}),entries:u(function(){return new h(this,"key+value")}),forEach:u(function(e){var t,n,r=arguments[1];for(s(e),t=this.entries(),n=t._next();void 0!==n;)v.call(e,r,this.__mapValuesData__[n],this.__mapKeysData__[n],this),n=t._next()}),get:u(function(e){var t=a.call(this.__mapKeysData__,e);if(t!==-1)return this.__mapValuesData__[t]}),has:u(function(e){return a.call(this.__mapKeysData__,e)!==-1}),keys:u(function(){return new h(this,"key")}),set:u(function(e,t){var n,r=a.call(this.__mapKeysData__,e);return r===-1&&(r=this.__mapKeysData__.push(e)-1,n=!0),this.__mapValuesData__[r]=t,n&&this.emit("_add",r,e),this}),size:u.gs(function(){return this.__mapKeysData__.length}),values:u(function(){return new h(this,"value")}),toString:u(function(){return"[object Map]"})})),Object.defineProperty(r.prototype,f.iterator,u(function(){return this.entries()})),Object.defineProperty(r.prototype,f.toStringTag,u("c","Map"))},function(e,t,n){"use strict";var r=n(647);e.exports=function(){return r(this).length=0,this}},function(e,t,n){"use strict";var r=n(648);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(649)();e.exports=function(e){return e!==r&&null!==e}},function(e,t){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(651),i=n(654),a=n(647),o=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(e){var t,n,c,f;if(!r(e))return o.apply(this,arguments);for(n=i(a(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c)),t=c;t<n;++t)if(s.call(this,t)&&(f=this[t],r(f)))return t;return-1}},function(e,t,n){"use strict";e.exports=n(652)()?Number.isNaN:n(653)},function(e,t){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t){"use strict";e.exports=function(e){return e!==e}},function(e,t,n){"use strict";var r=n(655),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(656),i=Math.abs,a=Math.floor;e.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*a(i(e)):e)}},function(e,t,n){"use strict";e.exports=n(657)()?Math.sign:n(658)},function(e,t){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&e(-20)===-1)}},function(e,t){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";e.exports=n(660)()?Object.setPrototypeOf:n(661)},function(e,t){"use strict";var n=Object.create,r=Object.getPrototypeOf,i={};e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||n;return"function"==typeof e&&r(e(t(null),i))===i}},function(e,t,n){"use strict";var r,i=n(662),a=n(647),o=Object.prototype.isPrototypeOf,s=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(a(e),null===t||i(t))return e;throw new TypeError("Prototype must be null or an object")},e.exports=function(e){var t,n;return e?(2===e.level?e.set?(n=e.set,t=function(e,t){return n.call(r(e,t),t),e}):t=function(e,t){return r(e,t).__proto__=t,e}:t=function e(t,n){var i;return r(t,n),i=o.call(e.nullPolyfill,t),i&&delete e.nullPolyfill.__proto__,null===n&&(n=e.nullPolyfill),t.__proto__=n,i&&s(e.nullPolyfill,"__proto__",l),t},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__pro
2016-02-05 12:37:48 -08:00
//# sourceMappingURL=admin.min.js.map