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

13 lines
350 KiB
JavaScript
Raw Normal View History

var Grav=webpackJsonpGrav([0],[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),o=r(i),a=n(295),s=r(a),u=n(296),c=r(u),l=n(301),f=r(l),d=n(306),p=r(d),h=n(385),m=r(h);n(475),n(476),n(477),n(478),n(479);var v=n(480),g=r(v);s["default"].start(),e["default"]={GPM:{GPM:o["default"],Instance:i.Instance},KeepAlive:s["default"],Dashboard:f["default"],Pages:p["default"],Forms:m["default"],Updates:{Updates:c["default"],Instance:u.Instance},MobileSidebar:{MobileSidebar:g["default"],Instance:v.Instance}}},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(288),u=n(293),c=n(294),l=function(e){function n(){var t=arguments.length<=0||void 0===arguments[0]?"getUpdates":arguments[0];r(this,n);var e=i(this,Object.getPrototypeOf(n).call(this));return e.payload={},e.raw={},e.action=t,e}return o(n,e),a(n,[{key:"setPayload",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this.payload=t,this.emit("payload",t),this}},{key:"setAction",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"getUpdates":arguments[0];return this.action=t,this.emit("action",t),this}},{key:"fetch",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var e=this,n=arguments.length<=0||void 0===arguments[0]?function(){return!0}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=new FormData;i.append("task","GPM"),i.append("action",this.action),r&&i.append("flush",!0),this.emit("fetching",this),t(u.config.base_url_relative,{credentials:"same-origin",method:"post",body:i}).then(function(t){return e.raw=t,t}).then(s.parseStatus).then(s.parseJSON).then(function(t){return e.response(t)}).then(function(t){return n(t,e.raw)}).then(function(t){return e.emit("fetched",e.payload,e.raw,e)})["catch"](s.userFeedbackError)})},{key:"response",value:function(t){return this.payload=t,t}}]),n}(c.EventEmitter);e["default"]=l;e.Instance=new l}).call(e,n(2))},function(t,e,n){(function(e,n){(function(){!function(t){"use strict";function n(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function r(t){return"string"!=typeof t&&(t=String(t)),t}function i(t){this.map={},t instanceof i?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){return t.bodyUsed?e.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function a(t){return new e(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader;return e.readAsArrayBuffer(t),a(e)}function u(t){var e=new FileReader;return e.readAsText(t),a(e)}function c(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,"string"==typeof t)this._bodyText=t;else if(m.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(m.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(t){if(!m.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t))throw new Erro
}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},function(t,e,n){var r=n(14);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(14),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(14);r(r.S,"Math",{expm1:n(116)})},function(t,e){t.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},function(t,e,n){var r=n(14),i=n(112),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(t){return t+1/a-1/a};r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),o=i(t);return c>r?o*l(r/c/s)*c*s:(e=(1+s/a)*r,n=e-(e-r),n>u||n!=n?o*(1/0):o*n)}})},function(t,e,n){var r=n(14),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;s>a;)n=i(arguments[a++]),n>u?(r=u/n,o=o*r*r+1,u=n):n>0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(14),i=Math.imul;r(r.S+r.F*n(13)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(14);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(14);r(r.S,"Math",{log1p:n(108)})},function(t,e,n){var r=n(14);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(14);r(r.S,"Math",{sign:n(112)})},function(t,e,n){var r=n(14),i=n(116),o=Math.exp;r(r.S+r.F*n(13)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(14),i=n(116),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(14);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(14),i=n(41),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(65536>e?o(e):o(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(14),i=n(34),o=n(39);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),r>s&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){"use strict";n(86)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(131)(!0);n(132)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(40),i=n(37);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return 0>u||u>=c?t?"":void 0:(o=s.charCodeAt(u),55296>o||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(54),i=n(14),o=n(23),a=n(15),s=n(11),u=n(133),c=n(134),l=n(29),f=n(62),d=n(30)("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};t.exports=function(t,e,n,_,y,b,x){c(n,e,_);var w,k,S,A=function(t){if(!p&&t in E)return E[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},M=e+" Iterator",I=y==v,O=!1,E=t.prototype,j=E[d]||E[h]||y&&E[y],z=j||A(y),P=y?I?A("entries"):z:void 0,C="Array"==e?E.entries||j:j;if(C&&(S=f(C.call(new t)),S!==Object.prototype&&(l(S,M,!0),r||s(S,d)||a(S,d,g))),I&&j&&j.name!==v&&(O=!0,z=function(){return j.call(this)}),r&&!x||!p&&!O&&E[d]||a(E,d,z),u[e]=z,u[M]=g,y)if(w={values:I?z:A(v),keys:b?z:A(m),entries:P},x)for(k in w)k in E||o(E,k,w[k]);else i(i.P+i.F*(p||O),e,w);return w}},function(t,e){t.exports={}},function(t,e,n)
o||(X.constructor=w)}var et=new k(new w(2)),nt=k[y].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||u(k[y],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else w=function(t){var e=Y(this,t);this._b=m.call(Array(e),0),this[q]=e},k=function(t,e,n){l(this,k,_),l(t,w,_);var r=t[q],i=f(e);if(0>i||i>r)throw A("Wrong offset!");if(n=void 0===n?r-i:d(n),i+n>r)throw A(b);this[D]=t,this[N]=i,this[q]=n},i&&($(w,T,"_l"),$(k,C,"_b"),$(k,T,"_l"),$(k,L,"_o")),u(k[y],{getInt8:function(t){return H(this,1,t)[0]<<24>>24},getUint8:function(t){return H(this,1,t)[0]},getInt16:function(t){var e=H(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=H(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(H(this,4,t,arguments[1]))},getUint32:function(t){return R(H(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return U(H(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return U(H(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){J(this,1,t,B,e)},setUint8:function(t,e){J(this,1,t,B,e)},setInt16:function(t,e){J(this,2,t,V,e,arguments[2])},setUint16:function(t,e){J(this,2,t,V,e,arguments[2])},setInt32:function(t,e){J(this,4,t,K,e,arguments[2])},setUint32:function(t,e){J(this,4,t,K,e,arguments[2])},setFloat32:function(t,e){J(this,4,t,G,e,arguments[2])},setFloat64:function(t,e){J(this,8,t,W,e,arguments[2])}});v(w,g),v(k,_),s(k[y],a.VIEW,!0),e[g]=w,e[_]=k},function(t,e,n){var r=n(14);r(r.G+r.W+r.F*!n(218).ABV,{DataView:n(219).DataView})},function(t,e,n){n(222)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(12)){var r=n(54),i=n(9),o=n(13),a=n(14),s=n(218),u=n(219),c=n(25),l=n(93),f=n(22),d=n(15),p=n(209),h=(n(100),n(40)),m=n(39),v=n(41),g=n(21),_=n(11),y=n(74),b=n(78),x=n(18),w=n(61),k=n(164),S=n(48),A=n(62),M=n(52).f,I=(n(223),n(165)),O=n(24),E=n(30),j=n(173),z=n(38),P=n(206),C=n(193),T=n(133),L=n(166),D=n(192),q=n(188),N=n(185),F=n(16),U=n(53),R=F.f,B=U.f,V=i.RangeError,K=i.TypeError,W=i.Uint8Array,G="ArrayBuffer",$="Shared"+G,H="BYTES_PER_ELEMENT",J="prototype",Y=Array[J],Q=u.ArrayBuffer,X=u.DataView,Z=j(0),tt=j(2),et=j(3),nt=j(4),rt=j(5),it=j(6),ot=z(!0),at=z(!1),st=C.values,ut=C.keys,ct=C.entries,lt=Y.lastIndexOf,ft=Y.reduce,dt=Y.reduceRight,pt=Y.join,ht=Y.sort,mt=Y.slice,vt=Y.toString,gt=Y.toLocaleString,_t=E("iterator"),yt=E("toStringTag"),bt=O("typed_constructor"),xt=O("def_constructor"),wt=s.CONSTR,kt=s.TYPED,St=s.VIEW,At="Wrong length!",Mt=j(1,function(t,e){return Pt(P(t,t[xt]),e)}),It=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),Ot=!!W&&!!W[J].set&&o(function(){new W(1).set({})}),Et=function(t,e){if(void 0===t)throw K(At);var n=+t,r=m(t);if(e&&!y(n,r))throw V(At);return r},jt=function(t,e){var n=h(t);if(0>n||n%e)throw V("Wrong offset!");return n},zt=function(t){if(x(t)&&kt in t)return t;throw K(t+" is not a typed array!")},Pt=function(t,e){if(!(x(t)&&bt in t))throw K("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Tt(P(t,t[xt]),e)},Tt=function(t,e){for(var n=0,r=e.length,i=Pt(t,r);r>n;)i[n]=e[n++];return i},Lt=function(t,e,n){R(t,e,{get:function(){return this._d[n]}})},Dt=function(t){var e,n,r,i,o,a,s=w(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,d=I(s);if(void 0!=d&&!k(d)){for(a=d.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=m(s.length),i=Pt(this,n);n>e;e++)i[e]=f?l(s[e],e):s[e];return i},qt=function(){for(var t=0,e=arguments.length,n=Pt(this,e);e>t;)n[t]=arguments[t++];return n},Nt=!!W&&o(function(){gt.call(new W(1))}),Ft=function(){return gt.apply(Nt?mt.call(zt(this)):zt(this),arguments)},Ut={copyWithin:function(t,e){return N.call(zt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(zt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return q.apply(zt(this),arguments)},filter:function(t){return Ct(this,tt(zt(this),t,arguments.length>1?arguments[1]:void 0))},fin
this.setPayload(e),this.task="task"+u.config.param_sep}return o(t,[{key:"setPayload",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this.payload=t,this}},{key:"fetch",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];return f.Instance.fetch(function(e){return t.setPayload(e)},e),this}},{key:"maintenance",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"hide":arguments[0],e=(0,s["default"])("#updates [data-maintenance-update]");return e["show"===t?"fadeIn":"fadeOut"](),"hide"===t&&(0,s["default"])(".badges.with-updates").removeClass("with-updates").find(".badge.updates").remove(),this}},{key:"grav",value:function(){var t=this.payload.grav;if(t.isUpdatable){var e=this.task,n='\n <i class="fa fa-bullhorn"></i>\n Grav <b>v'+t.available+"</b> "+u.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+'! <span class="less">('+u.translations.PLUGIN_ADMIN.CURRENT+"v"+t.version+")</span>\n ";n+=t.isSymlink?'<span class="hint--left" style="float: right;" data-hint="'+u.translations.PLUGIN_ADMIN.GRAV_SYMBOLICALLY_LINKED+'"><i class="fa fa-fw fa-link"></i></span>':'<button data-maintenance-update="'+u.config.base_url_relative+"/update.json/"+e+"updategrav/admin-nonce"+u.config.param_sep+u.config.admin_nonce+'" class="button button-small secondary" id="grav-update-button">'+u.translations.PLUGIN_ADMIN.UPDATE_GRAV_NOW+"</button>",(0,s["default"])("[data-gpm-grav]").addClass("grav").html("<p>"+n+"</p>")}return(0,s["default"])("#grav-update-button").on("click",function(){(0,s["default"])(this).html(u.translations.PLUGIN_ADMIN.UPDATING_PLEASE_WAIT+" "+(0,l["default"])(t.assets["grav-update"].size)+"..")}),this}},{key:"resources",value:function(){if(!this.payload.resources.total)return this.maintenance("hide");var t=["plugins","themes"],e=["plugin","theme"],n=this.task,r=this.payload.resources,i=r.plugins,o=r.themes;return this.payload.resources.total?void[i,o].forEach(function(r,i){if(r&&!Array.isArray(r)){var o=Object.keys(r).length,a=t[i];(0,s["default"])('#admin-menu a[href$="/'+t[i]+'"]').find(".badges").addClass("with-updates").find(".badge.updates").text(o);var c=a.charAt(0).toUpperCase()+a.substr(1).toLowerCase(),l=(0,s["default"])(".grav-update."+a);l.html('\n <p>\n <i class="fa fa-bullhorn"></i>\n '+o+" "+u.translations.PLUGIN_ADMIN.OF_YOUR+" "+a+" "+u.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE+'\n <a href="'+u.config.base_url_relative+"/"+a+"/"+n+"update/admin-nonce"+u.config.param_sep+u.config.admin_nonce+'" class="button button-small secondary">'+u.translations.PLUGIN_ADMIN.UPDATE+" All "+c+"</a>\n </p>\n "),Object.keys(r).forEach(function(t){var o=(0,s["default"])("[data-gpm-"+e[i]+'="'+t+'"] .gpm-name'),c=o.find("a");"plugins"!==a||o.find(".badge.update").length?"themes"===a&&o.append('<div class="gpm-ribbon"><a href="'+c.attr("href")+'">'+u.translations.PLUGIN_ADMIN.UPDATE.toUpperCase()+"</a></div>"):o.append('<a class="plugin-update-button" href="'+c.attr("href")+'"><span class="badge update">'+u.translations.PLUGIN_ADMIN.UPDATE_AVAILABLE+"!</span></a>");var l=(0,s["default"])(".grav-update."+e[i]);l.length&&l.html('\n <p>\n <i class="fa fa-bullhorn"></i>\n <strong>v'+r[t].available+"</strong> "+u.translations.PLUGIN_ADMIN.OF_THIS+" "+e[i]+" "+u.translations.PLUGIN_ADMIN.IS_NOW_AVAILABLE+'!\n <a href="'+u.config.base_url_relative+"/"+a+"/"+t+"/"+n+"update/admin-nonce"+u.config.param_sep+u.config.admin_nonce+'" class="button button-small secondary">'+u.translations.PLUGIN_ADMIN.UPDATE+" "+(e[i].charAt(0).toUpperCase()+e[i].substr(1).toLowerCase())+"</a>\n </p>\n ")})}}):this}}]),t}();e["default"]=d;var p=new d;e.Instance=p,f.Instance.on("fetched",function(t,e){p.setPayload(t.payload||{}),p.grav().resources()}),"1"===u.config.enable_auto_updates_check&&f.Instance.fetch()},function(t,e){"use strict
r.on("mousemove._grav",function(t){i.css("height",Math.max(100,t.pageY-n.offset().top))})})}return o(t,[{key:"addButton",value:function(t,e){if(e&&(e.before||e.after)){var n=this.buttons.navigation.findIndex(function(t){var n=Object.keys(t).shift();return t[n].identifier===(e.before||e.after)});~n?this.buttons.navigation.splice(e.before?n:n+1,0,t):e="end"}"start"===e&&this.buttons.navigation.splice(0,0,t),e&&"end"!==e||this.buttons.navigation.push(t)}},{key:"addEditor",value:function(t){t=(0,s["default"])(t);var e=Object.assign({},this.options.codemirror,t.data("grav-editor").codemirror),n=e.theme||"paper";if(this.editors=this.editors.add(t),n&&!~v.indexOf(n)){v.push(n);var r="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.12.0/theme/"+n+".min.css";(0,s["default"])("head").append((0,s["default"])('<link rel="stylesheet" type="text/css" />').attr("href",r))}"yaml"===e.mode&&Object.assign(e.extraKeys,{Tab:function(t){t.replaceSelection(" ","end")}});var i=f["default"].fromTextArea(t.get(0),e);t.data("codemirror",i),t.data("toolbar",new y(t)),e.toolbar===!1&&t.data("toolbar").ui.navigation.addClass("grav-editor-hide-toolbar"),i.on("change",function(){return i.save()})}},{key:"_onAddedNodes",value:function(t,e){var n=this,r=(0,s["default"])(e).find("[data-grav-editor]");r.length&&r.each(function(t,e){e=(0,s["default"])(e),~n.editors.index(e)||n.addEditor(e)})}}]),t}();e["default"]=_;var y=e.Toolbar=function(){function t(e){i(this,t),this.editor=(0,s["default"])(e),this.codemirror=this.editor.data("codemirror"),this.buttons=c["default"].navigation,this.ui={navigation:(0,s["default"])(t.templates().navigation)},this.editor.parent(".grav-editor-content").before(this.ui.navigation).after(this.ui.states),this.renderButtons()}return o(t,null,[{key:"templates",value:function(){return{navigation:'\n <div class="grav-editor-toolbar">\n <div class="grav-editor-actions"></div>\n <div class="grav-editor-modes"></div>\n </div>\n '}}}]),o(t,[{key:"renderButtons",value:function(){var t=this;this.ui.navigation.find(".grav-editor-actions").empty().append("<ul />"),c["default"].navigation.forEach(function(e){Object.keys(e).forEach(function(n){var r=e[n];if(r.modes||(r.modes=[]),!~t.codemirror.options.ignore.indexOf(n)&&(!r.modes.length||r.modes.indexOf(t.codemirror.options.mode)>-1)){var i=(0,s["default"])('<li class="grav-editor-button-'+n+'"><a class="hint--top" data-hint="'+r.title+'" title="'+r.title+'">'+r.label+"</a></li>");t.ui.navigation.find(".grav-editor-actions ul").append(i),r.shortcut&&t.addShortcut(r.identifier,r.shortcut,i),r.action&&r.action.call(r.action,{codemirror:t.codemirror,button:i,textarea:t.editor,ui:t.ui})}})}),this.ui.navigation.find(".grav-editor-modes").empty().append("<ul />"),c["default"].states.forEach(function(e){Object.keys(e).forEach(function(n){var r=e[n];if(r.modes||(r.modes=[]),!~t.codemirror.options.ignore.indexOf(n)&&(!r.modes.length||r.modes.indexOf(t.codemirror.options.mode)>-1)){var i=(0,s["default"])('<li class="grav-editor-button-'+n+'"><a class="hint--top" data-hint="'+r.title+'" title="'+r.title+'">'+r.label+"</a></li>");t.ui.navigation.find(".grav-editor-modes ul").append(i),r.shortcut&&t.addShortcut(r.identifier,r.shortcut,i),r.action&&r.action.call(r.action,{codemirror:t.codemirror,button:i,textarea:t.editor,ui:t.ui})}})})}},{key:"addShortcut",value:function(t,e,n){var r=this,i={};Array.isArray(e)||(e=[e]),e.forEach(function(e){i[e]=function(){n.trigger("click.editor."+t,[r.codemirror])}}),this.codemirror.addKeyMap(i)}}]),t}();e.Instance=new _}).call(e,function(){return this}())},function(t,e,n){(function(t){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.strategies=void 0;var i=n(291),o=r(i),a=n(293),s=n(300),u=r(s),c=function(t){var e=t.name,n=t.replace,r=t.codemirror,i=t.button,o=t.mode,a=void 0===o?"replaceSelections":o,s=t.runner;i.on("click.editor."+e,function(){l[a]({token:"$1",template:n,codemirror:r,runner:s})})},l=e.strategies={r
t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:u,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:h,fontProperties:v,counterDescriptors:_,colorKeywords:b,valueKeywords:w,tokenHooks:{"/":function(t,e){return t.eat("*")?(e.tokenize=n,n(t,e)):!1}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:u,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:w,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},":":function(t){return t.match(/\s*\{/)?[null,"{"]:!1},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return t.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:u,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:h,colorKeywords:b,valueKeywords:w,fontProperties:v,allowNested:!0,tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:u,propertyKeywords:d,nonStandardPropertyKeywords:h,fontProperties:v,counterDescriptors:_,colorKeywords:b,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return t.eat("*")?(e.tokenize=n,n(t,e)):!1}},name:"css",helperType:"gss"})})},function(t,e,n){!function(t){t(n(326),n(362),n(365))}(function(t){"use strict";var e=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;t.defineMode("gfm",function(n,r){function i(t){return t.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(t){return{code:t.code,codeBlock:t.codeBlock,ateSpace:t.ateSpace}},token:function(t,n){if(n.combineTokens=null,n.codeBlock)return t.match(/^```+/)?(n.codeBlock=!1,null):(t.skipToEnd(),null);if(t.sol()&&(n.code=!1),t.sol()&&t.match(/^```+/))return t.skipToEnd(),n.codeBlock=!0,null;if("`"===t.peek()){t.next();var i=t.pos;t.eatWhile("`");var a=1+t.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return t.next(),null;if(t.eatSpace())return n.ateSpace=!0,null;if((t.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"
return{startState:function(){return{base:t.startState(e),overlay:t.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:t.copyState(e,r.base),overlay:t.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(t,i){return(t!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<t.start)&&(i.streamSeen=t,i.basePos=i.overlayPos=t.start),t.start==i.basePos&&(i.baseCur=e.token(t,i.base),i.basePos=t.pos),t.start==i.overlayPos&&(t.pos=t.start,i.overlayCur=n.token(t,i.overlay),i.overlayPos=t.pos),t.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:e.indent&&function(t,n){return e.indent(t.base,n)},electricChars:e.electricChars,innerMode:function(t){return{state:t.base,mode:e}},blankLine:function(t){e.blankLine&&e.blankLine(t.base),n.blankLine&&n.blankLine(t.overlay)}}}})},function(t,e,n){!function(t){t(n(326),n(363),n(367),n(360))}(function(t){"use strict";function e(t,e,n){var r=t.current(),i=r.search(e);return i>-1?t.backUp(r.length-i):r.match(/<\/?$/)&&(t.backUp(r.length),t.match(e,!1)||t.match(r)),n}function n(t){var e=u[t];return e?e:u[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function r(t,e){var r=t.match(n(e));return r?r[2]:""}function i(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var n in t)for(var r=e[n]||(e[n]=[]),i=t[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}function a(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(!i[0]||i[1].test(r(e,i[0])))return i[2]}}var s={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},u={};t.defineMode("htmlmixed",function(n,r){function u(r,o){var s,f=c.token(r,o.htmlState),d=/\btag\b/.test(f);if(d&&!/[<>\s\/]/.test(r.current())&&(s=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(s))o.inTag=s+" ";else if(o.inTag&&d&&/>$/.test(r.current())){var p=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==r.current()&&a(l[p[1]],p[2]),m=t.getMode(n,h),v=i(p[1],!0),g=i(p[1],!1);o.token=function(t,n){return t.match(v,!1)?(n.token=u,n.localState=n.localMode=null,null):e(t,g,n.localMode.token(t,n.localState))},o.localMode=m,o.localState=t.startState(m,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=r.current(),r.eol()&&(o.inTag+=" "));return f}var c=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),l={},f=r&&r.tags,d=r&&r.scriptTypes;if(o(s,l),f&&o(f,l),d)for(var p=d.length-1;p>=0;p--)l.script.unshift(["type",d[p].matches,d[p].mode]);return{startState:function(){var t=c.startState();return{token:u,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(c,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n){return!e.localMode||/^\s*<\//.test(n)?c.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||c}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(326))}(function(t){"use strict";function e(t,e,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}t.defineMode("javascript",function(n,r){function i(t){for(var e,n=!1,r=!1;null!=(e=t.next());){if(!n){if("/"==e&&!r)return;"["==e?r=!0:r&&"]"==e&&(r=!1)}n=!n&&"\\"==e}}function o(t,e,n){return bt=t,xt=n,e}function a(t,n){var r=t.next();i
for(var o=0;o<e.length;++o)t.defineMIME(e[o],n)}function g(t,e){for(var n=!1;!t.eol();){if(!n&&t.match('"""')){e.tokenize=null;break}n="\\"==t.next()&&!n}return"string"}function _(t){return function(e,n){for(var r,i=!1,o=!1;!e.eol();){if(!t&&!i&&e.match('"')){o=!0;break}if(t&&e.match('"""')){o=!0;break}r=e.next(),!i&&"$"==r&&e.match("{")&&e.skipTo("}"),i=!i&&"\\"==r&&!t}return!o&&t||(n.tokenize=null),"string"}}function y(t){return function(e,n){for(var r,i=!1,o=!1;!e.eol();){if(!i&&e.match('"')&&("single"==t||e.match('""'))){o=!0;break}if(!i&&e.match("``")){w=y(t),o=!0;break}r=e.next(),i="single"==t&&!i&&"\\"==r}return o&&(n.tokenize=null),"string"}}t.defineMode("clike",function(s,c){function l(t,e){var n=t.next();if(S[n]){var r=S[n](t,e);if(r!==!1)return r}if('"'==n||"'"==n)return e.tokenize=f(n),e.tokenize(t,e);if(E.test(n))return p=n,null;if(j.test(n)){if(t.backUp(1),t.match(z))return"number";t.next()}if("/"==n){if(t.eat("*"))return e.tokenize=d,d(t,e);if(t.eat("/"))return t.skipToEnd(),"comment"}if(P.test(n))return t.eatWhile(P),"operator";if(t.eatWhile(/[\w\$_\xa1-\uffff]/),O)for(;t.match(O);)t.eatWhile(/[\w\$_\xa1-\uffff]/);var i=t.current();return u(_,i)?(u(x,i)&&(p="newstatement"),u(w,i)&&(h=!0),"keyword"):u(y,i)?"variable-3":u(b,i)?(u(x,i)&&(p="newstatement"),"builtin"):u(k,i)?"atom":"variable"}function f(t){return function(e,n){for(var r,i=!1,o=!1;null!=(r=e.next());){if(r==t&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!A)&&(n.tokenize=null),"string"}}function d(t,e){for(var n,r=!1;n=t.next();){if("/"==n&&r){e.tokenize=null;break}r="*"==n}return"comment"}var p,h,m=s.indentUnit,v=c.statementIndentUnit||m,g=c.dontAlignCalls,_=c.keywords||{},y=c.types||{},b=c.builtin||{},x=c.blockKeywords||{},w=c.defKeywords||{},k=c.atoms||{},S=c.hooks||{},A=c.multiLineStrings,M=c.indentStatements!==!1,I=c.indentSwitch!==!1,O=c.namespaceSeparator,E=c.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,j=c.numberStart||/[\d\.]/,z=c.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,P=c.isOperatorChar||/[+\-*&%=<>!?|\/]/,C=c.endStatement||/^[;:,]$/;return{startState:function(t){return{tokenize:null,context:new e((t||0)-m,0,"top",!1),indented:0,startOfLine:!0,prevToken:null}},token:function(t,e){var s=e.context;if(t.sol()&&(null==s.align&&(s.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return null;p=h=null;var u=(e.tokenize||l)(t,e);if("comment"==u||"meta"==u)return u;if(null==s.align&&(s.align=!0),C.test(p))for(;n(e.context.type);)i(e);else if("{"==p)r(e,t.column(),"}");else if("["==p)r(e,t.column(),"]");else if("("==p)r(e,t.column(),")");else if("}"==p){for(;n(s.type);)s=i(e);for("}"==s.type&&(s=i(e));n(s.type);)s=i(e)}else if(p==s.type)i(e);else if(M&&(("}"==s.type||"top"==s.type)&&";"!=p||n(s.type)&&"newstatement"==p)){var f="statement";"newstatement"==p&&I&&"switch"==t.current()?f="switchstatement":"keyword"==u&&"namespace"==t.current()&&(f="namespace"),r(e,t.column(),f)}if("variable"==u&&("def"==e.prevToken||c.typeFirstDefinitions&&o(t,e)&&a(e.context)&&t.match(/^\s*\(/,!1))&&(u="def"),S.token){var d=S.token(t,e,u);void 0!==d&&(u=d)}return"def"==u&&c.styleDefs===!1&&(u="variable"),e.startOfLine=!1,e.prevToken=h?"def":u||p,u},indent:function(e,r){if(e.tokenize!=l&&null!=e.tokenize)return t.Pass;var i=e.context,o=r&&r.charAt(0);if(n(i.type)&&"}"==o&&(i=i.prev),S.indent){var a=S.indent(e,i,r);if("number"==typeof a)return a}var s=o==i.type,u=i.prev&&"switchstatement"==i.prev.type;if(c.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=i.type&&"}"!=i.type;)i=i.prev;return i.indented}return n(i.type)?i.indented+("{"==o?0:v):!i.align||g&&")"==i.type?")"!=i.type||s?i.indented+(s?0:m)+(s||!u||/^(?:case|default)\b/.test(r)?0:m):i.indented+v:i.column+(s?0:1)},electricInput:I?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",x="int long char short double float unsigned signed
for(var n=0;n<t.length;n++){var r=t[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(c(r.parts[o],e))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(c(r.parts[o],e));p[r.id]={id:r.id,refs:1,parts:a}}}}function i(t){for(var e=[],n={},r=0;r<t.length;r++){var i=t[r],o=i[0],a=i[1],s=i[2],u=i[3],c={css:a,media:s,sourceMap:u};n[o]?n[o].parts.push(c):e.push(n[o]={id:o,parts:[c]})}return e}function o(t,e){var n=v(),r=y[y.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),y.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function a(t){t.parentNode.removeChild(t);var e=y.indexOf(t);e>=0&&y.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function c(t,e){var n,r,i;if(e.singleton){var o=_++;n=g||(g=s(e)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(e),r=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),r=f.bind(null,n),i=function(){a(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function l(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media;e.sourceMap;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e){var n=e.css,r=(e.media,e.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var p={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},m=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,_=0,y=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=m()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],a=0;a<n.length;a++){var s=n[a],u=p[s.id];u.refs--,o.push(u)}if(t){var c=i(t);r(c,e)}for(var a=0;a<o.length;a++){var u=o[a];if(0===u.refs){for(var l=0;l<u.parts.length;l++)u.parts[l]();delete p[u.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){!function(t){t(n(326))}(function(t){"use strict";t.registerHelper("lint","css",function(e){var n=[];if(!window.CSSLint)return n;for(var r=CSSLint.verify(e),i=r.messages,o=null,a=0;a<i.length;a++){o=i[a];var s=o.line-1,u=o.line-1,c=o.col-1,l=o.col;n.push({from:t.Pos(s,c),to:t.Pos(u,l),message:o.message,severity:o.type})}return n})})},function(t,e,n){!function(t){t(n(326))}(function(t){"use strict";function e(t,e){if(!window.JSHINT)return[];JSHINT(t,e,e.globals);var n=JSHINT.data().errors,r=[];return n&&o(n,r),r}function n(t){return r(t,s,"warning",!0),r(t,u,"error"),i(t)?null:t}function r(t,e,n,r){var i,o,a,s,u;i=t.description;for(var c=0;c<e.length;c++)o=e[c],a="string"==typeof o?o:o[0],s="string"==typeof o?null:o[1],u=-1!==i.indexOf(a),(r||u)&&(t.severity=n),u&&s&&(t.description=s)}function i(t){for(var e=t.description,n=0;n<a.length;n++)if(-1!==e.indexOf(a[n]))return!0;return!1}function o(e,r){for(var i=0;i<e.length;i++){var o=e[i];if(o){var a,s;if(a=[],o.evidence){var u=a[o.line];if(!u){var c=o.evidence;u=[],Array.prototype.forEach.call(c,fun
return Ne(t)&&c(t)}function Ke(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function We(){return rr||(rr=Ke(ee()))}function Ge(t){return null===t||void 0===t?Je():$e(t)?t:Je().unshiftAll(t)}function $e(t){return!(!t||!t[ir])}function He(t,e,n,r){var i=Object.create(or);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Je(){return ar||(ar=He(0))}function Ye(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Qe(t,e){return e}function Xe(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):t}function nn(){return p(arguments)}function rn(t,e){return e>t?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+sn(ot(t),ot(e))|0}:function(t,e){r=r+sn(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0});return an(i,r)}function an(t,e){return e=zn(e,3432918353),e=zn(e<<15|e>>>-15,461845907),e=zn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=zn(e^e>>>16,2246822507),e=zn(e^e>>>13,3266489909),e=it(e^e>>>16)}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var un=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=s,e.isAssociative=u,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",pn="delete",hn=5,mn=1<<hn,vn=mn-1,gn={},_n={value:!1},yn={value:!1},bn=0,xn=1,wn=2,kn="function"==typeof Symbol&&Symbol.iterator,Sn="@@iterator",An=kn||Sn;x.prototype.toString=function(){return"[Iterator]"},x.KEYS=bn,x.VALUES=xn,x.ENTRIES=wn,x.prototype.inspect=x.prototype.toSource=function(){return this.toString()},x.prototype[An]=function(){return this},t(E,e),E.of=function(){return E(arguments)},E.prototype.toSeq=function(){return this},E.prototype.toString=function(){return this.__toString("Seq {","}")},E.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},E.prototype.__iterate=function(t,e){return V(this,t,e,!0)},E.prototype.__iterator=function(t,e){return K(this,t,e,!0)},t(j,E),j.prototype.toKeyedSeq=function(){return this},t(z,E),z.of=function(){return z(arguments)},z.prototype.toIndexedSeq=function(){return this},z.prototype.toString=function(){return this.__toString("Seq [","]")},z.prototype.__iterate=function(t,e){return V(this,t,e,!1)},z.prototype.__iterator=function(t,e){return K(this,t,e,!1)},t(P,E),P.of=function(){return P(arguments)},P.prototype.toSetSeq=function(){return this},E.isSeq=q,E.Keyed=j,E.Set=P,E.Indexed=z;var Mn="@@__IMMUTABLE_SEQ__@@";E.prototype[Mn]=!0,t(C,z),C.prototype.get=function(t,e){return this.has(t)?this._array[m(this,t)]:e},C.prototype.__iterate=function(t,e){for(var n=this._array,r=n.length-1,i=0;r>=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},C.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new x(function(){return i>r?k():w(t,i,n[e?r-i++:i++])})},t(T,j),T.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},T.prototype.has=function(t){return this._object.hasOwnProperty(t)},T.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[e?i-o:o];if(t(n[a],a,this)===!1)return o+1}return o},T.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new x(function(){var a=r[e?i-o:o];return o++>i?k():w(t,a,n[a])})},T.prototype[dn]=!0,t(L,z),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=M(n),i=0;if(A(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},L.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._ite
2016-03-04 18:02:53 -08:00
},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return Se(this,ce(this,!1))},slice:function(t,e){return Se(this,pe(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=_(t,0>t?this.count():this.size);var r=this.slice(0,t);return Se(this,1===n?r:r.concat(p(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return Se(this,ge(this,t,!1))},get:function(t,e){return t=m(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=m(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Se(this,ye(this,t))},interleave:function(){var t=[this].concat(p(arguments)),e=ke(this.toSeq(),z.of,t),n=e.flatten(!0);return e.size&&(n.size=e.size*t.length),Se(this,n)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Se(this,me(this,t,e,!1))},zip:function(){var t=[this].concat(p(arguments));return Se(this,ke(this,nn,t))},zipWith:function(t){var e=p(arguments);return e[0]=this,Se(this,ke(this,t,e))}}),r.prototype[fn]=!0,r.prototype[dn]=!0,Ye(i,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=sr.includes,Ye(j,n.prototype),Ye(z,r.prototype),Ye(P,i.prototype),Ye(et,n.prototype),Ye(nt,r.prototype),Ye(rt,i.prototype);var cr={Iterable:e,Seq:E,Collection:tt,Map:ft,OrderedMap:Xt,List:Ft,Stack:Ge,Set:qe,OrderedSet:Be,Record:Pe,Range:Z,Repeat:Q,is:J,fromJS:W};return cr})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(291),s=r(a),u=n(289),c=r(u),l=n(293),f=n(386),d=function(){function t(e){var n=this;i(this,t),this.form=(0,s["default"])(e),this.form.length&&"form"===this.form.prop("tagName").toLowerCase()&&(this.form.on("submit",function(t){f.Instance.equals()&&(t.preventDefault(),c["default"].info(l.translations.PLUGIN_ADMIN.NOTHING_TO_SAVE))}),this._attachShortcuts(),this._attachToggleables(),this._attachDisabledFields(),this.observer=new MutationObserver(this.addedNodes),this.form.each(function(t,e){return n.observer.observe(e,{subtree:!0,childList:!0})}))}return o(t,[{key:"_attachShortcuts",value:function(){var t=(0,s["default"])('[name="task"][value="save"]').filter(function(t,e){return e=(0,s["default"])(e),!e.parents(".remodal-overlay").length});t.length&&(0,s["default"])(window).on("keydown",function(e){var n=String.fromCharCode(e.which).toLowerCase();(e.ctrlKey&&!e.altKey||e.metaKey)&&"s"===n&&(e.preventDefault(),t.click())})}},{key:"_attachToggleables",value:function(){var t='[data-grav-field="toggleable"] input[type="checkbox"]';this.form.on("change",t,function(t){var e=(0,s["default"])(t.target),n=e.is(":checked"),r=e.parents(".form-field"),i=r.find("label.toggleable"),o=r.find(".form-data"),a=o.find("input, select, textarea");i.add(o).css("opacity",n?"":.7),a.map(function(t,e){var r=e.selectize;e=(0,s["default"])(e),r?r[n?"enable":"disable"]():e.prop("disabled",!n)})}),this.form.find(t).trigger("change")}},{key:"_attachDisabledFields",value:function(){var t=".form-field-toggleable .form-data",e=[];["input","select","label[for]","textarea",".selectize-control"].forEach(function(n){e.push(t+" "+n)}),this.form.on("mousedown",e.join(", "),function(t){var e=(0,s["default"])(t.target),n=e,r=n.prop("for"),i=(n.hasClass("selectize-control")||n.parents(".selectize-control")).length;if(r&&(n=(0,s["default"])('[id="
}),toString:a(function(){return"[object Array Iterator]"})})},function(t,e,n){"use strict";var r,i=n(484),o=n(499),a=n(497),s=n(485),u=n(498),c=n(524),l=n(511),f=Object.defineProperty,d=Object.defineProperties;t.exports=r=function(t,e){return this instanceof r?(d(this,{__list__:u("w",s(t)),__context__:u("w",e),__nextIndex__:u("w",0)}),void(e&&(a(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear)))):new r(t,e)},d(r.prototype,o({constructor:u(r),_next:u(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:u(function(){return this._createResult(this._next())}),_createResult:u(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:u(function(t){return this.__list__[t]}),_unBind:u(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:u(function(){return"[object Iterator]"})},c({_onAdd:u(function(t){if(!(t>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void f(this,"__redo__",u("c",[t]));this.__redo__.forEach(function(e,n){e>=t&&(this.__redo__[n]=++e)},this),this.__redo__.push(t)}}),_onDelete:u(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),-1!==e&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,n){e>t&&(this.__redo__[n]=--e)},this)))}),_onClear:u(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),f(r.prototype,l.iterator,u(function(){return this})),f(r.prototype,l.toStringTag,u("","Iterator"))},function(t,e,n){"use strict";var r,i=n(525),o=n(526),a=n(497),s=n(485),u=Function.prototype.bind,c=Object.defineProperty,l=Object.prototype.hasOwnProperty;r=function(t,e,n){var r,o=s(e)&&a(e.value);return r=i(e),delete r.writable,delete r.value,r.get=function(){return l.call(this,t)?o:(e.value=u.call(o,null==n?this:this[n]),c(this,t,e),this[t])},r},t.exports=function(t){var e=arguments[1];return o(t,function(t,n){return r(n,t,e)})}},function(t,e,n){"use strict";var r=n(499),i=n(485);t.exports=function(t){var e=Object(i(t));return e!==t?e:r({},t)}},function(t,e,n){"use strict";var r=n(497),i=n(527),o=Function.prototype.call;t.exports=function(t,e){var n={},a=arguments[2];return r(e),i(t,function(t,r,i,s){n[r]=o.call(e,a,t,r,i,s)}),n}},function(t,e,n){"use strict";t.exports=n(528)("forEach")},function(t,e,n){"use strict";var r=n(497),i=n(485),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(n,c){var l,f=arguments[2],d=arguments[3];return n=Object(i(n)),r(c),l=s(n),d&&l.sort("function"==typeof d?o.call(d,n):void 0),"function"!=typeof t&&(t=l[t]),a.call(t,l,function(t,r){return u.call(n,t)?a.call(c,f,n[t],t,n,r):e})}}},function(t,e,n){"use strict";var r,i=n(492),o=n(498),a=n(523),s=Object.defineProperty;r=t.exports=function(t){return this instanceof r?(t=String(t),a.call(this,t),void s(this,"__length__",o("",t.length))):new r(t)},i&&i(r,a),r.prototype=Object.create(a.prototype,{constructor:o(r),_next:o(function(){return this.__list__?this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind():void 0}),_resolve:o(function(t){var e,n=this.__list__[t];return this.__nextIndex__===this.__length__?n:(e=n.charCodeAt(0),e>=55296&&56319>=e?n+this.__list__[this.__nextIndex__++]:n)}),toString:o(function(){return"[object String Iterator]"})})},function(t,e,n){"use strict";var r,i=n(492),o=n(498),a=n(523),s=n(511).toStringTag,u=n(531),c=Object.defineProperties,l=a.prototype._unBind;r=t.exports=function(t,e){return this instanceof r?(a.call(this,t.__mapKeysData__,t),e&&u[e]||(e="key+value"),void c(this,{__kind__:o("",e),__values__:o("w",t.__mapValuesData__)})):new r(t,e)},i&&i(r,a),r.prototype=Object.create(a.prototype,{constructor:o(r),_reso
2016-02-05 12:37:48 -08:00
//# sourceMappingURL=admin.min.js.map