bookstack/public/js/common.js

12 lines
350 KiB
JavaScript
Raw Normal View History

2016-07-03 17:56:16 +08:00
!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){!function(e,t){"use strict";function n(e,t,n){if(!e)throw me("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function r(e,t){return e||t?e?t?(z(e)&&(e=e.join(" ")),z(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function i(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}function o(e,t,n){var r="";return e=z(e)?e:e&&H(e)&&e.length?e.split(/\s+/):[],V(e,function(e,i){e&&e.length>0&&(r+=i>0?" ":"",r+=n?t+e:e+t)}),r}function a(e,t){var n=e.indexOf(t);t>=0&&e.splice(n,1)}function s(e){if(e instanceof U)switch(e.length){case 0:return[];case 1:if(e[0].nodeType===Z)return e;break;default:return U(u(e))}return e.nodeType===Z?U(e):void 0}function u(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==Z)return n}}function l(e,t,n){V(t,function(t){e.addClass(t,n)})}function c(e,t,n){V(t,function(t){e.removeClass(t,n)})}function f(e){return function(t,n){n.addClass&&(l(e,t,n.addClass),n.addClass=null),n.removeClass&&(c(e,t,n.removeClass),n.removeClass=null)}}function d(e){if(e=e||{},!e.$$prepared){var t=e.domOperation||j;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=j},e.$$prepared=!0}return e}function h(e,t){p(e,t),m(e,t)}function p(e,t){t.from&&(e.css(t.from),t.from=null)}function m(e,t){t.to&&(e.css(t.to),t.to=null)}function g(e,t,n){var r=t.options||{},i=n.options||{},o=(r.addClass||"")+" "+(i.addClass||""),a=(r.removeClass||"")+" "+(i.removeClass||""),s=v(e.attr("class"),o,a);i.preparationClasses&&(r.preparationClasses=C(i.preparationClasses,r.preparationClasses),delete i.preparationClasses);var u=r.domOperation!==j?r.domOperation:null;return R(r,i),u&&(r.domOperation=u),s.addClass?r.addClass=s.addClass:r.addClass=null,s.removeClass?r.removeClass=s.removeClass:r.removeClass=null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function v(e,t,n){function r(e){H(e)&&(e=e.split(" "));var t={};return V(e,function(e){e.length&&(t[e]=!0)}),t}var i=1,o=-1,a={};e=r(e),t=r(t),V(t,function(e,t){a[t]=i}),n=r(n),V(n,function(e,t){a[t]=a[t]===i?null:o});var s={addClass:"",removeClass:""};return V(a,function(t,n){var r,a;t===i?(r="addClass",a=!e[n]):t===o&&(r="removeClass",a=e[n]),a&&(s[r].length&&(s[r]+=" "),s[r]+=n)}),s}function $(e){return e instanceof t.element?e[0]:e}function y(e,t,n){var r="";t&&(r=o(t,X,!0)),n.addClass&&(r=C(r,o(n.addClass,Q))),n.removeClass&&(r=C(r,o(n.removeClass,J))),r.length&&(n.preparationClasses=r,e.addClass(r))}function b(e,t){t.preparationClasses&&(e.removeClass(t.preparationClasses),t.preparationClasses=null),t.activeClasses&&(e.removeClass(t.activeClasses),t.activeClasses=null)}function w(e,t){var n=t?"-"+t+"s":"";return k(e,[he,n]),[he,n]}function x(e,t){var n=t?"paused":"",r=I+le;return k(e,[r,n]),[r,n]}function k(e,t){var n=t[0],r=t[1];e.style[n]=r}function C(e,t){return e?t?e+" "+t:e:t}function S(e){return[de,e+"s"]}function _(e,t){var n=t?fe:he;return[n,e+"s"]}function E(e,t,n){var r=Object.create(null),i=e.getComputedStyle(t)||{};return V(n,function(e,t){var n=i[e];if(n){var o=n.charAt(0);("-"===o||"+"===o||o>=0)&&(n=D(n)),0===n&&(n=null),r[t]=n}}),r}function D(e){var t=0,n=e.split(/\s*,\s*/);return V(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function T(e){return 0===e||null!=e}function M(e,t){var n=F,r=e+"s";return t?n+=ie:r+=" linear all",[n,r]}function A(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){var n=e[t];return n?n.total:0},get:function(t){var n=e[t];return n&&n.value},put:function(t,n){e[t]?e[t].total++:e[t]={total:1,value:n}}}}function O(e,t,n){V(n,function(n){e[n]=W(e
switch(i.nodeType){case 1:n.start(i.nodeName.toLowerCase(),a(i.attributes));break;case 3:n.chars(i.textContent)}var o;if(!(o=i.firstChild)&&(1==i.nodeType&&n.end(i.nodeName.toLowerCase()),o=i.nextSibling,!o))for(;null==o&&(i=i.parentNode,i!==c);)o=i.nextSibling,1==i.nodeType&&n.end(i.nodeName.toLowerCase());i=o}for(;i=c.firstChild;)c.removeChild(i)}function a(e){for(var t={},n=0,r=e.length;r>n;n++){var i=e[n];t[i.name]=i.value}return t}function s(e){return e.replace(/&/g,"&amp;").replace(d,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(h,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(e,n){var r=!1,i=t.bind(e,e.push);return{start:function(e,o){e=t.lowercase(e),!r&&w[e]&&(r=e),r||x[e]!==!0||(i("<"),i(e),t.forEach(o,function(r,o){var a=t.lowercase(o),u="img"===e&&"src"===a||"background"===a;_[a]!==!0||k[a]===!0&&!n(r,u)||(i(" "),i(o),i('="'),i(s(r)),i('"'))}),i(">"))},end:function(e){e=t.lowercase(e),r||x[e]!==!0||p[e]===!0||(i("</"),i(e),i(">")),e==r&&(r=!1)},chars:function(e){r||i(s(e))}}}function l(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;i>r;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.indexOf("ns1:")||(t.removeAttributeNode(o),r--,i--)}var s=t.firstChild;s&&l(s),s=t.nextSibling,s&&l(s)}var c,f=t.$$minErr("$sanitize"),d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,h=/([^\#-~ |!])/g,p=i("area,br,col,hr,img,wbr"),m=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),g=i("rp,rt"),v=t.extend({},g,m),$=t.extend({},m,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),y=t.extend({},g,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),b=i("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),w=i("script,style"),x=t.extend({},p,$,y,v),k=i("background,cite,href,longdesc,src,xlink:href"),C=i("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),S=i("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),_=t.extend({},k,S,C);!function(e){var t;if(!e.document||!e.document.implementation)throw f("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("b
var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=w(e)?e:n.hash();var t;e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||qe(function(){r.$evalAsync(s)})}),s}]}function it(e,t){return e||t?e?t?(Wr(e)&&(e=e.join(" ")),Wr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function ot(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ii)return n}}function at(e){w(e)&&(e=e.split(" "));var t=me();return r(e,function(e){e.length&&(t[e]=!0)}),t}function st(e){return y(e)?e:{}}function ut(e,t,n,i){function o(e){try{e.apply(null,H(arguments,1))}finally{if($--,0===$)for(;y.length;)try{y.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}function s(){C=null,u(),l()}function u(){b=S(),b=v(b)?null:b,V(b,D)&&(b=D),D=b}function l(){x===c.url()&&w===b||(x=c.url(),w=b,r(_,function(e){e(c.url(),b)}))}var c=this,f=e.location,d=e.history,p=e.setTimeout,m=e.clearTimeout,g={};c.isMock=!1;var $=0,y=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){$++},c.notifyWhenNoOutstandingRequests=function(e){0===$?e():y.push(e)};var b,w,x=f.href,k=t.find("base"),C=null,S=i.history?function(){try{return d.state}catch(e){}}:h;u(),w=b,c.url=function(t,n,r){if(v(r)&&(r=null),f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){var o=w===r;if(x===t&&(!i.history||o))return c;var s=x&&Vt(x)===Vt(t);return x=t,w=r,!i.history||s&&o?(s&&!C||(C=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(C=t)):(d[n?"replaceState":"pushState"](r,"",t),u(),w=b),c}return C||f.href.replace(/%27/g,"'")},c.state=function(){return b};var _=[],E=!1,D=null;c.onUrlChange=function(t){return E||(i.history&&Ir(e).on("popstate",s),Ir(e).on("hashchange",s),E=!0),_.push(t),t},c.$$applicationDestroyed=function(){Ir(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=k.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return $++,n=p(function(){delete g[n],o(e)},t||0),g[n]=!0,n},c.defer.cancel=function(e){return g[e]?(delete g[e],m(e),o(h),!0):!1}}function lt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new ut(e,r,t,n)}]}function ct(){this.$get=function(){function e(e,r){function i(e){e!=d&&(h?h==e&&(h=e.n):h=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=l({},r,{id:e}),u=me(),c=r&&r.capacity||Number.MAX_VALUE,f=me(),d=null,h=null;return n[e]={put:function(e,t){if(!v(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});i(n)}return e in u||a++,u[e]=t,a>c&&this.remove(h.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==d&&(d=t.p),t==h&&(h=t.n),o(t.n,t.p),delete f[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=me(),a=0,f=me(),d=h=null},destroy:function(){u=null,s=null,f=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function ft(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function dt(){}function ht(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=me();return r(e,function(e,r){if(e in S)return void(o[r]=S[e]);var a=e.match(i);if(!a)throw Hi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(S[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(y(e.scope)&&(e.bindToCo
switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=W(e)}return e}function u(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(o,c,h,p){function g(e){try{return e=O(e),p&&!$(e)?e:s(e)}catch(t){r(no.interr(o,t))}}if(!o.length||-1===o.indexOf(e)){var y;if(!c){var b=a(o);y=m(b),y.exp=o,y.expressions=[],y.$$watchDelegate=u}return y}p=!!p;for(var w,x,k,S=0,_=[],E=[],D=o.length,T=[],M=[];D>S;){if(-1==(w=o.indexOf(e,S))||-1==(x=o.indexOf(t,w+f))){S!==D&&T.push(a(o.substring(S)));break}S!==w&&T.push(a(o.substring(S,w))),k=o.substring(w+f,x),_.push(k),E.push(n(k,g)),S=x+d,M.push(T.length),T.push("")}if(h&&T.length>1&&no.throwNoconcat(o),!c||_.length){var A=function(e){for(var t=0,n=_.length;n>t;t++){if(p&&v(e[t]))return;T[M[t]]=e[t]}return T.join("")},O=function(e){return h?i.getTrusted(h,e):i.valueOf(e)};return l(function(e){var t=0,n=_.length,i=new Array(n);try{for(;n>t;t++)i[t]=E[t](e);return A(i)}catch(a){r(no.interr(o,a))}},{exp:o,expressions:_,$$watchDelegate:function(e,t){var n;return e.$watchGroup(E,function(r,i){var o=A(r);C(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var f=e.length,d=t.length,h=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function Pt(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,u,l){function c(){f?o.apply(null,d):o(m)}var f=arguments.length>4,d=f?H(arguments,4):[],h=t.setInterval,p=t.clearInterval,m=0,g=$(l)&&!l,v=(g?r:n).defer(),y=v.promise;return u=$(u)?u:0,y.$$intervalId=h(function(){g?i.defer(c):e.$evalAsync(c),v.notify(m++),u>0&&m>=u&&(v.resolve(m),p(y.$$intervalId),delete a[y.$$intervalId]),g||e.$apply()},s),a[y.$$intervalId]=v,y}var a={};return o.cancel=function(e){return e&&e.$$intervalId in a?(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0):!1},o}]}function jt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=te(t[n]);return t.join("/")}function Lt(e,t){var n=On(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||io[n.protocol]||null}function Rt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=On(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=K(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Ut(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function Vt(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function zt(e){return e.replace(/(#.+)|#$/,"$1")}function Ht(e){return e.substr(0,Vt(e).lastIndexOf("/")+1)}function qt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Yt(e,t,n){this.$$html5=!0,n=n||"",Lt(e,this),this.$$parse=function(e){var n=Ut(t,e);if(!w(n))throw oo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Rt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),n=this.$$hash?"#"+te(this.$$hash):"";this.$$url=jt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,s;return $(o=Ut(e,r))?(a=o,s=$(o=Ut(n,o))?t+(Ut("/",o)||o):e+a):$(o=Ut(t,r))?s=t+o:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Wt(e,t,n){Lt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Ut(e,r)||Ut(t,r);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(e=r,this.replace())):(o=Ut(n,a),v(o)&&(o=a)),Rt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=jt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Vt(e)==Vt(t)?(this.$$parse(t),!0):!1}}function Bt(e,t,n){this.$$html5=!0,Wt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.
var s;if(r){for(s in e)if("$"!==s.charAt(0)&&Un(e[s],t,n,!0))return!0;return i?!1:Un(e,t,n,!1)}if("object"===a){for(s in t){var u=t[s];if(!C(u)&&!v(u)){var l="$"===s,c=l?e:e[s];if(!Un(c,u,n,l,l))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Vn(e){return null===e?"null":typeof e}function zn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return v(n)&&(n=t.CURRENCY_SYM),v(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Wn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Wn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function qn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Co))>-1&&(e=e.replace(Co,"")),(r=e.search(/e/i))>0?(0>n&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):0>n&&(n=e.length),r=0;e.charAt(r)==So;r++);if(r==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==So;)o--;for(n-=r,t=[],i=0;o>=r;r++,i++)t[i]=+e.charAt(r)}return n>ko&&(t=t.splice(0,ko-1),a=n-1,n=1),{d:t,e:a,i:n}}function Yn(e,t,n,r){var i=e.d,o=i.length-e.i;t=v(t)?Math.min(Math.max(n,o),r):+t;var a=t+e.i,s=i[a];if(a>0){i.splice(Math.max(e.i,a));for(var u=a;u<i.length;u++)i[u]=0}else{o=Math.max(0,o),e.i=1,i.length=Math.max(1,a=t+1),i[0]=0;for(var l=1;a>l;l++)i[l]=0}if(s>=5)if(0>a-1){for(var c=0;c>a;c--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[a-1]++;for(;o<Math.max(0,t);o++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)}function Wn(e,t,n,r,i){if(!w(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,u=Math.abs(e)+"",l="";if(a)l="∞";else{o=qn(u),Yn(o,i,t.minFrac,t.maxFrac);var c=o.d,f=o.i,d=o.e,h=[];for(s=c.reduce(function(e,t){return e&&!t},!0);0>f;)c.unshift(0),f++;f>0?h=c.splice(f):(h=c,c=[0]);var p=[];for(c.length>=t.lgSize&&p.unshift(c.splice(-t.lgSize).join(""));c.length>t.gSize;)p.unshift(c.splice(-t.gSize).join(""));c.length&&p.unshift(c.join("")),l=p.join(n),h.length&&(l+=r+h.join("")),d&&(l+="e+"+d)}return 0>e&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function Bn(e,t,n,r){var i="";for((0>e||r&&0>=e)&&(r?e=-e+1:(e=-e,i="-")),e=""+e;e.length<t;)e=So+e;return n&&(e=e.substr(e.length-t)),i+e}function Gn(e,t,n,r,i){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&-12==n&&(a=12),Bn(a,t,r,i)}}function Zn(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Ar(a+e);return i[s][o]}}function Qn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Bn(Math[r>0?"floor":"ceil"](r/60),2)+Bn(Math.abs(r%60),2)}function Jn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function Xn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function Kn(e){return function(t){var n=Jn(t.getFullYear()),r=Xn(t),i=+r-+n,o=1+Math.round(i/6048e5);return Bn(o,e)}}function er(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function tr(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function nr(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function rr(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(r,f(t[1]),f(t[2])-1,f(t[3]));var u=f(t[4]||0)-i,l=f(t[5]||0)-o,c=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,u,l,c,d),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,u="",l=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Do.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!k(n)||!isFinite(n.getTime()))return n;for(;i;)s=Eo.exec(i),s?(l=z(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=Q(n,o,!0)),r(l,function(t){a=_o[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function ir(){return function(e,t){return v(t)&&(t=2),W(e,t)}}function or(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&
value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var mo=function(e,t){this.lexer=e,this.options=t};mo.Program="Program",mo.ExpressionStatement="ExpressionStatement",mo.AssignmentExpression="AssignmentExpression",mo.ConditionalExpression="ConditionalExpression",mo.LogicalExpression="LogicalExpression",mo.BinaryExpression="BinaryExpression",mo.UnaryExpression="UnaryExpression",mo.CallExpression="CallExpression",mo.MemberExpression="MemberExpression",mo.Identifier="Identifier",mo.Literal="Literal",mo.ArrayExpression="ArrayExpression",mo.Property="Property",mo.ObjectExpression="ObjectExpression",mo.ThisExpression="ThisExpression",mo.LocalsExpression="LocalsExpression",mo.NGValueParameter="NGValueParameter",mo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:mo.Program,body:e}},expressionStatement:function(){return{type:mo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:mo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:mo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:mo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:mo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:mo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:mo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:mo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:mo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:mo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=R(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:mo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:mo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:mo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:mo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:mo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.expression());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid i
a||(b.$modelValue=e?r:void 0,t())})},this.$$writeModelToScope=function(){g(e,b.$modelValue),r(b.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){b.$viewValue=e,b.$options&&!b.$options.updateOnDefault||b.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=b.$options;i&&$(i.debounce)&&(n=i.debounce,x(n)?r=n:x(n[t])?r=n[t]:x(n["default"])&&(r=n["default"])),s.cancel(y),r?y=s(function(){b.$commitViewValue()},r):u.$$phase?b.$commitViewValue():e.$apply(function(){b.$commitViewValue()})},e.$watch(function(){var t=m(e);if(t!==b.$modelValue&&(b.$modelValue===b.$modelValue||t===t)){b.$modelValue=b.$$rawModelValue=t,f=void 0;for(var n=b.$formatters,r=n.length,i=t;r--;)i=n[r](i);b.$viewValue!==i&&(b.$$updateEmptyClasses(i),b.$viewValue=b.$$lastCommittedViewValue=i,b.$render(),b.$$runValidators(t,i,h))}return t})}],_a=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Sa,priority:1,compile:function(t){return t.addClass(va).addClass(ya).addClass(ma),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],Ea=/(\s+|^)default(\s+|$)/,Da=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=R(e.$eval(t.ngModelOptions)),$(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Gr(this.$options.updateOn.replace(Ea,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ta=sr({terminal:!0,priority:1e3}),Ma=t("ngOptions"),Aa=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Oa=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!l&&n(e))t=e;else{t=[];for(var r in e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r)}return t}var s=e.match(Aa);if(!s)throw Ma("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,J(t));var u=s[5]||s[7],l=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=o(s[2]?s[1]:u),h=c&&o(c),p=h||d,m=f&&o(f),g=f?function(e,t){return m(r,t)}:function(e){return Je(e)},v=function(e,t){return g(e,k(e,t))},$=o(s[2]||s[1]),y=o(s[3]||""),b=o(s[4]||""),w=o(s[8]),x={},k=l?function(e,t){return x[l]=t,x[u]=e,x}:function(e){return x[u]=e,x};return{trackBy:f,getTrackByValue:v,getWatchables:o(w,function(e){var t=[];e=e||[];for(var n=a(e),i=n.length,o=0;i>o;o++){var u=e===n?o:n[o],l=e[u],c=k(l,u),f=g(l,c);if(t.push(f),s[2]||s[1]){var d=$(r,c);t.push(d)}if(s[4]){var h=b(r,c);t.push(h)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],o=a(n),s=o.length,u=0;s>u;u++){var l=n===o?u:o[u],c=n[l],d=k(c,l),h=p(r,d),m=g(h,d),x=$(r,d),C=y(r,d),S=b(r,d),_=new i(m,h,x,C,S);e.push(_),t[m]=_}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return f?qr.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function d(){var e=k&&p.readValue();if(k)for(var t=k.items.length-1;t>=0;t--){var r=k.items[t];He(r.group?r.element.parentNode:r.element)}k=C.getOptions();var i={};if(w&&n.prepend(h),k.items.forEach(functi
return function(t){return e.emit("complete",t)}}(this)),this.on("complete",function(e){return function(t){return 0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length?setTimeout(function(){return e.emit("queuecomplete")},0):void 0}}(this)),n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return function(t){return e.emit("dragstart",t)}}(this),dragenter:function(e){return function(t){return n(t),e.emit("dragenter",t)}}(this),dragover:function(e){return function(t){var r;try{r=t.dataTransfer.effectAllowed}catch(i){}return t.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy",n(t),e.emit("dragover",t)}}(this),dragleave:function(e){return function(t){return e.emit("dragleave",t)}}(this),drop:function(e){return function(t){return n(t),e.drop(t)}}(this),dragend:function(e){return function(t){return e.emit("dragend",t)}}(this)}}],this.clickableElements.forEach(function(e){return function(n){return e.listeners.push({element:n,events:{click:function(r){return(n!==e.element||r.target===e.element||t.elementInside(r.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},t.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),(null!=(e=this.hiddenFileInput)?e.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)},t.prototype.updateTotalUploadProgress=function(){var e,t,n,r,i,o,a,s;if(r=0,n=0,e=this.getActiveFiles(),e.length){for(s=this.getActiveFiles(),o=0,a=s.length;a>o;o++)t=s[o],r+=t.upload.bytesSent,n+=t.upload.total;i=100*r/n}else i=100;return this.emit("totaluploadprogress",i,n,r)},t.prototype._getParamName=function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):""+this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")},t.prototype._renameFilename=function(e){return"function"!=typeof this.options.renameFilename?e:this.options.renameFilename(e)},t.prototype.getFallbackForm=function(){var e,n,r,i;return(e=this.getExistingFallback())?e:(r='<div class="dz-fallback">',this.options.dictFallbackText&&(r+="<p>"+this.options.dictFallbackText+"</p>"),r+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',n=t.createElement(r),"FORM"!==this.element.tagName?(i=t.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>'),i.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:n)},t.prototype.getExistingFallback=function(){var e,t,n,r,i,o;for(t=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)if(t=e[n],/(^| )fallback($| )/.test(t.className))return t},o=["div","form"],r=0,i=o.length;i>r;r++)if(n=o[r],e=t(this.element.getElementsByTagName(n)))return e},t.prototype.setupEventListeners=function(){var e,t,n,r,i,o,a;for(o=this.listeners,a=[],r=0,i=o.length;i>r;r++)e=o[r],a.push(function(){var r,i;r=e.events,i=[];for(t in r)n=r[t],i.push(e.element.addEventListener(t,n,!1));return i}());return a},t.prototype.removeEventListeners=function(){var e,t,n,r,i,o,a;for(o=this.listeners,a=[],r=0,i=o.length;i>r;r++)e=o[r],a.push(function(){var r,i;r=e.events,i=[];for(t in r)n=r[t],i.push(e.element.removeEventListener(t,n,!1));return i}());return a},t.prototype.disable=function(){var e,t,n,r,i;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),r=this.files,i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(this.cancelUpload(e));return i},t.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},t.prototype.fil
for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(o+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",i=0;i<t.length;i++)n+=this.renderer.tablecell(this.inline.output(t[i]),{header:!1,align:this.token.align[i]});a+=this.renderer.tablerow(n)}return this.renderer.table(o,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",s=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,s);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var u=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(u);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},l.exec=l,f.options=f.setOptions=function(e){return c(f.defaults,e),f},f.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new i,xhtml:!1},f.Parser=o,f.parser=o.parse,f.Renderer=i,f.Lexer=e,f.lexer=e.lex,f.InlineLexer=r,f.inlineLexer=r.output,f.parse=f,"undefined"!=typeof t&&"object"==typeof n?t.exports=f:"function"==typeof define&&define.amd?define(function(){return f}):this.marked=f}).call(function(){return this||("undefined"!=typeof window?window:e)}())}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],12:[function(e,t,n){!function(e,r){"object"==typeof n&&"undefined"!=typeof t?t.exports=r():"function"==typeof define&&define.amd?define(r):e.moment=r()}(this,function(){"use strict";function n(){return ur.apply(null,arguments)}function r(e){ur=e}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function a(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function l(e,t,n,r){return je(e,t,n,r,!0).utc()}function c(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function f(e){return null==e._pf&&(e._pf=c()),e._pf}function d(e){if(null==e._isValid){var t=f(e),n=lr.call(t.parsedDateParts,function(e){return null!=e});e._isValid=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function h(e){var t=l(NaN);r
this._longDateFormat[e])}function Mn(){return this._invalidDate}function An(e){return this._ordinal.replace("%d",e)}function On(e){return e}function Fn(e,t,n,r){var i=this._relativeTime[n];return C(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Nn(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}function In(e,t,n,r){var i=I(),o=l().set(r,t);return i[n](o,e)}function Pn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return In(e,t,n,"month");var r,i=[];for(r=0;12>r;r++)i[r]=In(e,r,n,"month");return i}function jn(e,t,n,r){"boolean"==typeof e?("number"==typeof t&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,"number"==typeof t&&(n=t,t=void 0),t=t||"");var i=I(),o=e?i._week.dow:0;if(null!=n)return In(t,(n+o)%7,r,"day");var a,s=[];for(a=0;7>a;a++)s[a]=In(t,(a+o)%7,r,"day");return s}function Ln(e,t){return Pn(e,t,"months")}function Rn(e,t){return Pn(e,t,"monthsShort")}function Un(e,t,n){return jn(e,t,n,"weekdays")}function Vn(e,t,n){return jn(e,t,n,"weekdaysShort")}function zn(e,t,n){return jn(e,t,n,"weekdaysMin")}function Hn(){var e=this._data;return this._milliseconds=Ui(this._milliseconds),this._days=Ui(this._days),this._months=Ui(this._months),e.milliseconds=Ui(e.milliseconds),e.seconds=Ui(e.seconds),e.minutes=Ui(e.minutes),e.hours=Ui(e.hours),e.months=Ui(e.months),e.years=Ui(e.years),this}function qn(e,t,n,r){var i=ot(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Yn(e,t){return qn(this,e,t,1)}function Wn(e,t){return qn(this,e,t,-1)}function Bn(e){return 0>e?Math.floor(e):Math.ceil(e)}function Gn(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||0>=o&&0>=a&&0>=s||(o+=864e5*Bn(Qn(s)+a),a=0,s=0),u.milliseconds=o%1e3,e=$(o/1e3),u.seconds=e%60,t=$(e/60),u.minutes=t%60,n=$(t/60),u.hours=n%24,a+=$(n/24),i=$(Zn(a)),s+=i,a-=Bn(Qn(i)),r=$(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Zn(e){return 4800*e/146097}function Qn(e){return 146097*e/4800}function Jn(e){var t,n,r=this._milliseconds;if(e=L(e),"month"===e||"year"===e)return t=this._days+r/864e5,n=this._months+Zn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Qn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Xn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Kn(e){return function(){return this.as(e)}}function er(e){return e=L(e),this[e+"s"]()}function tr(e){return function(){return this._data[e]}}function nr(){return $(this.days()/7)}function rr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ir(e,t,n){var r=ot(e).abs(),i=no(r.as("s")),o=no(r.as("m")),a=no(r.as("h")),s=no(r.as("d")),u=no(r.as("M")),l=no(r.as("y")),c=i<ro.s&&["s",i]||1>=o&&["m"]||o<ro.m&&["mm",o]||1>=a&&["h"]||a<ro.h&&["hh",a]||1>=s&&["d"]||s<ro.d&&["dd",s]||1>=u&&["M"]||u<ro.M&&["MM",u]||1>=l&&["y"]||["yy",l];return c[2]=t,c[3]=+e>0,c[4]=n,rr.apply(null,c)}function or(e,t){return void 0===ro[e]?!1:void 0===t?ro[e]:(ro[e]=t,!0)}function ar(e){var t=this.localeData(),n=ir(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function sr(){var e,t,n,r=io(this._milliseconds)/1e3,i=io(this._days),o=io(this._months);e=$(r/60),t=$(e/60),r%=60,e%=60,n=$(o/12),o%=12;var a=n,s=o,u=i,l=t,c=e,f=r,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(a?a+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(l||c||f?"T":"")+(l?l+"H":"")+(c?c+"M":"")+(f?f+"S":""):"P0D"}var ur,lr;lr=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;n>r;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var cr=n.momentProperties=[],fr=!1,dr={};n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var hr;hr=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var pr,mr,gr={},vr={},$r=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M
var c=s.createElement("div"),f="activex"===U.pluginType;c.innerHTML='<object id="'+X.swfObjectId+'" name="'+X.swfObjectId+'" width="100%" height="100%" '+(f?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+u+'"')+">"+(f?'<param name="movie" value="'+u+'"/>':"")+'<param name="allowScriptAccess" value="'+r+'"/><param name="allowNetworking" value="'+i+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+o+'"/><div id="'+X.swfObjectId+'_fallbackContent">&nbsp;</div></object>',t=c.firstChild,c=null,S(t).ZeroClipboard=Ge,n.replaceChild(t,l),Se()}return t||(t=s[X.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),U.bridge=t||null,t},Te=function(){var e=U.bridge;if(e){var t=Ee(e);t&&("activex"===U.pluginType&&"readyState"in e?(e.style.display="none",function i(){if(4===e.readyState){for(var n in e)"function"==typeof e[n]&&(e[n]=null);e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t)}else l(i,10)}()):(e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t))),ze(),U.ready=null,U.bridge=null,U.deactivated=null,r=n}},Me=function(e){var t={},n={};if("object"==typeof e&&e){for(var r in e)if(r&&k.call(e,r)&&"string"==typeof e[r]&&e[r])switch(r.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[r],n.text=r;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[r],n.html=r;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[r],n.rtf=r}return{data:t,formatMap:n}}},Ae=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var r in e)if(k.call(e,r))if("errors"===r){n[r]=e[r]?e[r].slice():[];for(var i=0,o=n[r].length;o>i;i++)n[r][i].format=t[n[r][i].format]}else if("success"!==r&&"data"!==r)n[r]=e[r];else{n[r]={};var a=e[r];for(var s in a)s&&k.call(a,s)&&k.call(t,s)&&(n[r][t[s]]=a[s])}return n},Oe=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(-1===e.indexOf("?")?"?":"&")+"noCache="+b():""},Fe=function(e){var t,n,r,i,o="",s=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?i=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(i=e.trustedDomains)),i&&i.length)for(t=0,n=i.length;n>t;t++)if(k.call(i,t)&&i[t]&&"string"==typeof i[t]){if(r=Ne(i[t]),!r)continue;if("*"===r){s.length=0,s.push(r);break}s.push.apply(s,[r,"//"+r,a.location.protocol+"//"+r])}return s.length&&(o+="trustedOrigins="+p(s.join(","))),e.forceEnhancedClipboard===!0&&(o+=(o?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(o+=(o?"&":"")+"swfObjectId="+p(e.swfObjectId)),"string"==typeof e.jsVersion&&e.jsVersion&&(o+=(o?"&":"")+"jsVersion="+p(e.jsVersion)),o},Ne=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=-1===t?e:e.slice(t+2);var n=e.indexOf("/");return e=-1===n?e:-1===t||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},Ie=function(){var e=function(e){var t,n,r,i=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return i;for(t=0,n=e.length;n>t;t++)if(k.call(e,t)&&(r=Ne(e[t]))){if("*"===r){i.length=0,i.push("*");break}-1===i.indexOf(r)&&i.push(r)}return i};return function(t,n){var r=Ne(n.swfPath);null===r&&(r=t);var i=e(n.trustedDomains),o=i.length;if(o>0){if(1===o&&"*"===i[0])return"always";if(-1!==i.indexOf(t))return 1===o&&t===r?"sameDomain":"always"}return"never"}}(),Pe=function(){try{return s.activeElement}catch(e){return null}},je=function(e,t){var n,r,i,o=[];if("string"==typeof t&&t&&(o=t.split(/\s+/)),e&&1===e.nodeType&&o.length>0)if(e.classList)for(n=0,r=o.length;r>n;n++)e.classList.add(o[n]);else if(e.hasOwnProperty("className")){for(i=" "+e.className+" ",n=0,r=o.length;r>n;n++)-1===i.indexOf(" "+o[n]+" ")&&(i+=o[n]+" ");e.className=i.replace(/^\s+|\s+$/g,"")}return e},Le=function(e,t){var n,r,i,o=[];if("string"==typeof t&&t&&(o=t
"./directives":18,"./pages/page-show":21,"./services":22,angular:9,"angular-animate":2,"angular-resource":4,"angular-sanitize":6,"angular-ui-sortable":7}],20:[function(e,t,n){"use strict";var r=t.exports={selector:"#html-editor",content_css:["/css/styles.css","/libs/material-design-iconic-font/css/material-design-iconic-font.min.css"],body_class:"page-content",relative_urls:!1,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*]",automatic_uploads:!1,valid_children:"-div[p|pre|h1|h2|h3|h4|h5|h6|blockquote]",plugins:"image table textcolor paste link fullscreen imagetools code customhr autosave lists",imagetools_toolbar:"imageoptions",toolbar:"undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr | removeformat code fullscreen",content_style:"body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}",style_formats:[{title:"Header 1",format:"h1"},{title:"Header 2",format:"h2"},{title:"Header 3",format:"h3"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",format:"pre"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Success",block:"p",exact:!0,attributes:{"class":"callout success"}},{title:"Info",block:"p",exact:!0,attributes:{"class":"callout info"}},{title:"Warning",block:"p",exact:!0,attributes:{"class":"callout warning"}},{title:"Danger",block:"p",exact:!0,attributes:{"class":"callout danger"}}]}],style_formats_merge:!1,formats:{alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"}},file_browser_callback:function(e,t,n,r){window.ImageManager.showExternal(function(t){if(r.document.getElementById(e).value=t.url,"createEvent"in document){var n=document.createEvent("HTMLEvents");n.initEvent("change",!1,!0),r.document.getElementById(e).dispatchEvent(n)}else r.document.getElementById(e).fireEvent("onchange");var i='<a href="'+t.url+'" target="_blank">';i+='<img src="'+t.thumbs.display+'" alt="'+t.name+'">',i+="</a>",r.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,i)})},paste_preprocess:function(e,t){var n=t.content;-1!==n.indexOf('<img src="file://')&&(t.content="")},extraSetups:[],setup:function(e){for(var t=0;t<r.extraSetups.length;t++)r.extraSetups[t](e);!function(){function t(e){return e&&!(!e.textContent&&!e.innerText)}var n;e.on("dragstart",function(){var r=e.selection.getNode();"IMG"===r.nodeName&&(n=e.dom.getParent(r,".mceTemp"),n||"A"!==r.parentNode.nodeName||t(r.parentNode)||(n=r.parentNode))}),e.on("drop",function(t){var r=e.dom,i=tinymce.dom.RangeUtils.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc());r.getParent(i.startContainer,".mceTemp")?t.preventDefault():n&&(t.preventDefault(),e.undoManager.transact(function(){e.selection.setRng(i),e.selection.setNode(n),r.remove(n)})),n=null})}(),e.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.showExternal(function(t){var n='<a href="'+t.url+'" target="_blank">';n+='<img src="'+t.thumbs.display+'" alt="'+t.name+'">',n+="</a>",e.execCommand("mceInsertContent",!1,n)})}}),e.on("paste",function(t){if(t.clipboardData){var n=t.clipboardData.items;if(n)for(var r=0;r<n.length;r++)if(-1!==n[r].type.indexOf("image")){var i=n[r].getAsFile(),o=new FormData,a="png",s=new XMLHttpRequest;if(i.name){var u=i.name.match(/\.(.+)$/);u&&(a=u[1])}var l="image-"+Math.random().toString(16).slice(2);e.execCommand("mceInsertContent",!1,'<img src="/loading.gif" id="'+l+'">');var c="image-"+Date.now()+"."+a;o.append("file",i,c),o.append("_token",document.querySelector('meta[name="token"]').getAttribute("content"