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

19 lines
365 KiB
JavaScript
Raw Normal View History

2016-03-11 18:52:54 +01:00
var Grav=webpackJsonpGrav([0],[function(t,e,n){(function(t){"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(2),s=r(a),u=n(295),c=r(u),l=n(296),f=r(l),d=n(301),h=r(d),p=n(306),m=r(p),v=n(385),g=r(v),_=n(475),y=r(_);n(477),n(478),n(479),n(480),n(481),n(482);var b=n(484),x=r(b);c["default"].start(),t.setInterval(function(){_.Instance.update(),b.Instance.scroller.update()},150),(0,o["default"])(t).on("sidebar_state._grav",function(){(0,o["default"])("#admin-menu").data("scrollbar").update(),(0,o["default"])("#admin-main .content-wrapper").data("scrollbar").update(),Object.keys(h["default"].Chart.Instances).forEach(function(t){h["default"].Chart.Instances[t].chart.update()})}),e["default"]={GPM:{GPM:s["default"],Instance:a.Instance},KeepAlive:c["default"],Dashboard:h["default"],Pages:m["default"],Forms:g["default"],Scrollbar:{Scrollbar:y["default"],Instance:_.Instance},Updates:{Updates:f["default"],Instance:l.Instance},Sidebar:{Sidebar:x["default"],Instance:b.Instance}}}).call(e,function(){return this}())},,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(289),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(3))},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)},
}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?0>t?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(15);i(i.S,"Math",{asinh:r})},function(t,e,n){var r=n(15);r(r.S,"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(15),i=n(113);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},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(15);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(15),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(15);r(r.S,"Math",{expm1:n(117)})},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(15),i=n(113),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(15),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(15),i=Math.imul;r(r.S+r.F*n(14)(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(15);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(15);r(r.S,"Math",{log1p:n(109)})},function(t,e,n){var r=n(15);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(15);r(r.S,"Math",{sign:n(113)})},function(t,e,n){var r=n(15),i=n(117),o=Math.exp;r(r.S+r.F*n(14)(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(15),i=n(117),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(15);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(15),i=n(42),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(15),i=n(35),o=n(40);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(87)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(132)(!0);n(133)(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(41),i=n(38);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(55),i=n(15),o=n(24),a=n(16),s=n(12),u=n(134),c=n(135),l=n(30),f=n(63),d=n(31)("iterator"),h=!([].keys&&"next"in[].keys()),p="@@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,E=function(t){if(!h&&t in O)return O[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)}},A=e+" Iterator",M=y==
}})},$=function(t,e,n,r){var i=+n,o=f(i);if(i!=o||0>o||o+e>t[q])throw E(x);var a=t[D]._b,s=o+t[N],u=a.slice(s,s+e);return r?u:u.reverse()},J=function(t,e,n,r,i,o){var a=+n,s=f(a);if(a!=s||0>s||s+e>t[q])throw E(x);for(var u=t[D]._b,c=s+t[N],l=r(+i),d=0;e>d;d++)u[c+d]=l[o?d:e-d-1]},Y=function(t,e){l(t,w,g);var n=+e,r=d(n);if(n!=r)throw E(b);return r};if(a.ABV){if(!c(function(){new w})||!c(function(){new w(.5)})){w=function(t){return new M(Y(this,t))};for(var X,Q=w[y]=M[y],Z=h(M),tt=0;Z.length>tt;)(X=Z[tt++])in w||s(w,X,M[X]);o||(Q.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 E("Wrong offset!");if(n=void 0===n?r-i:d(n),i+n>r)throw E(b);this[D]=t,this[N]=i,this[q]=n},i&&(G(w,T,"_l"),G(k,P,"_b"),G(k,T,"_l"),G(k,L,"_o")),u(k[y],{getInt8:function(t){return $(this,1,t)[0]<<24>>24},getUint8:function(t){return $(this,1,t)[0]},getInt16:function(t){var e=$(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=$(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return U($(this,4,t,arguments[1]))},getUint32:function(t){return U($(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return R($(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return R($(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,H,e,arguments[2])},setUint32:function(t,e){J(this,4,t,H,e,arguments[2])},setFloat32:function(t,e){J(this,4,t,K,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(15);r(r.G+r.W+r.F*!n(219).ABV,{DataView:n(220).DataView})},function(t,e,n){n(223)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(13)){var r=n(55),i=n(10),o=n(14),a=n(15),s=n(219),u=n(220),c=n(26),l=n(94),f=n(23),d=n(16),h=n(210),p=(n(101),n(41)),m=n(40),v=n(42),g=n(22),_=n(12),y=n(75),b=n(79),x=n(19),w=n(62),k=n(165),S=n(49),E=n(63),A=n(53).f,M=(n(224),n(166)),I=n(25),O=n(31),j=n(174),z=n(39),C=n(207),P=n(194),T=n(134),L=n(167),D=n(193),q=n(189),N=n(186),F=n(17),R=n(54),U=F.f,B=R.f,V=i.RangeError,H=i.TypeError,W=i.Uint8Array,K="ArrayBuffer",G="Shared"+K,$="BYTES_PER_ELEMENT",J="prototype",Y=Array[J],X=u.ArrayBuffer,Q=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=P.values,ut=P.keys,ct=P.entries,lt=Y.lastIndexOf,ft=Y.reduce,dt=Y.reduceRight,ht=Y.join,pt=Y.sort,mt=Y.slice,vt=Y.toString,gt=Y.toLocaleString,_t=O("iterator"),yt=O("toStringTag"),bt=I("typed_constructor"),xt=I("def_constructor"),wt=s.CONSTR,kt=s.TYPED,St=s.VIEW,Et="Wrong length!",At=j(1,function(t,e){return Ct(C(t,t[xt]),e)}),Mt=o(function(){return 1===new W(new Uint16Array([1]).buffer)[0]}),It=!!W&&!!W[J].set&&o(function(){new W(1).set({})}),Ot=function(t,e){if(void 0===t)throw H(Et);var n=+t,r=m(t);if(e&&!y(n,r))throw V(Et);return r},jt=function(t,e){var n=p(t);if(0>n||n%e)throw V("Wrong offset!");return n},zt=function(t){if(x(t)&&kt in t)return t;throw H(t+" is not a typed array!")},Ct=function(t,e){if(!(x(t)&&bt in t))throw H("It is not a typed array constructor!");return new t(e)},Pt=function(t,e){return Tt(C(t,t[xt]),e)},Tt=function(t,e){for(var n=0,r=e.length,i=Ct(t,r);r>n;)i[n]=e[n++];return i},Lt=function(t,e,n){U(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=M(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=Ct(this,n);n>e;e++)i[e]=f?l(s[e],e):s[e];return i}
2016-03-11 18:45:38 +01:00
}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(1),s=r(a),u=n(293),c=n(297),l=r(c),f=n(2);n(298),n(299);var d=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,t),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+=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>",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 ",(0,s["default"])("[data-gpm-grav]").css("display","block").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.css("display","block").html('\n <p>\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 <i class="fa fa-bullhorn"></i>\n '+o+" "+u.translations.PLUGIN_ADMIN.OF_YOUR+" "+a+" "+u.translations.PLUGIN_ADMIN.HAVE_AN_UPDATE_AVAILABLE+"\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 <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).toUpperCas
n(365),n(374),n(375),n(376),n(380),n(381),n(382),n(383),t.jsyaml=p["default"];var m=!1,v=["paper"],g={codemirror:{mode:"htmlmixed",theme:"paper",lineWrapping:!0,dragDrop:!0,autoCloseTags:!0,matchTags:!0,autoCloseBrackets:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!1,tabSize:4,hintOptions:{completionSingle:!1},extraKeys:{Enter:"newlineAndIndentContinueMarkdownList"}}},_=function(){function t(e){var n=this;i(this,t);var r=(0,s["default"])("body");this.editors=(0,s["default"])(),this.options=Object.assign({},g,e),this.buttons=c["default"],this.buttonStrategies=u.strategies,(0,d.watch)(c["default"],function(){n.editors.each(function(t,e){return(0,s["default"])(e).data("toolbar").renderButtons()})}),(0,s["default"])("[data-grav-editor]").each(function(t,e){return n.addEditor(e)}),(0,s["default"])(function(){r.trigger("grav-editor-ready")}),r.on("mutation._grav",this._onAddedNodes.bind(this)),r.on("mouseup._grav",function(){return m?(r.unbind("mousemove._grav"),void(m=!1)):!0}),r.on("mousedown._grav",".grav-editor-resizer",function(t){t&&t.preventDefault(),m=!0;var e=(0,s["default"])(t.currentTarget),n=e.siblings(".grav-editor-content"),i=n.find(".CodeMirror"),o=n.find("textarea").data("codemirror");r.on("mousemove._grav",function(t){i.css("height",Math.max(100,t.pageY-n.offset().top)),o.refresh()})})}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){Obje
t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:u,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,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:p,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:p,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:p,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,"
2016-03-11 18:52:54 +01:00
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 h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==r.current()&&a(l[h[1]],h[2]),m=t.getMode(n,p),v=i(h[1],!0),g=i(h[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 h=d.length-1;h>=0;h--)l.script.unshift(["type",d[h].matches,d[h].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(O.test(n))return h=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(C.test(n))return t.eatWhile(C),"operator";if(t.eatWhile(/[\w\$_\xa1-\uffff]/),I)for(;t.match(I);)t.eatWhile(/[\w\$_\xa1-\uffff]/);var i=t.current();return u(_,i)?(u(x,i)&&(h="newstatement"),u(w,i)&&(p=!0),"keyword"):u(y,i)?"variable-3":u(b,i)?(u(x,i)&&(h="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&&!E)&&(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 h,p,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||{},E=c.multiLineStrings,A=c.indentStatements!==!1,M=c.indentSwitch!==!1,I=c.namespaceSeparator,O=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,C=c.isOperatorChar||/[+\-*&%=<>!?|\/]/,P=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;h=p=null;var u=(e.tokenize||l)(t,e);if("comment"==u||"meta"==u)return u;if(null==s.align&&(s.align=!0),P.test(h))for(;n(e.context.type);)i(e);else if("{"==h)r(e,t.column(),"}");else if("["==h)r(e,t.column(),"]");else if("("==h)r(e,t.column(),")");else if("}"==h){for(;n(s.type);)s=i(e);for("}"==s.type&&(s=i(e));n(s.type);)s=i(e)}else if(h==s.type)i(e);else if(A&&(("}"==s.type||"top"==s.type)&&";"!=h||n(s.type)&&"newstatement"==h)){var f="statement";"newstatement"==h&&M&&"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=p?"def":u||h,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:M?/^\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
2016-03-11 18:52:54 +01:00
for(var n=0;n<t.length;n++){var r=t[n],i=h[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));h[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 h={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},m=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=p(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=h[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 h[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
})})}function Ve(t){return Ne(t)&&c(t)}function He(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=He(ee()))}function Ke(t){return null===t||void 0===t?Je():Ge(t)?t:Je().unshiftAll(t)}function Ge(t){return!(!t||!t[ir])}function $e(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=$e(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 Xe(t,e){return e}function Qe(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 h(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__@@",hn="delete",pn=5,mn=1<<pn,vn=mn-1,gn={},_n={value:!1},yn={value:!1},bn=0,xn=1,wn=2,kn="function"==typeof Symbol&&Symbol.iterator,Sn="@@iterator",En=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[En]=function(){return this},t(O,e),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(t,e){return V(this,t,e,!0)},O.prototype.__iterator=function(t,e){return H(this,t,e,!0)},t(j,O),j.prototype.toKeyedSeq=function(){return this},t(z,O),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 H(this,t,e,!1)},t(C,O),C.of=function(){return C(arguments)},C.prototype.toSetSeq=function(){return this},O.isSeq=q,O.Keyed=j,O.Set=C,O.Indexed=z;var An="@@__IMMUTABLE_SEQ__@@";O.prototype[An]=!0,t(P,z),P.prototype.get=function(t,e){return this.has(t)?this._array[m(this,t)]:e},P.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},P.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=A(n),i=0;if(E(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(
},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,he(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(h(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(h(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(h(arguments));return Se(this,ke(this,nn,t))},zipWith:function(t){var e=h(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(C,i.prototype),Ye(et,n.prototype),Ye(nt,r.prototype),Ye(rt,i.prototype);var cr={Iterable:e,Seq:O,Collection:tt,Map:ft,OrderedMap:Qt,List:Ft,Stack:Ke,Set:qe,OrderedSet:Be,Record:Ce,Range:Z,Repeat:X,is:J,fromJS:W};return cr})},function(t,e,n){(function(t){"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(1),s=r(a),u=function(){function e(t){var n=this;i(this,e),this.form=(0,s["default"])(t),this.form.length&&"form"===this.form.prop("tagName").toLowerCase()&&(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(e,[{key:"_attachShortcuts",value:function(){var e=(0,s["default"])('[name="task"][value="save"]').filter(function(t,e){return e=(0,s["default"])(e),!e.parents(".remodal-overlay").length});e.length&&(0,s["default"])(t).on("keydown",function(t){var n=String.fromCharCode(t.which).toLowerCase();(t.ctrlKey&&!t.altKey||t.metaKey)&&"s"===n&&(t.preventDefault(),e.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="'+r+'"]')),i&&(n=n.closest(".selectize-control").siblings("select[name]")),!n.prop("disabled"))return!0;var o=n.closest(".form-field").find('[data-grav-field="toggleable
* gemini-scrollbar
* @version 1.3.2
* @link http://noeldelgado.github.io/gemini-scrollbar/
* @license MIT
*/
2016-03-11 18:45:38 +01:00
!function(){function e(){var t,e=document.createElement("div");return e.style.position="absolute",e.style.top="-9999px",e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),t}function n(t,e){return t.classList?e.forEach(function(e){t.classList.add(e)}):void(t.className+=" "+e.join(" "))}function r(t,e){return t.classList?e.forEach(function(e){t.classList.remove(e)}):void(t.className=t.className.replace(new RegExp("(^|\\b)"+e.join("|")+"(\\b|$)","gi")," "))}function i(t){this.element=null,this.autoshow=!1,this.createElements=!0,this.forceGemini=!1,Object.keys(t||{}).forEach(function(e){this[e]=t[e]},this),o=e(),a=0===o&&this.forceGemini===!1,this._cache={events:{}},this._created=!1,this._cursorDown=!1,this._prevPageX=0,this._prevPageY=0,this._document=null,this._window=null,this._viewElement=this.element,this._scrollbarVerticalElement=null,this._thumbVerticalElement=null,this._scrollbarHorizontalElement=null,this._scrollbarHorizontalElement=null}var o,a,s;s={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"},i.prototype.create=function(){if(a)return n(this.element,[s.prevented]),this;if(this._created===!0)return console.warn("calling on a already-created object"),this;if(this.autoshow&&n(this.element,[s.autoshow]),this._document=document,this._window=window,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("."+s.view),this._scrollbarVerticalElement=this.element.querySelector("."+s.verticalScrollbar.split(" ").join(".")),this._thumbVerticalElement=this._scrollbarVerticalElement.querySelector("."+s.thumb),this._scrollbarHorizontalElement=this.element.querySelector("."+s.horizontalScrollbar.split(" ").join(".")),this._thumbHorizontalElement=this._scrollbarHorizontalElement.querySelector("."+s.thumb);return n(this.element,[s.element]),n(this._viewElement,[s.view]),n(this._scrollbarVerticalElement,s.verticalScrollbar.split(/\s/)),n(this._scrollbarHorizontalElement,s.horizontalScrollbar.split(/\s/)),n(this._thumbVerticalElement,[s.thumb]),n(this._thumbHorizontalElement,[s.thumb]),this._scrollbarVerticalElement.style.display="",this._scrollbarHorizontalElement.style.display="",this._created=!0,this._bindEvents().update()},i.prototype.update=function(){if(a)return this;if(this._created===!1)return console.warn("calling on a not-yet-created object"),this;var t,e;return this._viewElement.style.width="",this._viewElement.style.height="",this._viewElement.style.width=(this.element.offsetWidth+o).toString()+"px",this._viewElement.style.height=(this.element.offsetHeight+o).toString()+"px",t=100*this._viewElement.clientHeight/this._viewElement.scrollHeight,e=100*this._viewElement.clientWidth/this._viewElement.scrollWidth,this._thumbVerticalElement.style.height=100>t?t+"%":"",this._thumbHorizontalElement.style.width=100>e?e+"%":"",this._scrollHandler(),this},i.prototype.destroy=function(){if(a)return this;if(this._created===!1)return console.warn("calling on a not-yet-created object"),this;if(this._unbinEvents(),r(this.element,[s.element,s.autoshow]),this.createElements===!0){for(this.element.removeCh
})),f(r.prototype,l.toStringTag,u("","Iterator"))},function(t,e,n){"use strict";var r,i=n(529),o=n(530),a=n(501),s=n(489),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(503),i=n(489);t.exports=function(t){var e=Object(i(t));return e!==t?e:r({},t)}},function(t,e,n){"use strict";var r=n(501),i=n(531),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(532)("forEach")},function(t,e,n){"use strict";var r=n(501),i=n(489),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(496),o=n(502),a=n(527),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(496),o=n(502),a=n(527),s=n(515).toStringTag,u=n(535),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),_resolve:o(function(t){return"value"===this.__kind__?this.__values__[t]:"key"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]}),_unBind:o(function(){this.__values__=null,l.call(this)}),toString:o(function(){return"[object Map Iterator]"})}),Object.defineProperty(r.prototype,s,o("c","Map Iterator"))},function(t,e,n){"use strict";t.exports=n(536)("key","value","key+value")},function(t,e){"use strict";var n=Array.prototype.forEach,r=Object.create;t.exports=function(t){var e=r(null);return n.call(arguments,function(t){e[t]=!0}),e}},function(t,e){"use strict";t.exports=function(){return"undefined"==typeof Map?!1:"[object Map]"===Object.prototype.toString.call(new Map)}()}]);
2016-02-05 12:37:48 -08:00
//# sourceMappingURL=admin.min.js.map