text: !function o(a,s,l){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[t]={exports:{}};a[t][0].call(i.exports,function(e){return u(a[t][1][e]||e)},i,i.exports,o,a,s,l)}return s[t].exports}for(var c="function"==typeof require&&require,e=0;e<l.length;e++)u(l[e]);return u}({1:[function(e,t,n){!function(e,v){"use strict";var t=v.module("ngRoute",["ng"]).provider("$route",function(){function m(e,t){return v.extend(Object.create(e),t)}var g={};function i(e,t){var n=t.caseInsensitiveMatch,r={originalPath:e,regexp:e},a=r.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,r){var i="?"===r?r:null,o="*"===r?r:null;return a.push({name:n,optional:!!i}),t=t||"",(i?"":t)+"(?:"+(i?t:"")+(o?"(.+?)":"([^/]+)")+(i||"")+")"+(i||"")}).replace(/([\/$\*])/g,"\\$1"),r.regexp=new RegExp("^"+e+"$",n?"i":""),r}this.when=function(e,t){var n=v.copy(t);if(v.isUndefined(n.reloadOnSearch)&&(n.reloadOnSearch=!0),v.isUndefined(n.caseInsensitiveMatch)&&(n.caseInsensitiveMatch=this.caseInsensitiveMatch),g[e]=v.extend(n,e&&i(e,n)),e){var r="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";g[r]=v.extend({redirectTo:e},i(r,n))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(n,i,o,a,s,l,u){var c,d,f=!1,h={routes:g,reload:function(){f=!0,n.$evalAsync(function(){e(),t()})},updateParams:function(e){if(!this.current||!this.current.$$route)throw r("norout","Tried updating route when with no current route");e=v.extend({},this.current.params,e),i.path(p(this.current.$$route.originalPath,e)),i.search(e)}};return n.$on("$locationChangeStart",e),n.$on("$locationChangeSuccess",t),h;function e(e){var t=h.current;c=function(){var n,r;return v.forEach(g,function(e,t){!r&&(n=function(e,t){var n=t.keys,r={};if(!t.regexp)return null;var i=t.regexp.exec(e);if(!i)return null;for(var o=1,a=i.length;o<a;++o){var s=n[o-1],l=i[o];s&&l&&(r[s.name]=l)}return r}(i.path(),e))&&((r=m(e,{params:v.extend({},i.search(),n),pathParams:n})).$$route=e)}),r||g.null&&m(g.null,{params:{},pathParams:{}})}(),(d=c&&t&&c.$$route===t.$$route&&v.equals(c.pathParams,t.pathParams)&&!c.reloadOnSearch&&!f)||!t&&!c||n.$broadcast("$routeChangeStart",c,t).defaultPrevented&&e&&e.preventDefault()}function t(){var t=h.current,r=c;d?(t.params=r.params,v.copy(t.params,o),n.$broadcast("$routeUpdate",t)):(r||t)&&(f=!1,(h.current=r)&&r.redirectTo&&(v.isString(r.redirectTo)?i.path(p(r.redirectTo,r.params)).search(r.params).replace():i.url(r.redirectTo(r.pathParams,i.path(),i.search())).replace()),a.when(r).then(function(){if(r){var e,t,n=v.extend({},r.resolve);return v.forEach(n,function(e,t){n[t]=v.isString(e)?s.get(e):s.invoke(e,null,null,t)}),v.isDefined(e=r.template)?v.isFunction(e)&&(e=e(r.params)):v.isDefined(t=r.templateUrl)&&(v.isFunction(t)&&(t=t(r.params)),v.isDefined(t)&&(r.loadedTemplateUrl=u.valueOf(t),e=l(t))),v.isDefined(e)&&(n.$template=e),a.all(n)}}).then(function(e){r==h.current&&(r&&(r.locals=e,v.copy(r.params,o)),n.$broadcast("$routeChangeSuccess",r,t))},function(e){r==h.current&&n.$broadcast("$routeChangeError",r,t,e)}))}function p(e,i){var o=[];return v.forEach((e||"").split(":"),function(e,t){if(0===t)o.push(e);else{var n=e.match(/(\w+)(?:[?*])?(.*)/),r=n[1];o.push(i[r]),o.push(n[2]||""),delete i[r]}}),o.join("")}}]}),r=v.$$minErr("ngRoute");function n(h,p,m){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(o,a,e,t,s){var l,u,n,c=e.autoscroll,d=e.onload||"";function f(){n&&(m.cancel(n),n=null),l&&(l.$destroy(),l=null),u&&((n=m.leave(u)).then(function(){n=null}),u=null)}function r(){var e=h.current&&h.current.locals,t=e&&e.$template;if(v.isDefined(t)){var n=o.$new(),r=h.current,i=s(n,function(e){m.enter(e,null,u||a).then(function(){!v.isDefined(c)||c&&!o.$eval(c)||p()}),f()});u=i,(l=r.scope=n).$emit("$viewContentLoaded"),l.$eval(d)}else f()}o.$on("$routeChangeSuccess",r),r()}}}function i(a,s,l){return{restrict:"ECA",priority:-400,link:function(e,t){var n=l.current,r=n.locals;t.html(r.$template);var i=a(t.contents());if(n.controller){r.$scope=e;var o=s(n.controller,r);n.controllerAs&&(e[n.controllerAs]=o),t.data("$ngControllerController",o),t.children().data("$ngControllerController",o)}i(e)}}}t.provider("$routeParams",function(){this.$get=function(){return{}}}),t.directive("ngView",n),t.directive("ngView",i),n.$inject=["$route","$anchorScroll","$animate"],i.$inject=["$compile","$controller","$route"]}(window,window.angular)},{}],2:[function(e,t,n){e("./angular-route"),t.exports="ngRoute"},{"./angular-route":1}],3:[function(e,t,n){!function(l,ee,te){"use strict";function x(o,a){return a=a||Error,function(){var e,t,n=arguments,r=n[0],i="["+(o?o+":":"")+r+"] ";for(i+=n[1].replace(/\{\d+\}/g,function(e){var t=2+ +e.slice(1,-1);return t<n.length?ze(n[t]):e}),i+="\nhttp://errors.angularjs.org/1.4.5/"+(o?o+"/":"")+r,t=2,e="?";t<n.length;t++,e="&")i+=e+"p"+(t-2)+"="+encodeURIComponent(ze(n[t]));return new a(i)}}var o=/^\/(.+)\/([a-z]*)$/,a="validity",D=function(e){return ue(e)?e.toLowerCase():e},M=Object.prototype.hasOwnProperty,c=function(e){return ue(e)?e.toUpperCase():e};"i"!=="I".toLowerCase()&&(D=function(e){return ue(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},c=function(e){return ue(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e});var O,ne,g,p,r=[].slice,n=[].splice,e=[].push,s=Object.prototype.toString,u=Object.getPrototypeOf,d=x("ng"),S=l.angular||(l.angular={}),t=0;function P(e){if(null==e||A(e))return!1;var t="length"in Object(e)&&e.length;return!(e.nodeType!==Le||!t)||(ue(e)||ce(e)||0===t||"number"==typeof t&&0<t&&t-1 in e)}function re(e,t,n){var r,i;if(e)if(de(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(ce(e)||P(e)){var o="object"!=typeof e;for(r=0,i=e.length;r<i;r++)(o||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==re)e.forEach(t,n,e);else if(C(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)M.call(e,r)&&t.call(n,e[r],r,e);return e}function f(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function m(n){return function(e,t){n(t,e)}}function _(){return++t}function h(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function v(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(le(a)||de(a))for(var s=Object.keys(a),l=0,u=s.length;l<u;l++){var c=s[l],d=a[c];n&&le(d)?N(d)?e[c]=new Date(d.valueOf()):T(d)?e[c]=new RegExp(d):(le(e[c])||(e[c]=ce(d)?[]:{}),v(e[c],[d],!0)):e[c]=d}}return h(e,r),e}function ie(e){return v(e,r.call(arguments,1),!1)}function i(e){return v(e,r.call(arguments,1),!0)}function y(e){return parseInt(e,10)}function oe(e,t){return ie(Object.create(e),t)}function ae(){}function b(e){return e}function $(e){return function(){return e}}function w(e){return de(e.toString)&&e.toString!==Object.prototype.toString}function se(e){return void 0===e}function E(e){return void 0!==e}function le(e){return null!==e&&"object"==typeof e}function C(e){return null!==e&&"object"==typeof e&&!u(e)}function ue(e){return"string"==typeof e}function k(e){return"number"==typeof e}function N(e){return"[object Date]"===s.call(e)}O=ee.documentMode,ae.$inject=[],b.$inject=[];var ce=Array.isArray;function de(e){return"function"==typeof e}function T(e){return"[object RegExp]"===s.call(e)}function A(e){return e&&e.window===e}function fe(e){return e&&e.$evalAsync&&e.$watch}function R(e){return"boolean"==typeof e}function B(e){return e&&de(e.then)}var L=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/;function I(e){return L.test(s.call(e))}var he=function(e){return ue(e)?e.trim():e},F=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function H(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function pe(e){return D(e.nodeName||e[0]&&e[0].nodeName)}function me(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),n}function U(e,n,t,r){if(A(e)||fe(e))throw d("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(I(n))throw d("cpta","Can't copy! TypedArray destination cannot be mutated.");if(n){if(e===n)throw d("cpi","Can't copy! Source and destination are identical.");var i;if(t=t||[],r=r||[],le(e)&&(t.push(e),r.push(n)),ce(e))for(var o=n.length=0;o<e.length;o++)n.push(U(e[o],null,t,r));else{var a=n.$$hashKey;if(ce(n)?n.length=0:re(n,function(e,t){delete n[t]}),C(e))for(i in e)n[i]=U(e[i],null,t,r);else if(e&&"function"==typeof e.hasOwnProperty)for(i in e)e.hasOwnProperty(i)&&(n[i]=U(e[i],null,t,r));else for(i in e)M.call(e,i)&&(n[i]=U(e[i],null,t,r));h(n,a)}}else if(le(n=e)){var s;if(t&&-1!==(s=t.indexOf(e)))return r[s];if(ce(e))return U(e,[],t,r);if(I(e))n=new e.constructor(e);else if(N(e))n=new Date(e.getTime());else{if(!T(e))return U(e,Object.create(u(e)),t,r);(n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0])).lastIndex=e.lastIndex}r&&(t.push(e),r.push(n))}return n}function z(e,t){if(ce(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(le(e))for(var i in t=t||{},e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i]);return t||e}function ge(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r,i,o=typeof e;if(o==typeof t&&"object"==o){if(!ce(e)){if(N(e))return!!N(t)&&ge(e.getTime(),t.getTime());if(T(e))return!!T(t)&&e.toString()==t.toString();if(fe(e)||fe(t)||A(e)||A(t)||ce(t)||N(t)||T(t))return!1;for(r in i=Pe(),e)if("$"!==r.charAt(0)&&!de(e[r])){if(!ge(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i||"$"===r.charAt(0)||t[r]===te||de(t[r])))return!1;return!0}if(!ce(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!ge(e[r],t[r]))return!1;return!0}}return!1}var V=function(){if(!E(V.rules)){var e=ee.querySelector("[ng-csp]")||ee.querySelector("[data-ng-csp]");if(e){var t=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");V.rules={noUnsafeEval:!t||-1!==t.indexOf("no-unsafe-eval"),noInlineStyle:!t||-1!==t.indexOf("no-inline-style")}}else V.rules={noUnsafeEval:function(){try{return new Function(""),!1}catch(e){return!0}}(),noInlineStyle:!1}}return V.rules},j=function(){if(E(j.name_))return j.name_;var e,t,n,r,i=we.length;for(t=0;t<i;++t)if(n=we[t],e=ee.querySelector("["+n.replace(":","\\:")+"jq]")){r=e.getAttribute(n+"jq");break}return j.name_=r};function W(e,t,n){return e.concat(r.call(t,n))}function ve(e,t){return r.call(e,t||0)}function q(e,t){var n=2<arguments.length?ve(arguments,2):[];return!de(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,W(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function G(e,t){var n=t;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?n=te:A(t)?n="$WINDOW":t&&ee===t?n="$DOCUMENT":fe(t)&&(n="$SCOPE"),n}function X(e,t){return void 0===e?te:(k(t)||(t=t?2:null),JSON.stringify(e,G,t))}function Y(e){return ue(e)?JSON.parse(e):e}function K(e,t){var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function J(e,t,n){n=n?-1:1;var r=K(t,e.getTimezoneOffset());return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,n*(r-e.getTimezoneOffset()))}function ye(e){e=ne(e).clone();try{e.empty()}catch(e){}var t=ne("<div>").append(e).html();try{return e[0].nodeType===Ie?D(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+D(t)})}catch(e){return D(t)}}function Z(e){try{return decodeURIComponent(e)}catch(e){}}function Q(e){var i={};return re((e||"").split("&"),function(e){var t,n,r;e&&(n=e=e.replace(/\+/g,"%20"),-1!==(t=e.indexOf("="))&&(n=e.substring(0,t),r=e.substring(t+1)),E(n=Z(n))&&(r=!E(r)||Z(r),M.call(i,n)?ce(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r))}),i}function be(e){var n=[];return re(e,function(e,t){ce(e)?re(e,function(e){n.push($e(t,!0)+(!0===e?"":"="+$e(e,!0)))}):n.push($e(t,!0)+(!0===e?"":"="+$e(e,!0)))}),n.length?n.join("&"):""}function xe(e){return $e(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function $e(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}var we=["ng-","data-ng-","ng:","x-ng-"];function Ce(r,e){var i,o,t={};re(we,function(e){var t=e+"app";!i&&r.hasAttribute&&r.hasAttribute(t)&&(o=(i=r).getAttribute(t))}),re(we,function(e){var t,n=e+"app";!i&&(t=r.querySelector("["+n.replace(":","\\:")+"]"))&&(o=(i=t).getAttribute(n))}),i&&(t.strictDi=null!==function(e,t){var n,r,i=we.length;for(r=0;r<i;++r)if(n=we[r]+t,ue(n=e.getAttribute(n)))return n;return null}(i,"strict-di"),e(i,o?[o]:[],t))}function Ee(n,r,i){le(i)||(i={});i=ie({strictDi:!1},i);function t(){if((n=ne(n)).injector()){var e=n[0]===ee?"document":ye(n);throw d("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}(r=r||[]).unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var t=Lt(r,i.strictDi);return t.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),t}var e=/^NG_ENABLE_DEBUG_INFO!/,o=/^NG_DEFER_BOOTSTRAP!/;if(l&&e.test(l.name)&&(i.debugInfoEnabled=!0,l.name=l.name.replace(e,"")),l&&!o.test(l.name))return t();l.name=l.name.replace(o,""),S.resumeBootstrap=function(e){return re(e,function(e){r.push(e)}),t()},de(S.resumeDeferredBootstrap)&&S.resumeDeferredBootstrap()}function Se(){l.name="NG_ENABLE_DEBUG_INFO!"+l.name,l.location.reload()}function _e(e){var t=S.element(e).injector();if(!t)throw d("test","no injector found for element argument to getTestability");return t.get("$$testability")}var ke=/[A-Z]/g;function Ne(e,n){return n=n||"_",e.replace(ke,function(e,t){return(t?n:"")+e.toLowerCase()})}var Te,Ae=!1;function Re(e,t,n){if(!e)throw d("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function Be(e,t,n){return n&&ce(e)&&(e=e[e.length-1]),Re(de(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function De(e,t){if("hasOwnProperty"===e)throw d("badname","hasOwnProperty is not a valid {0} name",t)}function Me(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;s<a;s++)r=i[s],e=e&&(o=e)[r];return!n&&de(e)?q(o,e):e}function Oe(e){var t=e[0],n=e[e.length-1],r=[t];do{if(!(t=t.nextSibling))break;r.push(t)}while(t!==n);return ne(r)}function Pe(){return Object.create(null)}var Le=1,Ie=3,Fe=8,He=9,Ue=11;function ze(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):void 0===e?"undefined":"string"!=typeof e?function(e){var n=[];return JSON.stringify(e,function(e,t){if(le(t=G(e,t))){if(0<=n.indexOf(t))return"<<already seen>>";n.push(t)}return t})}(e):e}var Ve={full:"1.4.5",major:1,minor:4,dot:5,codeName:"permanent-internship"};st.expando="ng339";var je=st.cache={},We=1,qe=function(e,t,n){e.addEventListener(t,n,!1)},Ge=function(e,t,n){e.removeEventListener(t,n,!1)};st._data=function(e){return this.cache[e[this.expando]]||{}};var Xe=/([\:\-\_]+(.))/g,Ye=/^moz([A-Z])/,Ke={mouseleave:"mouseout",mouseenter:"mouseover"},Je=x("jqLite");function Ze(e){return e.replace(Xe,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Ye,"Moz$1")}var Qe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,et=/<|&#?\w+;/,tt=/<([\w:]+)/,nt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rt={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function it(e){return!et.test(e)}function ot(e){var t=e.nodeType;return t===Le||!t||t===He}function at(e,t){var n,r,i,o,a=t.createDocumentFragment(),s=[];if(it(e))s.push(t.createTextNode(e));else{for(n=n||a.appendChild(t.createElement("div")),r=(tt.exec(e)||["",""])[1].toLowerCase(),i=rt[r]||rt._default,n.innerHTML=i[1]+e.replace(nt,"<$1></$2>")+i[2],o=i[0];o--;)n=n.lastChild;s=W(s,n.childNodes),(n=a.firstChild).textContent=""}return a.textContent="",a.innerHTML="",re(s,function(e){a.appendChild(e)}),a}function st(e){if(e instanceof st)return e;var t;if(ue(e)&&(e=he(e),t=!0),!(this instanceof st)){if(t&&"<"!=e.charAt(0))throw Je("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new st(e)}vt(this,t?function(e,t){var n;return t=t||ee,(n=Qe.exec(e))?[t.createElement(n[1])]:(n=at(e,t))?n.childNodes:[]}(e):e)}function lt(e){return e.cloneNode(!0)}function ut(e,t){if(t||dt(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)dt(n[r])}function ct(n,e,r,t){if(E(t))throw Je("offargs","jqLite#off() does not support the `selector` argument");var i=ft(n),o=i&&i.events,a=i&&i.handle;if(a)if(e)re(e.split(" "),function(e){if(E(r)){var t=o[e];if(me(t||[],r),t&&0<t.length)return}Ge(n,e,a),delete o[e]});else for(e in o)"$destroy"!==e&&Ge(n,e,a),delete o[e]}function dt(e,t){var n=e.ng339,r=n&&je[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),ct(e)),delete je[n],e.ng339=te}}function ft(e,t){var n=e.ng339,r=n&&je[n];return t&&!r&&(e.ng339=n=++We,r=je[n]={events:{},data:{},handle:te}),r}function ht(e,t,n){if(ot(e)){var r=E(n),i=!r&&t&&!le(t),o=!t,a=ft(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];ie(s,t)}}}function pt(e,t){return!!e.getAttribute&&-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")}function mt(t,e){e&&t.setAttribute&&re(e.split(" "),function(e){t.setAttribute("class",he((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+he(e)+" "," ")))})}function gt(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");re(t.split(" "),function(e){e=he(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",he(n))}}function vt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function yt(e,t){return bt(e,"$"+(t||"ngController")+"Controller")}function bt(e,t,n){e.nodeType==He&&(e=e.documentElement);for(var r=ce(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if((n=ne.data(e,r[i]))!==te)return n;e=e.parentNode||e.nodeType===Ue&&e.host}}function xt(e){for(ut(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function $t(e,t){t||ut(e);var n=e.parentNode;n&&n.removeChild(e)}rt.optgroup=rt.option,rt.tbody=rt.tfoot=rt.colgroup=rt.caption=rt.thead,rt.th=rt.td;var wt=st.prototype={ready:function(e){var t=!1;function n(){t||(t=!0,e())}"complete"===ee.readyState?setTimeout(n):(this.on("DOMContentLoaded",n),st(l).on("load",n))},toString:function(){var t=[];return re(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(e){return ne(0<=e?this[e]:this[this.length+e])},length:0,push:e,sort:[].sort,splice:[].splice},Ct={};re("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ct[D(e)]=e});var Et={};re("input,select,option,textarea,button,form,details".split(","),function(e){Et[e]=!0});var St={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};function _t(e,t){var n=Ct[t.toLowerCase()];return n&&Et[pe(e)]&&n}function kt(e,t){if(se(t)){var n=e.nodeType;return n===Le||n===Ie?e.textContent:""}e.textContent=t}function Nt(){this.$get=function(){return ie(st,{hasClass:function(e,t){return e.attr&&(e=e[0]),pt(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),gt(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),mt(e,t)}})}}function Tt(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||_)():r+":"+e}function At(e,t){if(t){var n=0;this.nextUid=function(){return++n}}re(e,this.put,this)}re({data:ht,removeData:dt,hasData:function(e){for(var t in je[e.ng339])return!0;return!1}},function(e,t){st[t]=e}),re({data:ht,inheritedData:bt,scope:function(e){return ne.data(e,"$scope")||bt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return ne.data(e,"$isolateScope")||ne.data(e,"$isolateScopeNoTemplate")},controller:yt,injector:function(e){return bt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:pt,css:function(e,t,n){if(t=Ze(t),!E(n))return e.style[t];e.style[t]=n},attr:function(e,t,n){var r=e.nodeType;if(r!==Ie&&2!==r&&r!==Fe){var i=D(t);if(Ct[i]){if(!E(n))return e[t]||(e.attributes.getNamedItem(t)||ae).specified?i:te;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(E(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?te:o}}},prop:function(e,t,n){if(!E(n))return e[t];e[t]=n},text:(kt.$dv="",kt),val:function(e,t){if(se(t)){if(e.multiple&&"select"===pe(e)){var n=[];return re(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(se(t))return e.innerHTML;ut(e,!0),e.innerHTML=t},empty:xt},function(u,e){st.prototype[e]=function(e,t){var n,r,i=this.length;if(u!==xt&&(2==u.length&&u!==pt&&u!==yt?e:t)===te){if(le(e)){for(n=0;n<i;n++)if(u===ht)u(this[n],e);else for(r in e)u(this[n],r,e[r]);return this}for(var o=u.$dv,a=o===te?Math.min(i,1):i,s=0;s<a;s++){var l=u(this[s],e,t);o=o?o+l:l}return o}for(n=0;n<i;n++)u(this[n],e,t);return this}}),re({removeData:dt,on:function e(t,n,r,i){if(E(i))throw Je("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ot(t)){var o=ft(t,!0),a=o.events,s=o.handle;s=s||(o.handle=function(a,s){function e(e,t){e.isDefaultPrevented=function(){return e.defaultPrevented};var n=s[t||e.type],r=n?n.length:0;if(r){if(se(e.immediatePropagationStopped)){var i=e.stopImmediatePropagation;e.stopImmediatePropagation=function(){e.immediatePropagationStopped=!0,e.stopPropagation&&e.stopPropagation(),i&&i.call(e)}}e.isImmediatePropagationStopped=function(){return!0===e.immediatePropagationStopped},1<r&&(n=z(n));for(var o=0;o<r;o++)e.isImmediatePropagationStopped()||n[o].call(a,e)}}return e.elem=a,e}(t,a));for(var l=0<=n.indexOf(" ")?n.split(" "):[n],u=l.length;u--;){var c=a[n=l[u]];c||(a[n]=[],"mouseenter"===n||"mouseleave"===n?e(t,Ke[n],function(e){var t=e.relatedTarget;t&&(t===this||this.contains(t))||s(e,n)}):"$destroy"!==n&&qe(t,n,s),c=a[n]),c.push(r)}}},off:ct,one:function(t,n,r){(t=ne(t)).on(n,function e(){t.off(n,r),t.off(n,e)}),t.on(n,r)},replaceWith:function(t,e){var n,r=t.parentNode;ut(t),re(new st(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(e){var t=[];return re(e.childNodes,function(e){e.nodeType===Le&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Le||n===Ue)for(var r=0,i=(t=new st(t)).length;r<i;r++){var o=t[r];e.appendChild(o)}},prepend:function(t,e){if(t.nodeType===Le){var n=t.firstChild;re(new st(e),function(e){t.insertBefore(e,n)})}},wrap:function(e,t){t=ne(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:$t,detach:function(e){$t(e,!0)},after:function(e,t){for(var n=e,r=e.parentNode,i=0,o=(t=new st(t)).length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:gt,removeClass:mt,toggleClass:function(n,e,r){e&&re(e.split(" "),function(e){var t=r;se(t)&&(t=!pt(n,e)),(t?gt:mt)(n,e)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Ue?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:lt,triggerHandler:function(t,e,n){var r,i,o,a=e.type||e,s=ft(t),l=s&&s.events,u=l&&l[a];u&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:ae,type:a,target:t},e.type&&(r=ie(r,e)),i=z(u),o=n?[r].concat(n):[r],re(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,o)}))}},function(a,e){st.prototype[e]=function(e,t,n){for(var r,i=0,o=this.length;i<o;i++)se(r)?E(r=a(this[i],e,t,n))&&(r=ne(r)):vt(r,a(this[i],e,t,n));return E(r)?r:this},st.prototype.bind=st.prototype.on,st.prototype.unbind=st.prototype.off}),At.prototype={put:function(e,t){this[Tt(e,this.nextUid)]=t},get:function(e){return this[Tt(e,this.nextUid)]},remove:function(e){var t=this[e=Tt(e,this.nextUid)];return delete this[e],t}};var Rt=[function(){this.$get=[function(){return At}]}],Bt=/^[^\(]*\(\s*([^\)]*)\)/m,Dt=/,/,Mt=/^\s*(_?)(\S+?)\1\s*$/,Ot=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Pt=x("$injector");function Lt(e,c){c=!0===c;var i={},a="Provider",s=[],o=new At([],!0),l={$provide:{provider:t(r),factory:t(f),service:t(function(e,t){return f(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return f(e,$(t),!1)}),constant:t(function(e,t){De(e,"constant"),l[e]=t,n[e]=t}),decorator:function(e,t){var n=u.get(e+a),r=n.$get;n.$get=function(){var e=d.invoke(r,n);return d.invoke(t,null,{$delegate:e})}}}},u=l.$injector=h(l,function(e,t){throw S.isString(t)&&s.push(t),Pt("unpr","Unknown provider: {0}",s.join(" <- "))}),n={},d=n.$injector=h(n,function(e,t){var n=u.get(e+a,t);return d.invoke(n.$get,n,te,e)});return re(function n(e){Re(se(e)||ce(e),"modulesToLoad","not an array");var r,i=[];re(e,function(t){if(!o.get(t)){o.put(t,!0);try{ue(t)?(r=p(t),i=i.concat(n(r.requires)).concat(r._runBlocks),e(r._invokeQueue),e(r._configBlocks)):de(t)?i.push(u.invoke(t)):ce(t)?i.push(u.invoke(t)):Be(t,"module")}catch(e){throw ce(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Pt("modulerr","Failed to instantiate module {0} due to:\n{1}",t,e.stack||e.message||e)}}function e(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=u.get(r[0]);i[r[1]].apply(i,r[2])}}});return i}(e),function(e){e&&d.invoke(e)}),d;function t(n){return function(e,t){if(!le(e))return n(e,t);re(e,m(n))}}function r(e,t){if(De(e,"service"),(de(t)||ce(t))&&(t=u.instantiate(t)),!t.$get)throw Pt("pget","Provider '{0}' must define $get factory method.",e);return l[e+a]=t}function f(e,t,n){return r(e,{$get:!1!==n?function(t,n){return function(){var e=d.invoke(n,this);if(se(e))throw Pt("undef","Provider '{0}' must return a value from $get factory method.",t);return e}}(e,t):t})}function h(n,r){function u(t,e){if(n.hasOwnProperty(t)){if(n[t]===i)throw Pt("cdep","Circular dependency found: {0}",t+" <- "+s.join(" <- "));return n[t]}try{return s.unshift(t),n[t]=i,n[t]=r(t,e)}catch(e){throw n[t]===i&&delete n[t],e}finally{s.shift()}}function o(e,t,n,r){"string"==typeof n&&(r=n,n=null);var i,o,a,s=[],l=Lt.$$annotate(e,c,r);for(o=0,i=l.length;o<i;o++){if("string"!=typeof(a=l[o]))throw Pt("itkn","Incorrect injection token! Expected service name as string, got {0}",a);s.push(n&&n.hasOwnProperty(a)?n[a]:u(a,r))}return ce(e)&&(e=e[i]),e.apply(t,s)}return{invoke:o,instantiate:function(e,t,n){var r=Object.create((ce(e)?e[e.length-1]:e).prototype||null),i=o(e,r,t,n);return le(i)||de(i)?i:r},get:u,annotate:Lt.$$annotate,has:function(e){return l.hasOwnProperty(e+a)||n.hasOwnProperty(e)}}}}function It(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(r,n,i){var o=r.document;function a(e){if(e){e.scrollIntoView();var t=function(){var e=s.yOffset;if(de(e))e=e();else if(H(e)){var t=e[0];e="fixed"!==r.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom}else k(e)||(e=0);return e}();if(t){var n=e.getBoundingClientRect().top;r.scrollBy(0,n-t)}}else r.scrollTo(0,0)}function s(e){var t;(e=ue(e)?e:n.hash())?(t=o.getElementById(e))?a(t):(t=function(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===pe(e))return t=e,!0}),t}(o.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}return e&&i.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||function(e,t){"complete"===(t=t||l).document.readyState?t.setTimeout(e):ne(t).on("load",e)}(function(){i.$evalAsync(s)})}),s}]}Lt.$$annotate=function(e,t,n){var r,i;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw ue(n)&&n||(n=e.name||function(e){var t=e.toString().replace(Ot,"").match(Bt);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}(e)),Pt("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);re(e.toString().replace(Ot,"").match(Bt)[1].split(Dt),function(e){e.replace(Mt,function(e,t,n){r.push(n)})})}e.$inject=r}}else ce(e)?(Be(e[i=e.length-1],"fn"),r=e.slice(0,i)):Be(e,"fn",!0);return r};var Ft=x("$animate"),Ht=1,Ut="ng-animate";function zt(e,t){return e||t?e?t?(ce(e)&&(e=e.join(" ")),ce(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Vt(e){return le(e)?e:{}}function jt(){this.$get=["$q","$$rAF",function(n,r){function e(){}return e.all=ae,e.chain=ae,e.prototype={end:ae,cancel:ae,resume:ae,pause:ae,complete:ae,then:function(e,t){return n(function(e){r(function(){e()})}).then(e,t)}},e}]}function Wt(){var l=new At,u=[];this.$get=["$$AnimateRunner","$rootScope",function(i,s){return{enabled:ae,on:ae,off:ae,pin:ae,push:function(e,t,n,r){return r&&r(),(n=n||{}).from&&e.css(n.from),n.to&&e.css(n.to),(n.addClass||n.removeClass)&&function(e,t,n){var r=l.get(e);r||(l.put(e,r={}),u.push(e));function i(e,t){var n=!1;return e&&re(e=ue(e)?e.split(" "):ce(e)?e:[],function(e){e&&(n=!0,r[e]=t)}),n}var o=i(t,!0),a=i(n,!1);if(!o&&!a||1<u.length)return;s.$$postDigest(function(){re(u,function(e){var t=l.get(e);if(t){var n=function(e){ue(e)&&(e=e.split(" "));var t=Pe();return re(e,function(e){e.length&&(t[e]=!0)}),t}(e.attr("class")),r="",i="";re(t,function(e,t){e!==!!n[t]&&(e?r+=(r.length?" ":"")+t:i+=(i.length?" ":"")+t)}),re(e,function(e){r&&gt(e,r),i&&mt(e,i)}),l.remove(e)}}),u.length=0})}(e,n.addClass,n.removeClass),new i}}}]}function qt(){this.$get=["$$rAF","$q",function(o,e){function a(){}return a.prototype={done:function(e){this.defer&&this.defer[!0===e?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=e.defer()),this.defer.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)}},function(e,t){t.from&&(e.css(t.from),t.from=null);var n,r=new a;return{start:i,end:i};function i(){return o(function(){!function(){t.addClass&&(e.addClass(t.addClass),t.addClass=null);t.removeClass&&(e.removeClass(t.removeClass),t.removeClass=null);t.to&&(e.css(t.to),t.to=null)}(),n||r.done(),n=!0}),r}}}]}var Gt=["$provide",function(r){var i=this;this.$$registeredAnimations=Object.create(null),this.register=function(e,t){if(e&&"."!==e.charAt(0))throw Ft("notcsel","Expecting class selector starting with '.' got '{0}'.",e);var n=e+"-animation";i.$$registeredAnimations[e.substr(1)]=n,r.factory(n,t)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter&&new RegExp("(\\s+|\\/)"+Ut+"(\\s+|\\/)").test(this.$$classNameFilter.toString())))throw Ft("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ut);return this.$$classNameFilter},this.$get=["$$animateQueue",function(o){function i(e,t,n){if(n){var r=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ht)return n}}(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:o.on,off:o.off,pin:o.pin,enabled:o.enabled,cancel:function(e){e.end&&e.end()},enter:function(e,t,n,r){return t=t&&ne(t),n=n&&ne(n),i(e,t=t||n.parent(),n),o.push(e,"enter",Vt(r))},move:function(e,t,n,r){return t=t&&ne(t),n=n&&ne(n),i(e,t=t||n.parent(),n),o.push(e,"move",Vt(r))},leave:function(e,t){return o.push(e,"leave",Vt(t),function(){e.remove()})},addClass:function(e,t,n){return(n=Vt(n)).addClass=zt(n.addclass,t),o.push(e,"addClass",n)},removeClass:function(e,t,n){return(n=Vt(n)).removeClass=zt(n.removeClass,t),o.push(e,"removeClass",n)},setClass:function(e,t,n,r){return(r=Vt(r)).addClass=zt(r.addClass,t),r.removeClass=zt(r.removeClass,n),o.push(e,"setClass",r)},animate:function(e,t,n,r,i){return(i=Vt(i)).from=i.from?ie(i.from,t):t,i.to=i.to?ie(i.to,n):n,r=r||"ng-inline-animate",i.tempClasses=zt(i.tempClasses,r),o.push(e,"animate",i)}}}]}];function Xt(o,e,t,a){var s=this,l=(e[0],o.location),u=o.history,r=o.setTimeout,n=o.clearTimeout,i={};s.isMock=!1;var c=0,d=[];function f(e){try{e.apply(null,ve(arguments,1))}finally{if(0===--c)for(;d.length;)try{d.pop()()}catch(e){t.error(e)}}}s.$$completeOutstandingRequest=f,s.$$incOutstandingRequestCount=function(){c++},s.notifyWhenNoOutstandingRequests=function(e){0===c?e():d.push(e)};var h,p,m=l.href,g=e.find("base"),v=null;w(),p=h,s.url=function(e,t,n){if(se(n)&&(n=null),l!==o.location&&(l=o.location),u!==o.history&&(u=o.history),e){var r=p===n;if(m===e&&(!a.history||r))return s;var i=m&&Fn(m)===Fn(e);return m=e,p=n,!a.history||i&&r?(i&&!v||(v=e),t?l.replace(e):i?l.hash=function(e){var t=e.indexOf("#");return-1===t?"":e.substr(t)}(e):l.href=e):(u[t?"replaceState":"pushState"](n,"",e),w(),p=h),s}return v||l.href.replace(/%27/g,"'")},s.state=function(){return h};var y=[],b=!1;function x(){w(),C()}var $=null;function w(){ge(h=se(h=function(){try{return u.state}catch(e){}}())?null:h,$)&&(h=$),$=h}function C(){m===s.url()&&p===h||(m=s.url(),p=h,re(y,function(e){e(s.url(),h)}))}s.onUrlChange=function(e){return b||(a.history&&ne(o).on("popstate",x),ne(o).on("hashchange",x),b=!0),y.push(e),e},s.$$applicationDestroyed=function(){ne(o).off("hashchange popstate",x)},s.$$checkUrlChange=C,s.baseHref=function(){var e=g.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},s.defer=function(e,t){var n;return c++,n=r(function(){delete i[n],f(e)},t||0),i[n]=!0,n},s.defer.cancel=function(e){return!!i[e]&&(delete i[e],n(e),f(ae),!0)}}function Yt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Xt(e,r,t,n)}]}function Kt(){this.$get=function(){var d={};function e(e,t){if(e in d)throw x("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var n=0,r=ie({},t,{id:e}),i={},o=t&&t.capacity||Number.MAX_VALUE,a={},s=null,l=null;return d[e]={put:function(e,t){if(!se(t)){if(o<Number.MAX_VALUE)u(a[e]||(a[e]={key:e}));return e in i||n++,i[e]=t,o<n&&this.remove(l.key),t}},get:function(e){if(o<Number.MAX_VALUE){var t=a[e];if(!t)return;u(t)}return i[e]},remove:function(e){if(o<Number.MAX_VALUE){var t=a[e];if(!t)return;t==s&&(s=t.p),t==l&&(l=t.n),c(t.n,t.p),delete a[e]}delete i[e],n--},removeAll:function(){i={},n=0,a={},s=l=null},destroy:function(){a=r=i=null,delete d[e]},info:function(){return ie({},r,{size:n})}};function u(e){e!=s&&(l?l==e&&(l=e.n):l=e,c(e.n,e.p),c(e,s),(s=e).n=null)}function c(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}}return e.info=function(){var n={};return re(d,function(e,t){n[t]=e.info()}),n},e.get=function(e){return d[e]},e}}function Jt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}var Zt=x("$compile");function Qt(n,t){var h={},p="Directive",k=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,B=/(([\w\-]+)(?:\:([^;]+))?;?)/,c=function(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}("ngSrc,ngSrcset,src,srcset"),Q=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,d=/^(on[a-z]+|formaction)$/;function o(e,r,i){var o=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,a={};return re(e,function(e,t){var n=e.match(o);if(!n)throw Zt("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",r,t,e,i?"controller bindings definition":"isolate scope definition");a[t]={mode:n[1][0],collection:"*"===n[2],optional:"?"===n[3],attrName:n[4]||t}}),a}function l(e,t){var n={isolateScope:null,bindToController:null};if(le(e.scope)&&(!0===e.bindToController?(n.bindToController=o(e.scope,t,!0),n.isolateScope={}):n.isolateScope=o(e.scope,t,!1)),le(e.bindToController)&&(n.bindToController=o(e.bindToController,t,!0)),le(n.bindToController)){var r=e.controller,i=e.controllerAs;if(!r)throw Zt("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!function(e,t){if(t&&ue(t))return t;if(ue(e)){var n=an.exec(e);if(n)return n[3]}}(r,i))throw Zt("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}this.directive=function e(s,t){return De(s,"directive"),ue(s)?(function(e){var t=e.charAt(0);if(!t||t!==D(t))throw Zt("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Zt("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}(s),Re(t,"directiveFactory"),h.hasOwnProperty(s)||(h[s]=[],n.factory(s+p,["$injector","$exceptionHandler",function(i,o){var a=[];return re(h[s],function(e,t){try{var n=i.invoke(e);de(n)?n={compile:$(n)}:!n.compile&&n.link&&(n.compile=$(n.link)),n.priority=n.priority||0,n.index=t,n.name=n.name||s,n.require=n.require||n.controller&&n.name,n.restrict=n.restrict||"EA";var r=n.$$bindings=l(n,n.name);le(r.isolateScope)&&(n.$$isolateBindings=r.isolateScope),n.$$moduleName=e.$$moduleName,a.push(n)}catch(e){o(e)}}),a}])),h[s].push(t)):re(s,m(e)),this},this.aHrefSanitizationWhitelist=function(e){return E(e)?(t.aHrefSanitizationWhitelist(e),this):t.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return E(e)?(t.imgSrcSanitizationWhitelist(e),this):t.imgSrcSanitizationWhitelist()};var s=!0;this.debugInfoEnabled=function(e){return E(e)?(s=e,this):s},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(f,$,P,e,m,L,o,t,r,i,y){var I=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)this[i=o[n]]=t[i]}else this.$attr={};this.$$element=e};function N(e,t){try{e.addClass(t)}catch(e){}}I.prototype={$normalize:tn,$addClass:function(e){e&&0<e.length&&i.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&i.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=nn(e,t);n&&n.length&&i.addClass(this.$$element,n);var r=nn(t,e);r&&r.length&&i.removeClass(this.$$element,r)},$set:function(e,t,n,r){var i,o=this.$$element[0],a=_t(o,e),s=function(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&St[t]}(o,e),l=e;if(a?(this.$$element.prop(e,t),r=a):s&&(this[s]=t,l=s),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e])||(this.$attr[e]=r=Ne(e,"-")),"a"===(i=pe(this.$$element))&&"href"===e||"img"===i&&"src"===e)this[e]=t=y(t,"src"===e);else if("img"===i&&"srcset"===e){for(var u="",c=he(t),d=/\s/.test(c)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,f=c.split(d),h=Math.floor(f.length/2),p=0;p<h;p++){var m=2*p;u+=y(he(f[m]),!0),u+=" "+he(f[1+m])}var g=he(f[2*p]).split(/\s/);u+=y(he(g[0]),!0),2===g.length&&(u+=" "+he(g[1])),this[e]=t=u}!1!==n&&(null===t||t===te?this.$$element.removeAttr(r):this.$$element.attr(r,t));var v=this.$$observers;v&&re(v[l],function(e){try{e(t)}catch(e){P(e)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=Pe()),i=r[e]||(r[e]=[]);return i.push(t),o.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||se(n[e])||t(n[e])}),function(){me(i,t)}}};var n=$.startSymbol(),a=$.endSymbol(),F="{{"==n||"}}"==a?b:function(e){return e.replace(/\{\{/g,n).replace(/}}/g,a)},w=/^ngAttr[A-Z]/;return H.$$addBindingInfo=s?function(e,t){var n=e.data("$binding")||[];ce(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:ae,H.$$addBindingClass=s?function(e){N(e,"ng-binding")}:ae,H.$$addScopeInfo=s?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:ae,H.$$addScopeClass=s?function(e,t){N(e,t?"ng-isolate-scope":"ng-scope")}:ae,H;function H(l,e,t,n,r){l instanceof ne||(l=ne(l)),re(l,function(e,t){e.nodeType==Ie&&e.nodeValue.match(/\S+/)&&(l[t]=ne(e).wrap("<span></span>").parent()[0])});var u=T(l,e,l,t,n,r);H.$$addScopeClass(l);var c=null;return function(e,t,n){Re(e,"scope");var r,i=(n=n||{}).parentBoundTranscludeFn,o=n.transcludeControllers,a=n.futureParentElement;if(i&&i.$$boundTransclude&&(i=i.$$boundTransclude),r="html"!==(c=c||function(e){var t=e&&e[0];return t&&"foreignobject"!==pe(t)&&t.toString().match(/SVG/)?"svg":"html"}(a))?ne(X(c,ne("<div>").append(l).html())):t?wt.clone.call(l):l,o)for(var s in o)r.data("$"+s+"Controller",o[s].instance);return H.$$addScopeInfo(r,e),t&&t(r,e),u&&u(e,r,r,i),r}}function T(e,m,t,n,r,i){for(var o,a,s,l,u,c,g,v=[],d=0;d<e.length;d++)o=new I,(s=(a=U(e[d],[],o,0===d?n:te,r)).length?R(a,e[d],o,m,t,null,[],[],i):null)&&s.scope&&H.$$addScopeClass(o.$$element),u=s&&s.terminal||!(l=e[d].childNodes)||!l.length?null:T(l,s?(s.transcludeOnThisElement||!s.templateOnThisElement)&&s.transclude:m),(s||u)&&(v.push(d,s,u),c=!0,g=g||s),i=null;return c?function(e,t,n,r){var i,o,a,s,l,u,c,d,f;if(g){var h=t.length;for(f=new Array(h),l=0;l<v.length;l+=3)c=v[l],f[c]=t[c]}else f=t;for(l=0,u=v.length;l<u;)if(a=f[v[l++]],i=v[l++],o=v[l++],i){if(i.scope){s=e.$new(),H.$$addScopeInfo(ne(a),s);var p=i.$$destroyBindings;p&&(i.$$destroyBindings=null,s.$on("$destroyed",p))}else s=e;d=i.transcludeOnThisElement?A(e,i.transclude,r):!i.templateOnThisElement&&r?r:!r&&m?A(e,m):null,i(o,s,a,n,d,i)}else o&&o(e,a.childNodes,te,r)}:null}function A(o,a,s){return function(e,t,n,r,i){return e||((e=o.$new(!1,i)).$$transcluded=!0),a(e,t,{parentBoundTranscludeFn:s,transcludeControllers:n,futureParentElement:r})}}function U(e,t,n,r,i){var o,a,s=e.nodeType,l=n.$attr;switch(s){case Le:C(t,tn(pe(e)),"E",r,i);for(var u,c,d,f,h,p,m=e.attributes,g=0,v=m&&m.length;g<v;g++){var y=!1,b=!1;c=(u=m[g]).name,h=he(u.value),f=tn(c),(p=w.test(f))&&(c=c.replace(en,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var x=f.replace(/(Start|End)$/,"");E(x)&&f===x+"Start"&&(b=(y=c).substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),l[d=tn(c.toLowerCase())]=c,!p&&n.hasOwnProperty(d)||(n[d]=h,_t(e,d)&&(n[d]=!0)),_(e,t,h,d,p),C(t,d,"A",r,i,y,b)}if(le(a=e.className)&&(a=a.animVal),ue(a)&&""!==a)for(;o=B.exec(a);)C(t,d=tn(o[2]),"C",r,i)&&(n[d]=he(o[3])),a=a.substr(o.index+o[0].length);break;case Ie:if(11===O)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Ie;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);!function(e,t){var i=$(t,!0);i&&e.push({priority:0,compile:function(e){var t=e.parent(),r=!!t.length;return r&&H.$$addBindingClass(t),function(e,t){var n=t.parent();r||H.$$addBindingClass(n),H.$$addBindingInfo(n,i.expressions),e.$watch(i,function(e){t[0].nodeValue=e})}}})}(t,e.nodeValue);break;case Fe:try{(o=k.exec(e.nodeValue))&&C(t,d=tn(o[1]),"M",r,i)&&(n[d]=he(o[2]))}catch(e){}}return t.sort(S),t}function z(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw Zt("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==Le&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i);else r.push(e);return ne(r)}function V(o,a,s){return function(e,t,n,r,i){return t=z(t[0],a,s),o(e,t,n,r,i)}}function R(e,x,$,t,n,r,w,C,i){i=i||{};for(var o,a,s,l,u,c=-Number.MAX_VALUE,E=i.newScopeDirective,S=i.controllerDirectives,_=i.newIsolateScopeDirective,k=i.templateDirective,d=i.nonTlbTranscludeDirective,f=!1,h=!1,N=i.hasElementTranscludeDirective,p=$.$$element=ne(x),m=r,g=t,v=0,y=e.length;v<y;v++){var b=(o=e[v]).$$start,T=o.$$end;if(b&&(p=z(x,b,T)),s=te,c>o.priority)break;if((u=o.scope)&&(o.templateUrl||(le(u)?(G("new/isolated scope",_||E,o,p),_=o):G("new/isolated scope",_,o,p)),E=E||o),a=o.name,!o.templateUrl&&o.controller&&(u=o.controller,S=S||Pe(),G("'"+a+"' controller",S[a],o,p),S[a]=o),(u=o.transclude)&&(f=!0,o.$$tlb||(G("transclusion",d,o,p),d=o),g="element"==u?(N=!0,c=o.priority,s=p,p=$.$$element=ne(ee.createComment(" "+a+": "+$[a]+" ")),x=p[0],Y(n,ve(s),x),H(s,t,c,m&&m.name,{nonTlbTranscludeDirective:d})):(s=ne(lt(x)).contents(),p.empty(),H(s,t))),o.template)if(h=!0,G("template",k,o,p),u=de((k=o).template)?o.template(p,$):o.template,u=F(u),o.replace){if(m=o,s=it(u)?[]:rn(X(o.templateNamespace,he(u))),x=s[0],1!=s.length||x.nodeType!==Le)throw Zt("tplrt","Template for directive '{0}' must have exactly one root element. {1}",a,"");Y(n,p,x);var A={$attr:{}},R=U(x,[],A),B=e.splice(v+1,e.length-(v+1));_&&j(R),e=e.concat(R).concat(B),W($,A),y=e.length}else p.html(u);if(o.templateUrl)h=!0,G("template",k,o,p),(k=o).replace&&(m=o),O=q(e.splice(v,e.length-v),p,$,n,f&&g,w,C,{controllerDirectives:S,newScopeDirective:E!==o&&E,newIsolateScopeDirective:_,templateDirective:k,nonTlbTranscludeDirective:d}),y=e.length;else if(o.compile)try{de(l=o.compile(p,$,g))?D(null,l,b,T):l&&D(l.pre,l.post,b,T)}catch(e){P(e,ye(p))}o.terminal&&(O.terminal=!0,c=Math.max(c,o.priority))}return O.scope=E&&!0===E.scope,O.transcludeOnThisElement=f,O.templateOnThisElement=h,O.transclude=g,i.hasElementTranscludeDirective=N,O;function D(e,t,n,r){e&&(n&&(e=V(e,n,r)),e.require=o.require,e.directiveName=a,_!==o&&!o.$$isolateScope||(e=K(e,{isolateScope:!0})),w.push(e)),t&&(n&&(t=V(t,n,r)),t.require=o.require,t.directiveName=a,_!==o&&!o.$$isolateScope||(t=K(t,{isolateScope:!0})),C.push(t))}function M(e,t,n,r){var i;if(ue(t)){var o=t.match(Q),a=t.substring(o[0].length),s=o[1]||o[3],l="?"===o[2];if("^^"===s?n=n.parent():i=(i=r&&r[a])&&i.instance,!i){var u="$"+a+"Controller";i=s?n.inheritedData(u):n.data(u)}if(!i&&!l)throw Zt("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,e)}else if(ce(t)){i=[];for(var c=0,d=t.length;c<d;c++)i[c]=M(e,t[c],n,r)}return i||null}function O(e,t,n,r,i,o){var a,s,l,u,c,d,f,h,p;if(x===n?h=(p=$).$$element:(h=ne(n),p=new I(h,$)),_&&(c=t.$new(!0)),i&&((f=function(e,t,n){var r;fe(e)||(n=t,t=e,e=te);N&&(r=d);n=n||(N?h.parent():h);return i(e,t,r,n,b)}).$$boundTransclude=i),S&&(d=function(e,t,n,r,i,o){var a=Pe();for(var s in r){var l=r[s],u={$scope:l===_||l.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},c=l.controller;"@"==c&&(c=t[l.name]);var d=L(c,u,!0,l.controllerAs);a[l.name]=d,N||e.data("$"+l.name+"Controller",d.instance)}return a}(h,p,f,S,c,t)),_&&(H.$$addScopeInfo(h,c,!0,!(k&&(k===_||k===_.$$originalDirective))),H.$$addScopeClass(h,!0),c.$$isolateBindings=_.$$isolateBindings,Z(t,p,c,c.$$isolateBindings,_,c)),d){var m,g,v=_||E;for(a in v&&d[v.name]&&(m=v.$$bindings.bindToController,(u=d[v.name])&&u.identifier&&m&&(g=u,o.$$destroyBindings=Z(t,p,u.instance,m,v))),d){var y=(u=d[a])();y!==u.instance&&(u.instance=y,h.data("$"+a+"Controller",y),u===g&&(o.$$destroyBindings(),o.$$destroyBindings=Z(t,p,y,m,v)))}}for(a=0,s=w.length;a<s;a++)J(l=w[a],l.isolateScope?c:t,h,p,l.require&&M(l.directiveName,l.require,h,d),f);var b=t;for(_&&(_.template||null===_.templateUrl)&&(b=c),e&&e(b,n.childNodes,te,i),a=C.length-1;0<=a;a--)J(l=C[a],l.isolateScope?c:t,h,p,l.require&&M(l.directiveName,l.require,h,d),f)}}function j(e){for(var t=0,n=e.length;t<n;t++)e[t]=oe(e[t],{$$isolateScope:!0})}function C(e,t,n,r,i,o,a){if(t===i)return null;var s=null;if(h.hasOwnProperty(t))for(var l,u=f.get(t+p),c=0,d=u.length;c<d;c++)try{l=u[c],(r===te||r>l.priority)&&-1!=l.restrict.indexOf(n)&&(o&&(l=oe(l,{$$start:o,$$end:a})),e.push(l),s=l)}catch(e){P(e)}return s}function E(e){if(h.hasOwnProperty(e))for(var t=f.get(e+p),n=0,r=t.length;n<r;n++)if(t[n].multiElement)return!0;return!1}function W(n,r){var i=r.$attr,o=n.$attr,a=n.$$element;re(n,function(e,t){"$"!=t.charAt(0)&&(r[t]&&r[t]!==e&&(e+=("style"===t?";":" ")+r[t]),n.$set(t,e,!0,i[t]))}),re(r,function(e,t){"class"==t?(N(a,e),n.class=(n.class?n.class+" ":"")+e):"style"==t?(a.attr("style",a.attr("style")+";"+e),n.style=(n.style?n.style+";":"")+e):"$"==t.charAt(0)||n.hasOwnProperty(t)||(n[t]=e,o[t]=i[t])})}function q(f,h,p,m,g,v,y,b){var x,$,w=[],C=h[0],E=f.shift(),S=oe(E,{templateUrl:null,transclude:null,replace:null,$$originalDirective:E}),_=de(E.templateUrl)?E.templateUrl(h,p):E.templateUrl,k=E.templateNamespace;return h.empty(),e(_).then(function(e){var n,t,r,i;if(e=F(e),E.replace){if(r=it(e)?[]:rn(X(k,he(e))),n=r[0],1!=r.length||n.nodeType!==Le)throw Zt("tplrt","Template for directive '{0}' must have exactly one root element. {1}",E.name,_);t={$attr:{}},Y(m,h,n);var o=U(n,[],t);le(E.scope)&&j(o),f=o.concat(f),W(p,t)}else n=C,h.html(e);for(f.unshift(S),x=R(f,n,p,g,h,E,v,y,b),re(m,function(e,t){e==n&&(m[t]=h[0])}),$=T(h[0].childNodes,g);w.length;){var a=w.shift(),s=w.shift(),l=w.shift(),u=w.shift(),c=h[0];if(!a.$$destroyed){if(s!==C){var d=s.className;b.hasElementTranscludeDirective&&E.replace||(c=lt(n)),Y(l,ne(s),c),N(ne(c),d)}i=x.transcludeOnThisElement?A(a,x.transclude,u):u,x($,a,c,m,i,x)}}w=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(w?w.push(t,n,r,o):(x.transcludeOnThisElement&&(o=A(t,x.transclude,i)),x($,t,n,r,o,x)))}}function S(e,t){var n=t.priority-e.priority;return 0!=n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function G(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Zt("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,ye(r))}function X(e,t){switch(e=D(e||"html")){case"svg":case"math":var n=ee.createElement("div");return n.innerHTML="<"+e+">"+t+"</"+e+">",n.childNodes[0].childNodes;default:return t}}function _(e,t,o,a,s){var l=function(e,t){if("srcdoc"==t)return r.HTML;var n=pe(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?r.RESOURCE_URL:void 0}(e,a);s=c[a]||s;var u=$(o,!0,l,s);if(u){if("multiple"===a&&"select"===pe(e))throw Zt("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",ye(e));t.push({priority:100,compile:function(){return{pre:function(e,t,n){var r=n.$$observers||(n.$$observers={});if(d.test(a))throw Zt("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var i=n[a];i!==o&&(u=i&&$(i,!0,l,s),o=i),u&&(n[a]=u(e),(r[a]||(r[a]=[])).$$inter=!0,(n.$$observers&&n.$$observers[a].$$scope||e).$watch(u,function(e,t){"class"===a&&e!=t?n.$updateClass(e,t):n.$set(a,e)}))}}}})}}function Y(e,t,n){var r,i,o=t[0],a=t.length,s=o.parentNode;if(e)for(r=0,i=e.length;r<i;r++)if(e[r]==o){e[r++]=n;for(var l=r,u=l+a-1,c=e.length;l<c;l++,u++)u<c?e[l]=e[u]:delete e[l];e.length-=a-1,e.context===o&&(e.context=n);break}s&&s.replaceChild(n,o);var d=ee.createDocumentFragment();d.appendChild(o),ne.hasData(o)&&(ne(n).data(ne(o).data()),g?(Te=!0,g.cleanData([o])):delete ne.cache[o[ne.expando]]);for(var f=1,h=t.length;f<h;f++){var p=t[f];ne(p).remove(),d.appendChild(p),delete t[f]}t[0]=n,t.length=1}function K(e,t){return ie(function(){return e.apply(null,arguments)},e,t)}function J(e,t,n,r,i,o){try{e(t,n,r,i,o)}catch(e){P(e,ye(n))}}function Z(c,d,f,e,h,t){var p;re(e,function(e,t){var n,r,i,o,a=e.attrName,s=e.optional;switch(e.mode){case"@":s||M.call(d,a)||(f[t]=d[a]=void 0),d.$observe(a,function(e){ue(e)&&(f[t]=e)}),d.$$observers[a].$$scope=c,ue(d[a])&&(f[t]=$(d[a])(c));break;case"=":if(!M.call(d,a)){if(s)break;d[a]=void 0}if(s&&!d[a])break;r=m(d[a]),o=r.literal?ge:function(e,t){return e===t||e!=e&&t!=t},i=r.assign||function(){throw n=f[t]=r(c),Zt("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",d[a],h.name)},n=f[t]=r(c);var l,u=function(e){return o(e,f[t])||(o(e,n)?i(c,e=f[t]):f[t]=e),n=e};u.$stateful=!0,l=e.collection?c.$watchCollection(d[a],u):c.$watch(m(d[a],u),null,r.literal),(p=p||[]).push(l);break;case"&":if((r=d.hasOwnProperty(a)?m(d[a]):ae)===ae&&s)break;f[t]=function(e){return r(c,e)}}});var n=p?function(){for(var e=0,t=p.length;e<t;++e)p[e]()}:ae;return t&&n!==ae?(t.$on("$destroy",n),ae):n}}]}Qt.$inject=["$provide","$$sanitizeUriProvider"];var en=/^((?:x|data)[\:\-_])/i;function tn(e){return Ze(e.replace(en,""))}function nn(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(0<n.length?" ":"")+a}return n}function rn(e){var t=(e=ne(e)).length;if(t<=1)return e;for(;t--;){e[t].nodeType===Fe&&n.call(e,t,1)}return e}var on=x("$controller"),an=/^(\S+)(\s+as\s+(\w+))?$/;function sn(){var f={},h=!1;this.register=function(e,t){De(e,"controller"),le(e)?ie(f,e):f[e]=t},this.allowGlobals=function(){h=!0},this.$get=["$injector","$window",function(u,c){return function(t,n,e,r){var i,o,a,s;if(e=!0===e,r&&ue(r)&&(s=r),ue(t)){if(!(o=t.match(an)))throw on("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);a=o[1],s=s||o[3],Be(t=f.hasOwnProperty(a)?f[a]:Me(n.$scope,a,!0)||(h?Me(c,a,!0):te),a,!0)}if(e){var l=(ce(t)?t[t.length-1]:t).prototype;return i=Object.create(l||null),s&&d(n,s,i,a||t.name),ie(function(){var e=u.invoke(t,i,n,a);return e!==i&&(le(e)||de(e))&&(i=e,s&&d(n,s,i,a||t.name)),i},{instance:i,identifier:s})}return i=u.instantiate(t,n,a),s&&d(n,s,i,a||t.name),i};function d(e,t,n,r){if(!e||!le(e.$scope))throw x("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}}]}function ln(){this.$get=["$window",function(e){return ne(e.document)}]}function un(){this.$get=["$log",function(n){return function(e,t){n.error.apply(n,arguments)}}]}function cn(){this.$get=["$document",function(t){return function(e){return e?!e.nodeType&&e instanceof ne&&(e=e[0]):e=t[0].body,e.offsetWidth+1}}]}var dn="application/json",fn={"Content-Type":dn+";charset=utf-8"},hn=/^\[|^\{(?!\{)/,pn={"[":/]$/,"{":/}$/},mn=/^\)\]\}',?\n/,gn=x("$http"),vn=function(e){return function(){throw gn("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}};function yn(e){return le(e)?N(e)?e.toISOString():X(e):e}function bn(){this.$get=function(){return function(e){if(!e)return"";var r=[];return f(e,function(e,n){null===e||se(e)||(ce(e)?re(e,function(e,t){r.push($e(n)+"="+$e(yn(e)))}):r.push($e(n)+"="+$e(yn(e))))}),r.join("&")}}}function xn(){this.$get=function(){return function(e){if(!e)return"";var t=[];return function n(e,r,i){if(null===e||se(e))return;ce(e)?re(e,function(e,t){n(e,r+"["+(le(e)?t:"")+"]")}):le(e)&&!N(e)?f(e,function(e,t){n(e,r+(i?"":"[")+t+(i?"":"]"))}):t.push($e(r)+"="+$e(yn(e)))}(e,"",!0),t.join("&")}}}function $n(e,t){if(ue(e)){var n=e.replace(mn,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(dn)||function(e){var t=e.match(hn);return t&&pn[t[0]].test(e)}(n))&&(e=Y(n))}}return e}function wn(e){var t,n=Pe();function r(e,t){e&&(n[e]=n[e]?n[e]+", "+t:t)}return ue(e)?re(e.split("\n"),function(e){t=e.indexOf(":"),r(D(he(e.substr(0,t))),he(e.substr(t+1)))}):le(e)&&re(e,function(e,t){r(D(t),he(e))}),n}function Cn(n){var r;return function(e){if(r=r||wn(n),e){var t=r[D(e)];return void 0===t&&(t=null),t}return r}}function En(t,n,r,e){return de(e)?e(t,n,r):(re(e,function(e){t=e(t,n,r)}),t)}function Sn(e){return 200<=e&&e<300}function _n(){var y=this.defaults={transformResponse:[$n],transformRequest:[function(e){return!le(e)||function(e){return"[object File]"===s.call(e)}(e)||function(e){return"[object Blob]"===s.call(e)}(e)||function(e){return"[object FormData]"===s.call(e)}(e)?e:X(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:z(fn),put:z(fn),patch:z(fn)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(e){return E(e)?(b=!!e,this):b};var u=!0;this.useLegacyPromiseExtensions=function(e){return E(e)?(u=!!e,this):u};var t=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(f,h,e,p,m,s){var g=e("$http");y.paramSerializer=ue(y.paramSerializer)?s.get(y.paramSerializer):y.paramSerializer;var l=[];function v(e){if(!S.isObject(e))throw x("$http")("badreq","Http request configuration must be an object.  Received: {0}",e);var n=ie({method:"get",transformRequest:y.transformRequest,transformResponse:y.transformResponse,paramSerializer:y.paramSerializer},e);n.headers=function(e){var t,n,r,i=y.headers,o=ie({},e.headers);i=ie({},i.common,i[D(e.method)]);e:for(t in i){for(r in n=D(t),o)if(D(r)===n)continue e;o[t]=i[t]}return function(e,n){var r,i={};return re(e,function(e,t){de(e)?null!=(r=e(n))&&(i[t]=r):i[t]=e}),i}(o,z(e))}(e),n.method=c(n.method),n.paramSerializer=ue(n.paramSerializer)?s.get(n.paramSerializer):n.paramSerializer;var t=[function(e){var n=e.headers,t=En(e.data,Cn(n),te,e.transformRequest);return se(t)&&re(n,function(e,t){"content-type"===D(t)&&delete n[t]}),se(e.withCredentials)&&!se(y.withCredentials)&&(e.withCredentials=y.withCredentials),function(i,e){var o,t,a=m.defer(),n=a.promise,r=i.headers,s=function(e,t){0<t.length&&(e+=(-1==e.indexOf("?")?"?":"&")+t);return e}(i.url,i.paramSerializer(i.params));v.pendingRequests.push(i),n.then(d,d),!i.cache&&!y.cache||!1===i.cache||"GET"!==i.method&&"JSONP"!==i.method||(o=le(i.cache)?i.cache:le(y.cache)?y.cache:g);o&&(E(t=o.get(s))?B(t)?t.then(c,c):ce(t)?u(t[1],t[0],z(t[2]),t[3]):u(t,200,{},"OK"):o.put(s,n));if(se(t)){var l=Hr(i.url)?h()[i.xsrfCookieName||y.xsrfCookieName]:te;l&&(r[i.xsrfHeaderName||y.xsrfHeaderName]=l),f(i.method,s,e,function(e,t,n,r){o&&(Sn(e)?o.put(s,[e,t,wn(n),r]):o.remove(s));function i(){u(t,e,n,r)}b?p.$applyAsync(i):(i(),p.$$phase||p.$apply())},r,i.timeout,i.withCredentials,i.responseType)}return n;function u(e,t,n,r){(Sn(t=Math.max(t,0))?a.resolve:a.reject)({data:e,status:t,headers:Cn(n),config:i,statusText:r})}function c(e){u(e.data,e.status,z(e.headers()),e.statusText)}function d(){var e=v.pendingRequests.indexOf(i);-1!==e&&v.pendingRequests.splice(e,1)}}(e,t).then(a,a)},te],r=m.when(n);for(re(l,function(e){(e.request||e.requestError)&&t.unshift(e.request,e.requestError),(e.response||e.responseError)&&t.push(e.response,e.responseError)});t.length;){var i=t.shift(),o=t.shift();r=r.then(i,o)}return u?(r.success=function(t){return Be(t,"fn"),r.then(function(e){t(e.data,e.status,e.headers,n)}),r},r.error=function(t){return Be(t,"fn"),r.then(null,function(e){t(e.data,e.status,e.headers,n)}),r}):(r.success=vn("success"),r.error=vn("error")),r;function a(e){var t=ie({},e);return e.data?t.data=En(e.data,e.headers,e.status,n.transformResponse):t.data=e.data,Sn(e.status)?t:m.reject(t)}}return re(t,function(e){l.unshift(ue(e)?s.get(e):s.invoke(e))}),v.pendingRequests=[],function(e){re(arguments,function(n){v[n]=function(e,t){return v(ie({},t||{},{method:n,url:e}))}})}("get","delete","head","jsonp"),function(e){re(arguments,function(r){v[r]=function(e,t,n){return v(ie({},n||{},{method:r,url:e,data:t}))}})}("post","put","patch"),v.defaults=y,v}]}function kn(){return new l.XMLHttpRequest}function Nn(){this.$get=["$browser","$window","$document",function(e,t,n){return function(m,g,v,y,b){return function(e,r,t,i,n,o,a,s){if(m.$$incOutstandingRequestCount(),r=r||m.url(),"jsonp"==D(e)){var l="_"+(y.counter++).toString(36);y[l]=function(e){y[l].data=e,y[l].called=!0};var u=function(e,r,i){var o=b.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){Ge(o,"load",a),Ge(o,"error",a),b.body.removeChild(o),o=null;var t=-1,n="unknown";e&&("load"!==e.type||y[r].called||(e={type:"error"}),n=e.type,t="error"===e.type?404:200),i&&i(t,n)},qe(o,"load",a),qe(o,"error",a),b.body.appendChild(o),a}(r.replace("JSON_CALLBACK","angular.callbacks."+l),l,function(e,t){p(i,e,y[l].data,"",t),y[l]=ae})}else{var c=g();c.open(e,r,!0),re(n,function(e,t){E(e)&&c.setRequestHeader(t,e)}),c.onload=function(){var e=c.statusText||"",t="response"in c?c.response:c.responseText,n=1223===c.status?204:c.status;0===n&&(n=t?200:"file"==Fr(r).protocol?404:0),p(i,n,t,c.getAllResponseHeaders(),e)};var d=function(){p(i,-1,null,null,"")};if(c.onerror=d,c.onabort=d,a&&(c.withCredentials=!0),s)try{c.responseType=s}catch(e){if("json"!==s)throw e}c.send(t)}if(0<o)var f=v(h,o);else B(o)&&o.then(h);function h(){u&&u(),c&&c.abort()}function p(e,t,n,r,i){f!==te&&v.cancel(f),u=c=null,e(t,n,r,i),m.$$completeOutstandingRequest(ae)}}}(e,kn,e.defer,t.angular.callbacks,n[0])}]}var Tn=S.$interpolateMinErr=x("$interpolate");function An(){var w="{{",C="}}";this.startSymbol=function(e){return e?(w=e,this):w},this.endSymbol=function(e){return e?(C=e,this):C},this.$get=["$parse","$exceptionHandler","$sce",function(g,v,y){var b=w.length,x=C.length,t=new RegExp(w.replace(/./g,e),"g"),n=new RegExp(C.replace(/./g,e),"g");function e(e){return"\\\\\\"+e}function $(e){return e.replace(t,w).replace(n,C)}function r(i,e,t,r){r=!!r;for(var n,o,a,s=0,l=[],u=[],c=i.length,d=[],f=[];s<c;){if(-1==(n=i.indexOf(w,s))||-1==(o=i.indexOf(C,n+b))){s!==c&&d.push($(i.substring(s)));break}s!==n&&d.push($(i.substring(s,n))),a=i.substring(n+b,o),l.push(a),u.push(g(a,m)),s=o+x,f.push(d.length),d.push("")}if(t&&1<d.length&&Tn.throwNoconcat(i),!e||l.length){var h=function(e){for(var t=0,n=l.length;t<n;t++){if(r&&se(e[t]))return;d[f[t]]=e[t]}return d.join("")},p=function(e){return t?y.getTrusted(t,e):y.valueOf(e)};return ie(function(e){var t=0,n=l.length,r=new Array(n);try{for(;t<n;t++)r[t]=u[t](e);return h(r)}catch(e){v(Tn.interr(i,e))}},{exp:i,expressions:l,$$watchDelegate:function(r,i){var o;return r.$watchGroup(u,function(e,t){var n=h(e);de(i)&&i.call(this,n,e!==t?o:n,r),o=n})}})}function m(e){try{return e=p(e),r&&!E(e)?e:function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=X(e)}return e}(e)}catch(e){v(Tn.interr(i,e))}}}return r.startSymbol=function(){return w},r.endSymbol=function(){return C},r}]}function Rn(){this.$get=["$rootScope","$window","$q","$$q",function(f,h,p,m){var g={};function e(e,t,n,r){var i=4<arguments.length,o=i?ve(arguments,4):[],a=h.setInterval,s=h.clearInterval,l=0,u=E(r)&&!r,c=(u?m:p).defer(),d=c.promise;return n=E(n)?n:0,d.then(null,null,i?function(){e.apply(null,o)}:e),d.$$intervalId=a(function(){c.notify(l++),0<n&&n<=l&&(c.resolve(l),s(d.$$intervalId),delete g[d.$$intervalId]),u||f.$apply()},t),g[d.$$intervalId]=c,d}return e.cancel=function(e){return!!(e&&e.$$intervalId in g)&&(g[e.$$intervalId].reject("canceled"),h.clearInterval(e.$$intervalId),delete g[e.$$intervalId],!0)},e}]}Tn.throwNoconcat=function(e){throw Tn("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",e)},Tn.interr=function(e,t){return Tn("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Bn=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Dn={http:80,https:443,ftp:21},Mn=x("$location");function On(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=xe(t[n]);return t.join("/")}function Pn(e,t){var n=Fr(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=y(n.port)||Dn[n.protocol]||null}function Ln(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Fr(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=Q(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function In(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function Fn(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function Hn(e){return e.replace(/(#.+)|#$/,"$1")}function Un(o,a,s){this.$$html5=!0,s=s||"",Pn(o,this),this.$$parse=function(e){var t=In(a,e);if(!ue(t))throw Mn("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,a);Ln(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=be(this.$$search),t=this.$$hash?"#"+xe(this.$$hash):"";this.$$url=On(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=a+this.$$url.substr(1)},this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):((n=In(o,e))!==te?i=(n=In(s,r=n))!==te?a+(In("/",n)||n):o+r:(n=In(a,e))!==te?i=a+n:a==e+"/"&&(i=a),i&&this.$$parse(i),!!i);var n,r,i}}function zn(r,i,o){Pn(r,this),this.$$parse=function(e){var t,n=In(r,e)||In(i,e);se(n)||"#"!==n.charAt(0)?this.$$html5?t=n:(t="",se(n)&&(r=e,this.replace())):se(t=In(o,n))&&(t=n),Ln(t,this),this.$$path=function(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;0===t.indexOf(n)&&(t=t.replace(n,""));if(i.exec(t))return e;return(r=i.exec(e))?r[1]:e}(this.$$path,t,r),this.$$compose()},this.$$compose=function(){var e=be(this.$$search),t=this.$$hash?"#"+xe(this.$$hash):"";this.$$url=On(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+(this.$$url?o+this.$$url:"")},this.$$parseLinkUrl=function(e,t){return Fn(r)==Fn(e)&&(this.$$parse(e),!0)}}function Vn(i,o,a){this.$$html5=!0,zn.apply(this,arguments),this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):(i==Fn(e)?n=e:(r=In(o,e))?n=i+a+r:o===e+"/"&&(n=o),n&&this.$$parse(n),!!n);var n,r},this.$$compose=function(){var e=be(this.$$search),t=this.$$hash?"#"+xe(this.$$hash):"";this.$$url=On(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+a+this.$$url}}var jn={$$html5:!1,$$replace:!1,absUrl:Wn("$$absUrl"),url:function(e){if(se(e))return this.$$url;var t=Bn.exec(e);return!t[1]&&""!==e||this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Wn("$$protocol"),host:Wn("$$host"),port:Wn("$$port"),path:qn("$$path",function(e){return"/"==(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(n,e){switch(arguments.length){case 0:return this.$$search;case 1:if(ue(n)||k(n))n=n.toString(),this.$$search=Q(n);else{if(!le(n))throw Mn("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");re(n=U(n,{}),function(e,t){null==e&&delete n[t]}),this.$$search=n}break;default:se(e)||null===e?delete this.$$search[n]:this.$$search[n]=e}return this.$$compose(),this},hash:qn("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};function Wn(e){return function(){return this[e]}}function qn(t,n){return function(e){return se(e)?this[t]:(this[t]=n(e),this.$$compose(),this)}}function Gn(){var m="",g={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return E(e)?(m=e,this):m},this.html5Mode=function(e){return R(e)?(g.enabled=e,this):le(e)?(R(e.enabled)&&(g.enabled=e.enabled),R(e.requireBase)&&(g.requireBase=e.requireBase),R(e.rewriteLinks)&&(g.rewriteLinks=e.rewriteLinks),this):g},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(a,s,t,i,o){var l,e,n,r=s.baseHref(),u=s.url();if(g.enabled){if(!r&&g.requireBase)throw Mn("nobase","$location in HTML5 mode requires a <base> tag to be present!");n=function(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}(u)+(r||"/"),e=t.history?Un:Vn}else n=Fn(u),e=zn;var c=function(e){return e.substr(0,Fn(e).lastIndexOf("/")+1)}(n);(l=new e(n,c,"#"+m)).$$parseLinkUrl(u,u),l.$$state=s.state();var d=/^\s*(javascript|mailto):/i;function f(e,t,n){var r=l.url(),i=l.$$state;try{s.url(e,t,n),l.$$state=s.state()}catch(e){throw l.url(r),l.$$state=i,e}}i.on("click",function(e){if(g.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var t=ne(e.target);"a"!==pe(t[0]);)if(t[0]===i[0]||!(t=t.parent())[0])return;var n=t.prop("href"),r=t.attr("href")||t.attr("xlink:href");le(n)&&"[object SVGAnimatedString]"===n.toString()&&(n=Fr(n.animVal).href),d.test(n)||!n||t.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(n,r)&&(e.preventDefault(),l.absUrl()!=s.url()&&(a.$apply(),o.angular["ff-684208-preventDefault"]=!0))}}),Hn(l.absUrl())!=Hn(u)&&s.url(l.absUrl(),!0);var h=!0;return s.onUrlChange(function(r,i){se(In(c,r))?o.location.href=r:(a.$evalAsync(function(){var e,t=l.absUrl(),n=l.$$state;l.$$parse(r),l.$$state=i,e=a.$broadcast("$locationChangeStart",r,t,i,n).defaultPrevented,l.absUrl()===r&&(e?(l.$$parse(t),f(t,!1,l.$$state=n)):(h=!1,p(t,n)))}),a.$$phase||a.$digest())}),a.$watch(function(){var n=Hn(s.url()),e=Hn(l.absUrl()),r=s.state(),i=l.$$replace,o=n!==e||l.$$html5&&t.history&&r!==l.$$state;(h||o)&&(h=!1,a.$evalAsync(function(){var e=l.absUrl(),t=a.$broadcast("$locationChangeStart",e,n,l.$$state,r).defaultPrevented;l.absUrl()===e&&(t?(l.$$parse(n),l.$$state=r):(o&&f(e,i,r===l.$$state?null:l.$$state),p(n,r)))})),l.$$replace=!1}),l;function p(e,t){a.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}}]}function Xn(){var n=!0,r=this;this.debugEnabled=function(e){return E(e)?(n=e,this):n},this.$get=["$window",function(i){return{log:t("log"),info:t("info"),warn:t("warn"),error:t("error"),debug:(e=t("debug"),function(){n&&e.apply(r,arguments)})};var e;function t(e){var n=i.console||{},r=n[e]||n.log||ae,t=!1;try{t=!!r.apply}catch(e){}return t?function(){var t=[];return re(arguments,function(e){t.push(function(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}(e))}),r.apply(n,t)}:function(e,t){r(e,null==t?"":t)}}}]}re([Vn,zn,Un],function(t){t.prototype=Object.create(jn),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Un||!this.$$html5)throw Mn("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=se(e)?null:e,this}});var Yn=x("$parse");function Kn(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Yn("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Jn(e,t){if(e){if(e.constructor===e)throw Yn("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Yn("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Yn("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Yn("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}var Zn=Function.prototype.call,Qn=Function.prototype.apply,er=Function.prototype.bind;function tr(e,t){if(e){if(e.constructor===e)throw Yn("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Zn||e===Qn||e===er)throw Yn("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}var nr=Pe();re("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){nr[e]=!0});var rr={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},ir=function(e){this.options=e};ir.prototype={constructor:ir,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(t))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=nr[t],o=nr[n],a=nr[r];if(i||o||a){var s=a?r:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=E(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Yn("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=D(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){for(var e=this.index;this.index<this.text.length;){var t=this.text.charAt(this.index);if(!this.isIdent(t)&&!this.isNumber(t))break;this.index++}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{n+=rr[o]||o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var or=function(e,t){this.lexer=e,this.options=t};function ar(e,t){return void 0!==e?e:t}function sr(e,t){return void 0===e?t:void 0===t?e:e+t}function lr(e,t){return!e(t).$stateful}function ur(e,t){var n,r;switch(e.type){case or.Program:n=!0,re(e.body,function(e){ur(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case or.Literal:e.constant=!0,e.toWatch=[];break;case or.UnaryExpression:ur(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case or.BinaryExpression:ur(e.left,t),ur(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case or.LogicalExpression:ur(e.left,t),ur(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case or.ConditionalExpression:ur(e.test,t),ur(e.alternate,t),ur(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case or.Identifier:e.constant=!1,e.toWatch=[e];break;case or.MemberExpression:ur(e.object,t),e.computed&&ur(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case or.CallExpression:n=!!e.filter&&lr(t,e.callee.name),r=[],re(e.arguments,function(e){ur(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&lr(t,e.callee.name)?r:[e];break;case or.AssignmentExpression:ur(e.left,t),ur(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case or.ArrayExpression:n=!0,r=[],re(e.elements,function(e){ur(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case or.ObjectExpression:n=!0,r=[],re(e.properties,function(e){ur(e.value,t),n=n&&e.value.constant,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case or.ThisExpression:e.constant=!1,e.toWatch=[]}}function cr(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:te}}function dr(e){return e.type===or.Identifier||e.type===or.MemberExpression}function fr(e){if(1===e.body.length&&dr(e.body[0].expression))return{type:or.AssignmentExpression,left:e.body[0].expression,right:{type:or.NGValueParameter},operator:"="}}function hr(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===or.Literal||e.body[0].expression.type===or.ArrayExpression||e.body[0].expression.type===or.ObjectExpression)}function pr(e){return e.constant}function mr(e,t){this.astBuilder=e,this.$filter=t}function gr(e,t){this.astBuilder=e,this.$filter=t}or.Program="Program",or.ExpressionStatement="ExpressionStatement",or.AssignmentExpression="AssignmentExpression",or.ConditionalExpression="ConditionalExpression",or.LogicalExpression="LogicalExpression",or.BinaryExpression="BinaryExpression",or.UnaryExpression="UnaryExpression",or.CallExpression="CallExpression",or.MemberExpression="MemberExpression",or.Identifier="Identifier",or.Literal="Literal",or.ArrayExpression="ArrayExpression",or.Property="Property",or.ObjectExpression="ObjectExpression",or.ThisExpression="ThisExpression",or.NGValueParameter="NGValueParameter",or.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(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:or.Program,body:e}},expressionStatement:function(){return{type:or.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:or.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:or.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:or.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:or.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:or.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:or.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:or.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:or.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:or.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e,t;for(this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.constants.hasOwnProperty(this.peek().text)?e=U(this.constants[this.consume().text]):this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)"("===t.text?(e={type:or.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:or.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:or.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:or.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)for(;e.push(this.expression()),this.expect(","););return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:or.Identifier,name:e.text}},constant:function(){return{type:or.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:or.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:or.Property,kind:"init"},this.peek().constant?e.key=this.constant():this.peek().identifier?e.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),e.value=this.expression(),t.push(e)}while(this.expect(","));return this.consume("}"),{type:or.ObjectExpression,properties:t}},throwError:function(e,t){throw Yn("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw Yn("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw Yn("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},constants:{true:{type:or.Literal,value:!0},false:{type:or.Literal,value:!1},null:{type:or.Literal,value:null},undefined:{type:or.Literal,value:te},this:{type:or.ThisExpression}}},mr.prototype={compile:function(e,t){var i=this,n=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ur(n,i.$filter);var r,o="";if(this.stage="assign",r=fr(n)){this.state.computing="assign";var a=this.nextId();this.recurse(r,a),o="fn.assign="+this.generateFunction("assign","s,v,l")}var s=cr(n.body);i.stage="inputs",re(s,function(e,t){var n="fn"+t;i.state[n]={vars:[],body:[],own:{}},i.state.computing=n;var r=i.nextId();i.recurse(e,r),i.return_(r),i.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(n);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+o+this.watchFns()+"return fn;",u=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","ifDefined","plus","text",l)(this.$filter,Kn,Jn,tr,ar,sr,e);return this.state=this.stage=te,u.literal=hr(n),u.constant=pr(n),u},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,n=this;return re(e,function(e){t.push("var "+e+"="+n.generateFunction(e,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var n=[],r=this;return re(this.state.filters,function(e,t){n.push(e+"=$filter("+r.escape(t)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(n,e,t,r,i,o){var a,s,l,u,c=this;if(r=r||ae,!o&&E(n.watchId))return e=e||this.nextId(),void this.if_("i",this.lazyAssign(e,this.computedMember("i",n.watchId)),this.lazyRecurse(n,e,t,r,i,!0));switch(n.type){case or.Program:re(n.body,function(e,t){c.recurse(e.expression,te,te,function(e){s=e}),t!==n.body.length-1?c.current().body.push(s,";"):c.return_(s)});break;case or.Literal:u=this.escape(n.value),this.assign(e,u),r(u);break;case or.UnaryExpression:this.recurse(n.argument,te,te,function(e){s=e}),u=n.operator+"("+this.ifDefined(s,0)+")",this.assign(e,u),r(u);break;case or.BinaryExpression:this.recurse(n.left,te,te,function(e){a=e}),this.recurse(n.right,te,te,function(e){s=e}),u="+"===n.operator?this.plus(a,s):"-"===n.operator?this.ifDefined(a,0)+n.operator+this.ifDefined(s,0):"("+a+")"+n.operator+"("+s+")",this.assign(e,u),r(u);break;case or.LogicalExpression:e=e||this.nextId(),c.recurse(n.left,e),c.if_("&&"===n.operator?e:c.not(e),c.lazyRecurse(n.right,e)),r(e);break;case or.ConditionalExpression:e=e||this.nextId(),c.recurse(n.test,e),c.if_(e,c.lazyRecurse(n.alternate,e),c.lazyRecurse(n.consequent,e)),r(e);break;case or.Identifier:e=e||this.nextId(),t&&(t.context="inputs"===c.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),t.computed=!1,t.name=n.name),Kn(n.name),c.if_("inputs"===c.stage||c.not(c.getHasOwnProperty("l",n.name)),function(){c.if_("inputs"===c.stage||"s",function(){i&&1!==i&&c.if_(c.not(c.nonComputedMember("s",n.name)),c.lazyAssign(c.nonComputedMember("s",n.name),"{}")),c.assign(e,c.nonComputedMember("s",n.name))})},e&&c.lazyAssign(e,c.nonComputedMember("l",n.name))),(c.state.expensiveChecks||yr(n.name))&&c.addEnsureSafeObject(e),r(e);break;case or.MemberExpression:a=t&&(t.context=this.nextId())||this.nextId(),e=e||this.nextId(),c.recurse(n.object,a,te,function(){c.if_(c.notNull(a),function(){n.computed?(s=c.nextId(),c.recurse(n.property,s),c.addEnsureSafeMemberName(s),i&&1!==i&&c.if_(c.not(c.computedMember(a,s)),c.lazyAssign(c.computedMember(a,s),"{}")),u=c.ensureSafeObject(c.computedMember(a,s)),c.assign(e,u),t&&(t.computed=!0,t.name=s)):(Kn(n.property.name),i&&1!==i&&c.if_(c.not(c.nonComputedMember(a,n.property.name)),c.lazyAssign(c.nonComputedMember(a,n.property.name),"{}")),u=c.nonComputedMember(a,n.property.name),(c.state.expensiveChecks||yr(n.property.name))&&(u=c.ensureSafeObject(u)),c.assign(e,u),t&&(t.computed=!1,t.name=n.property.name))},function(){c.assign(e,"undefined")}),r(e)},!!i);break;case or.CallExpression:e=e||this.nextId(),n.filter?(s=c.filter(n.callee.name),l=[],re(n.arguments,function(e){var t=c.nextId();c.recurse(e,t),l.push(t)}),u=s+"("+l.join(",")+")",c.assign(e,u),r(e)):(s=c.nextId(),a={},l=[],c.recurse(n.callee,s,a,function(){c.if_(c.notNull(s),function(){c.addEnsureSafeFunction(s),re(n.arguments,function(e){c.recurse(e,c.nextId(),te,function(e){l.push(c.ensureSafeObject(e))})}),u=a.name?(c.state.expensiveChecks||c.addEnsureSafeObject(a.context),c.member(a.context,a.name,a.computed)+"("+l.join(",")+")"):s+"("+l.join(",")+")",u=c.ensureSafeObject(u),c.assign(e,u)},function(){c.assign(e,"undefined")}),r(e)}));break;case or.AssignmentExpression:if(s=this.nextId(),a={},!dr(n.left))throw Yn("lval","Trying to assing a value to a non l-value");this.recurse(n.left,te,a,function(){c.if_(c.notNull(a.context),function(){c.recurse(n.right,s),c.addEnsureSafeObject(c.member(a.context,a.name,a.computed)),u=c.member(a.context,a.name,a.computed)+n.operator+s,c.assign(e,u),r(e||u)})},1);break;case or.ArrayExpression:l=[],re(n.elements,function(e){c.recurse(e,c.nextId(),te,function(e){l.push(e)})}),u="["+l.join(",")+"]",this.assign(e,u),r(u);break;case or.ObjectExpression:l=[],re(n.properties,function(t){c.recurse(t.value,c.nextId(),te,function(e){l.push(c.escape(t.key.type===or.Identifier?t.key.name:""+t.key.value)+":"+e)})}),u="{"+l.join(",")+"}",this.assign(e,u),r(u);break;case or.ThisExpression:this.assign(e,"s"),r("s");break;case or.NGValueParameter:this.assign(e,"v"),r("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(!0===e)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return e+"."+t},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(ue(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(k(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw Yn("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},gr.prototype={compile:function(e,t){var n,r,i=this,o=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ur(o,i.$filter),(n=fr(o))&&(r=this.recurse(n));var a,s=cr(o.body);s&&(a=[],re(s,function(e,t){var n=i.recurse(e);e.input=n,a.push(n),e.watchId=t}));var l=[];re(o.body,function(e){l.push(i.recurse(e.expression))});var u=0===o.body.length?function(){}:1===o.body.length?l[0]:function(t,n){var r;return re(l,function(e){r=e(t,n)}),r};return r&&(u.assign=function(e,t,n){return r(e,n,t)}),a&&(u.inputs=a),u.literal=hr(o),u.constant=pr(o),u},recurse:function(e,l,t){var a,u,c,d=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case or.Literal:return this.value(e.value,l);case or.UnaryExpression:return u=this.recurse(e.argument),this["unary"+e.operator](u,l);case or.BinaryExpression:case or.LogicalExpression:return a=this.recurse(e.left),u=this.recurse(e.right),this["binary"+e.operator](a,u,l);case or.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),l);case or.Identifier:return Kn(e.name,d.expression),d.identifier(e.name,d.expensiveChecks||yr(e.name),l,t,d.expression);case or.MemberExpression:return a=this.recurse(e.object,!1,!!t),e.computed||(Kn(e.property.name,d.expression),u=e.property.name),e.computed&&(u=this.recurse(e.property)),e.computed?this.computedMember(a,u,l,t,d.expression):this.nonComputedMember(a,u,d.expensiveChecks,l,t,d.expression);case or.CallExpression:return c=[],re(e.arguments,function(e){c.push(d.recurse(e))}),e.filter&&(u=this.$filter(e.callee.name)),e.filter||(u=this.recurse(e.callee,!0)),e.filter?function(e,t,n,r){for(var i=[],o=0;o<c.length;++o)i.push(c[o](e,t,n,r));var a=u.apply(te,i,r);return l?{context:te,name:te,value:a}:a}:function(e,t,n,r){var i,o=u(e,t,n,r);if(null!=o.value){Jn(o.context,d.expression),tr(o.value,d.expression);for(var a=[],s=0;s<c.length;++s)a.push(Jn(c[s](e,t,n,r),d.expression));i=Jn(o.value.apply(o.context,a),d.expression)}return l?{value:i}:i};case or.AssignmentExpression:return a=this.recurse(e.left,!0,1),u=this.recurse(e.right),function(e,t,n,r){var i=a(e,t,n,r),o=u(e,t,n,r);return Jn(i.value,d.expression),i.context[i.name]=o,l?{value:o}:o};case or.ArrayExpression:return c=[],re(e.elements,function(e){c.push(d.recurse(e))}),function(e,t,n,r){for(var i=[],o=0;o<c.length;++o)i.push(c[o](e,t,n,r));return l?{value:i}:i};case or.ObjectExpression:return c=[],re(e.properties,function(e){c.push({key:e.key.type===or.Identifier?e.key.name:""+e.key.value,value:d.recurse(e.value)})}),function(e,t,n,r){for(var i={},o=0;o<c.length;++o)i[c[o].key]=c[o].value(e,t,n,r);return l?{value:i}:i};case or.ThisExpression:return function(e){return l?{value:e}:e};case or.NGValueParameter:return function(e,t,n,r){return l?{value:n}:n}}},"unary+":function(o,a){return function(e,t,n,r){var i=o(e,t,n,r);return i=E(i)?+i:0,a?{value:i}:i}},"unary-":function(o,a){return function(e,t,n,r){var i=o(e,t,n,r);return i=E(i)?-i:0,a?{value:i}:i}},"unary!":function(o,a){return function(e,t,n,r){var i=!o(e,t,n,r);return a?{value:i}:i}},"binary+":function(o,a,s){return function(e,t,n,r){var i=sr(o(e,t,n,r),a(e,t,n,r));return s?{value:i}:i}},"binary-":function(s,l,u){return function(e,t,n,r){var i=s(e,t,n,r),o=l(e,t,n,r),a=(E(i)?i:0)-(E(o)?o:0);return u?{value:a}:a}},"binary*":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)*a(e,t,n,r);return s?{value:i}:i}},"binary/":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)/a(e,t,n,r);return s?{value:i}:i}},"binary%":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)%a(e,t,n,r);return s?{value:i}:i}},"binary===":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)===a(e,t,n,r);return s?{value:i}:i}},"binary!==":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)!==a(e,t,n,r);return s?{value:i}:i}},"binary==":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)==a(e,t,n,r);return s?{value:i}:i}},"binary!=":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)!=a(e,t,n,r);return s?{value:i}:i}},"binary<":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)<a(e,t,n,r);return s?{value:i}:i}},"binary>":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)>a(e,t,n,r);return s?{value:i}:i}},"binary<=":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)<=a(e,t,n,r);return s?{value:i}:i}},"binary>=":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)>=a(e,t,n,r);return s?{value:i}:i}},"binary&&":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)&&a(e,t,n,r);return s?{value:i}:i}},"binary||":function(o,a,s){return function(e,t,n,r){var i=o(e,t,n,r)||a(e,t,n,r);return s?{value:i}:i}},"ternary?:":function(o,a,s,l){return function(e,t,n,r){var i=o(e,t,n,r)?a(e,t,n,r):s(e,t,n,r);return l?{value:i}:i}},value:function(e,t){return function(){return t?{context:te,name:te,value:e}:e}},identifier:function(a,s,l,u,c){return function(e,t,n,r){var i=t&&a in t?t:e;u&&1!==u&&i&&!i[a]&&(i[a]={});var o=i?i[a]:te;return s&&Jn(o,c),l?{context:i,name:a,value:o}:o}},computedMember:function(s,l,u,c,d){return function(e,t,n,r){var i,o,a=s(e,t,n,r);return null!=a&&(Kn(i=l(e,t,n,r),d),c&&1!==c&&a&&!a[i]&&(a[i]={}),Jn(o=a[i],d)),u?{context:a,name:i,value:o}:o}},nonComputedMember:function(a,s,l,u,c,d){return function(e,t,n,r){var i=a(e,t,n,r);c&&1!==c&&i&&!i[s]&&(i[s]={});var o=null!=i?i[s]:te;return(l||yr(s))&&Jn(o,d),u?{context:i,name:s,value:o}:o}},inputs:function(i,o){return function(e,t,n,r){return r?r[o]:i(e,t,n)}}};var vr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new or(this.lexer),this.astCompiler=n.csp?new gr(this.ast,t):new mr(this.ast,t)};vr.prototype={constructor:vr,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};Pe(),Pe();function yr(e){return"constructor"==e}var br=Object.prototype.valueOf;function xr(e){return de(e.valueOf)?e.valueOf():br.call(e)}function $r(){var y=Pe(),b=Pe();this.$get=["$filter",function(u){var e=V().noUnsafeEval,c={csp:e,expensiveChecks:!1},d={csp:e,expensiveChecks:!0};return function(e,t,n){var r,i,o;switch(typeof e){case"string":e=e.trim();var a=n?b:y;if(!(r=a[o=e])){":"===e.charAt(0)&&":"===e.charAt(1)&&(i=!0,e=e.substring(2));var s=n?d:c,l=new ir(s);(r=new vr(l,u,s).parse(e)).constant?r.$$watchDelegate=g:i?r.$$watchDelegate=r.literal?m:p:r.inputs&&(r.$$watchDelegate=h),a[o]=r}return v(r,t);case"function":return v(e,t);default:return ae}};function f(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=xr(e)))&&(e===t||e!=e&&t!=t)}function h(e,t,n,o,r){var a,s=o.inputs;if(1===s.length){var i=f;return s=s[0],e.$watch(function(e){var t=s(e);return f(t,i)||(a=o(e,te,te,[t]),i=t&&xr(t)),a},t,n,r)}for(var l=[],u=[],c=0,d=s.length;c<d;c++)l[c]=f,u[c]=null;return e.$watch(function(e){for(var t=!1,n=0,r=s.length;n<r;n++){var i=s[n](e);(t=t||!f(i,l[n]))&&(u[n]=i,l[n]=i&&xr(i))}return t&&(a=o(e,te,te,u)),a},t,n,r)}function p(e,r,t,n){var i,o;return i=e.$watch(function(e){return n(e)},function(e,t,n){o=e,de(r)&&r.apply(this,arguments),E(e)&&n.$$postDigest(function(){E(o)&&i()})},t)}function m(e,r,t,n){var i,o;return i=e.$watch(function(e){return n(e)},function(e,t,n){o=e,de(r)&&r.call(this,e,t,n),a(e)&&n.$$postDigest(function(){a(o)&&i()})},t);function a(e){var t=!0;return re(e,function(e){E(e)||(t=!1)}),t}}function g(e,r,t,n){var i;return i=e.$watch(function(e){return n(e)},function(e,t,n){de(r)&&r.apply(this,arguments),i()},t)}function v(a,s){if(!s)return a;var e=a.$$watchDelegate,t=e!==m&&e!==p?function(e,t,n,r){var i=a(e,t,n,r);return s(i,e,t)}:function(e,t,n,r){var i=a(e,t,n,r),o=s(i,e,t);return E(i)?o:i};return a.$$watchDelegate&&a.$$watchDelegate!==h?t.$$watchDelegate=a.$$watchDelegate:s.$stateful||(t.$$watchDelegate=h,t.inputs=a.inputs?a.inputs:[a]),t}}]}function wr(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Er(function(e){t.$evalAsync(e)},e)}]}function Cr(){this.$get=["$browser","$exceptionHandler",function(t,e){return Er(function(e){t.defer(e)},e)}]}function Er(t,a){var n=x("$q",TypeError);function e(){this.$$state={status:0}}function r(t,n){return function(e){n.call(t,e)}}function i(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){!function(e){var t,n,r;r=e.pending,e.processScheduled=!1,e.pending=te;for(var i=0,o=r.length;i<o;++i){n=r[i][0],t=r[i][e.status];try{de(t)?n.resolve(t(e.value)):1===e.status?n.resolve(e.value):n.reject(e.value)}catch(e){n.reject(e),a(e)}}}(e)}))}function o(){this.promise=new e,this.resolve=r(this,this.resolve),this.reject=r(this,this.reject),this.notify=r(this,this.notify)}ie(e.prototype,{then:function(e,t,n){if(se(e)&&se(t)&&se(n))return this;var r=new o;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),0<this.$$state.status&&i(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(t,e){return this.then(function(e){return u(e,!0,t)},function(e){return u(e,!1,t)},e)}}),ie(o.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(n("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var t,n;n=function(n,e,t){var r=!1;function i(t){return function(e){r||(r=!0,t.call(n,e))}}return[i(e),i(t)]}(this,this.$$resolve,this.$$reject);try{(le(e)||de(e))&&(t=e&&e.then),de(t)?(this.promise.$$state.status=-1,t.call(e,n[0],n[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,i(this.promise.$$state))}catch(e){n[1](e),a(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,i(this.promise.$$state)},notify:function(i){var o=this.promise.$$state.pending;this.promise.$$state.status<=0&&o&&o.length&&t(function(){for(var e,t,n=0,r=o.length;n<r;n++){t=o[n][0],e=o[n][3];try{t.notify(de(e)?e(i):i)}catch(e){a(e)}}})}});function s(e,t){var n=new o;return t?n.resolve(e):n.reject(e),n.promise}function l(e,t,n,r){var i=new o;return i.resolve(e),i.promise.then(t,n,r)}var u=function(e,t,n){var r=null;try{de(n)&&(r=n())}catch(e){return s(e,!1)}return B(r)?r.then(function(){return s(e,t)},function(e){return s(e,!1)}):s(e,t)},c=l;function d(e){if(!de(e))throw n("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof d))return new d(e);var t=new o;return e(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}return d.defer=function(){return new o},d.reject=function(e){var t=new o;return t.reject(e),t.promise},d.when=l,d.resolve=c,d.all=function(e){var n=new o,r=0,i=ce(e)?[]:{};return re(e,function(e,t){r++,l(e).then(function(e){i.hasOwnProperty(t)||(i[t]=e,--r||n.resolve(i))},function(e){i.hasOwnProperty(t)||n.reject(e)})}),0===r&&n.resolve(i),n.promise},d}function Sr(){this.$get=["$window","$timeout",function(e,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,t=!!r,o=t?function(e){var t=r(e);return function(){i(t)}}:function(e){var t=n(e,16.66,!1);return function(){n.cancel(t)}};return o.supported=t,o}]}function _r(){var w=10,C=x("$rootScope"),E=null,S=null;this.digestTtl=function(e){return arguments.length&&(w=e),w},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(e,f,p,h){function r(e){e.currentScope.$$destroyed=!0}function i(){this.$id=_(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,(this.$root=this).$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}i.prototype={constructor:i,$new:function(e,t){var n;return t=t||this,e?(n=new i).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=_(),this.$$ChildScope=null}return t.prototype=e,t}(this)),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,!e&&t==this||n.$on("$destroy",r),n},$watch:function(e,t,n,r){var i=p(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,a=o.$$watchers,s={fn:t,last:x,get:i,exp:r||e,eq:!!n};return E=null,de(t)||(s.fn=ae),(a=a||(o.$$watchers=[])).unshift(s),l(this,1),function(){0<=me(a,s)&&l(o,-1),E=null}},$watchGroup:function(e,r){var i=new Array(e.length),o=new Array(e.length),a=[],s=this,l=!1,t=!0;if(!e.length){var n=!0;return s.$evalAsync(function(){n&&r(o,o,s)}),function(){n=!1}}if(1===e.length)return this.$watch(e[0],function(e,t,n){o[0]=e,i[0]=t,r(o,e===t?o:i,n)});function u(){l=!1,t?(t=!1,r(o,o,s)):r(o,i,s)}return re(e,function(e,n){var t=s.$watch(e,function(e,t){o[n]=e,i[n]=t,l||(l=!0,s.$evalAsync(u))});a.push(t)}),function(){for(;a.length;)a.shift()()}},$watchCollection:function(e,n){h.$stateful=!0;var a,s,r,i=this,o=1<n.length,l=0,t=p(e,h),u=[],c={},d=!0,f=0;function h(e){var t,n,r,i;if(!se(a=e)){if(le(a))if(P(a)){s!==u&&(f=(s=u).length=0,l++),t=a.length,f!==t&&(l++,s.length=f=t);for(var o=0;o<t;o++)i=s[o],r=a[o],i!=i&&r!=r||i===r||(l++,s[o]=r)}else{for(n in s!==c&&(s=c={},f=0,l++),t=0,a)a.hasOwnProperty(n)&&(t++,r=a[n],i=s[n],n in s?i!=i&&r!=r||i===r||(l++,s[n]=r):(f++,s[n]=r,l++));if(t<f)for(n in l++,s)a.hasOwnProperty(n)||(f--,delete s[n])}else s!==a&&(s=a,l++);return l}}return this.$watch(t,function(){if(d?(d=!1,n(a,a,i)):n(a,r,i),o)if(le(a))if(P(a)){r=new Array(a.length);for(var e=0;e<a.length;e++)r[e]=a[e]}else for(var t in r={},a)M.call(a,t)&&(r[t]=a[t]);else r=a})},$digest:function(){var e,t,n,r,i,o,a,s,l,u,c=w,d=[];y("$digest"),h.$$checkUrlChange(),this===m&&null!==S&&(h.defer.cancel(S),$()),E=null;do{for(o=!1,s=this;g.length;){try{(u=g.shift()).scope.$eval(u.expression,u.locals)}catch(e){f(e)}E=null}e:do{if(r=s.$$watchers)for(i=r.length;i--;)try{if(e=r[i])if((t=e.get(s))===(n=e.last)||(e.eq?ge(t,n):"number"==typeof t&&"number"==typeof n&&isNaN(t)&&isNaN(n))){if(e===E){o=!1;break e}}else o=!0,(E=e).last=e.eq?U(t,null):t,e.fn(t,n===x?t:n,s),c<5&&(d[l=4-c]||(d[l]=[]),d[l].push({msg:de(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:t,oldVal:n}))}catch(e){f(e)}if(!(a=s.$$watchersCount&&s.$$childHead||s!==this&&s.$$nextSibling))for(;s!==this&&!(a=s.$$nextSibling);)s=s.$parent}while(s=a);if((o||g.length)&&!c--)throw b(),C("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",w,d)}while(o||g.length);for(b();v.length;)try{v.shift()()}catch(e){f(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;for(var t in this.$broadcast("$destroy"),this.$$destroyed=!0,this===m&&h.$$applicationDestroyed(),l(this,-this.$$watchersCount),this.$$listenerCount)o(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=ae,this.$on=this.$watch=this.$watchGroup=function(){return ae},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(e,t){return p(e)(this,t)},$evalAsync:function(e,t){m.$$phase||g.length||h.defer(function(){g.length&&m.$digest()}),g.push({scope:this,expression:e,locals:t})},$$postDigest:function(e){v.push(e)},$apply:function(e){try{y("$apply");try{return this.$eval(e)}finally{b()}}catch(e){f(e)}finally{try{m.$digest()}catch(e){throw f(e),e}}},$applyAsync:function(e){var t=this;e&&n.push(function(){t.$eval(e)}),null===S&&(S=h.defer(function(){m.$apply($)}))},$on:function(t,n){var r=this.$$listeners[t];r||(this.$$listeners[t]=r=[]),r.push(n);for(var e=this;e.$$listenerCount[t]||(e.$$listenerCount[t]=0),e.$$listenerCount[t]++,e=e.$parent;);var i=this;return function(){var e=r.indexOf(n);-1!==e&&(r[e]=null,o(i,1,t))}},$emit:function(e,t){var n,r,i,o=[],a=this,s=!1,l={name:e,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},u=W([l],arguments,1);do{for(n=a.$$listeners[e]||o,l.currentScope=a,r=0,i=n.length;r<i;r++)if(n[r])try{n[r].apply(null,u)}catch(e){f(e)}else n.splice(r,1),r--,i--;if(s)return l.currentScope=null,l;a=a.$parent}while(a);return l.currentScope=null,l},$broadcast:function(e,t){var n=this,r=n,i=n,o={name:e,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[e])return o;for(var a,s,l,u=W([o],arguments,1);r=i;){for(s=0,l=(a=(o.currentScope=r).$$listeners[e]||[]).length;s<l;s++)if(a[s])try{a[s].apply(null,u)}catch(e){f(e)}else a.splice(s,1),s--,l--;if(!(i=r.$$listenerCount[e]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var m=new i,g=m.$$asyncQueue=[],v=m.$$postDigestQueue=[],n=m.$$applyAsyncQueue=[];return m;function y(e){if(m.$$phase)throw C("inprog","{0} already in progress",m.$$phase);m.$$phase=e}function b(){m.$$phase=null}function l(e,t){for(;e.$$watchersCount+=t,e=e.$parent;);}function o(e,t,n){for(;e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n],e=e.$parent;);}function x(){}function $(){for(;n.length;)try{n.shift()()}catch(e){f(e)}S=null}}]}function kr(){var i=/^\s*(https?|ftp|mailto|tel|file):/,o=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return E(e)?(i=e,this):i},this.imgSrcSanitizationWhitelist=function(e){return E(e)?(o=e,this):o},this.$get=function(){return function(e,t){var n,r=t?o:i;return""===(n=Fr(e).href)||n.match(r)?e:"unsafe:"+n}}}var Nr=x("$sce"),Tr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function Ar(e){var t=[];return E(e)&&re(e,function(e){t.push(function(e){if("self"===e)return e;if(ue(e)){if(-1<e.indexOf("***"))throw Nr("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=F(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(T(e))return new RegExp("^"+e.source+"$");throw Nr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}(e))}),t}function Rr(){this.SCE_CONTEXTS=Tr;var a=["self"],s=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(a=Ar(e)),a},this.resourceUrlBlacklist=function(e){return arguments.length&&(s=Ar(e)),s},this.$get=["$injector",function(e){var r=function(e){throw Nr("unsafe","Attempting to use an unsafe value in a safe context.")};function o(e,t){return"self"===e?Hr(t):!!e.exec(t.href)}function t(e){function t(e){this.$$unwrapTrustedValue=function(){return e}}return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}e.has("$sanitize")&&(r=e.get("$sanitize"));var n=t(),i={};return i[Tr.HTML]=t(n),i[Tr.CSS]=t(n),i[Tr.URL]=t(n),i[Tr.JS]=t(n),i[Tr.RESOURCE_URL]=t(i[Tr.URL]),{trustAs:function(e,t){var n=i.hasOwnProperty(e)?i[e]:null;if(!n)throw Nr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===te||""===t)return t;if("string"!=typeof t)throw Nr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)},getTrusted:function(e,t){if(null===t||t===te||""===t)return t;var n=i.hasOwnProperty(e)?i[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===Tr.RESOURCE_URL){if(function(e){var t,n,r=Fr(e.toString()),i=!1;for(t=0,n=a.length;t<n;t++)if(o(a[t],r)){i=!0;break}if(i)for(t=0,n=s.length;t<n;t++)if(o(s[t],r)){i=!1;break}return i}(t))return t;throw Nr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===Tr.HTML)return r(t);throw Nr("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(e){return e instanceof n?e.$$unwrapTrustedValue():e}}}]}function Br(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(r,e){if(t&&O<8)throw Nr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var i=z(Tr);i.isEnabled=function(){return t},i.trustAs=e.trustAs,i.getTrusted=e.getTrusted,i.valueOf=e.valueOf,t||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=b),i.parseAs=function(t,e){var n=r(e);return n.literal&&n.constant?n:r(e,function(e){return i.getTrusted(t,e)})};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return re(Tr,function(t,e){var n=D(e);i[Ze("parse_as_"+n)]=function(e){return o(t,e)},i[Ze("get_trusted_"+n)]=function(e){return a(t,e)},i[Ze("trust_as_"+n)]=function(e){return s(t,e)}}),i}]}function Dr(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=y((/android (\d+)/.exec(D((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=s.body&&s.body.style,c=!1,d=!1;if(u){for(var f in u)if(r=l.exec(f)){n=(n=r[0]).substr(0,1).toUpperCase()+n.substr(1);break}n=n||"WebkitOpacity"in u&&"webkit",c=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||c&&d||(c=ue(u.webkitTransition),d=ue(u.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||o<4||a),hasEvent:function(e){if("input"===e&&O<=11)return!1;if(se(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:V(),vendorPrefix:n,transitions:c,animations:d,android:o}}]}Zt=x("$compile");function Mr(){this.$get=["$templateCache","$http","$q","$sce",function(i,o,a,s){function l(t,n){l.totalPendingRequests++,ue(t)&&i.get(t)||(t=s.getTrustedResourceUrl(t));var e=o.defaults&&o.defaults.transformResponse;ce(e)?e=e.filter(function(e){return e!==$n}):e===$n&&(e=null);var r={cache:i,transformResponse:e};return o.get(t,r).finally(function(){l.totalPendingRequests--}).then(function(e){return i.put(t,e.data),e.data},function(e){if(n)return a.reject(e);throw Zt("tpload","Failed to load template: {0} (HTTP status: {1} {2})",t,e.status,e.statusText)})}return l.totalPendingRequests=0,l}]}function Or(){this.$get=["$rootScope","$browser","$location",function(t,n,r){var e={findBindings:function(e,n,r){var t=e.getElementsByClassName("ng-binding"),i=[];return re(t,function(t){var e=S.element(t).data("$binding");e&&re(e,function(e){r?new RegExp("(^|\\s)"+F(n)+"(\\s|\\||$)").test(e)&&i.push(t):-1!=e.indexOf(n)&&i.push(t)})}),i},findModels:function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o="["+r[i]+"model"+(n?"=":"*=")+'"'+t+'"]',a=e.querySelectorAll(o);if(a.length)return a}},getLocation:function(){return r.url()},setLocation:function(e){e!==r.url()&&(r.url(e),t.$digest())},whenStable:function(e){n.notifyWhenNoOutstandingRequests(e)}};return e}]}function Pr(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(l,u,c,d,f){var h={};function e(e,t,n){de(e)||(n=t,t=e,e=ae);var r,i=ve(arguments,3),o=E(n)&&!n,a=(o?d:c).defer(),s=a.promise;return r=u.defer(function(){try{a.resolve(e.apply(null,i))}catch(e){a.reject(e),f(e)}finally{delete h[s.$$timeoutId]}o||l.$apply()},t),s.$$timeoutId=r,h[r]=a,s}return e.cancel=function(e){return!!(e&&e.$$timeoutId in h)&&(h[e.$$timeoutId].reject("canceled"),delete h[e.$$timeoutId],u.defer.cancel(e.$$timeoutId))},e}]}var Lr=ee.createElement("a"),Ir=Fr(l.location.href);function Fr(e){var t=e;return O&&(Lr.setAttribute("href",t),t=Lr.href),Lr.setAttribute("href",t),{href:Lr.href,protocol:Lr.protocol?Lr.protocol.replace(/:$/,""):"",host:Lr.host,search:Lr.search?Lr.search.replace(/^\?/,""):"",hash:Lr.hash?Lr.hash.replace(/^#/,""):"",hostname:Lr.hostname,port:Lr.port,pathname:"/"===Lr.pathname.charAt(0)?Lr.pathname:"/"+Lr.pathname}}function Hr(e){var t=ue(e)?Fr(e):e;return t.protocol===Ir.protocol&&t.host===Ir.host}function Ur(){this.$get=$(l)}function zr(e){var a=e[0]||{},s={},l="";function u(t){try{return decodeURIComponent(t)}catch(e){return t}}return function(){var e,t,n,r,i,o=a.cookie||"";if(o!==l)for(e=(l=o).split("; "),s={},n=0;n<e.length;n++)0<(r=(t=e[n]).indexOf("="))&&(i=u(t.substring(0,r)),s[i]===te&&(s[i]=u(t.substring(r+1))));return s}}function Vr(){this.$get=zr}function jr(r){var i="Filter";function o(e,t){if(le(e)){var n={};return re(e,function(e,t){n[t]=o(t,e)}),n}return r.factory(e+i,t)}this.register=o,this.$get=["$injector",function(t){return function(e){return t.get(e+i)}}],o("currency",Xr),o("date",si),o("filter",Wr),o("json",li),o("limitTo",di),o("lowercase",ui),o("number",Yr),o("orderBy",fi),o("uppercase",ci)}function Wr(){return function(e,t,n){if(!P(e)){if(null==e)return e;throw x("filter")("notarray","Expected array but received: {0}",e)}var r,i;switch(Gr(t)){case"function":r=t;break;case"boolean":case"null":case"number":case"string":i=!0;case"object":r=function(t,n,r){var i=le(t)&&"$"in t;!0===n?n=ge:de(n)||(n=function(e,t){return!se(e)&&(null===e||null===t?e===t:!(le(t)||le(e)&&!w(e))&&(e=D(""+e),t=D(""+t),-1!==e.indexOf(t)))});return function(e){return i&&!le(e)?qr(e,t.$,n,!1):qr(e,t,n,r)}}(t,n,i);break;default:return e}return Array.prototype.filter.call(e,r)}}function qr(e,t,n,r,i){var o=Gr(e),a=Gr(t);if("string"===a&&"!"===t.charAt(0))return!qr(e,t.substring(1),n,r);if(ce(e))return e.some(function(e){return qr(e,t,n,r)});switch(o){case"object":var s;if(r){for(s in e)if("$"!==s.charAt(0)&&qr(e[s],t,n,!0))return!0;return!i&&qr(e,t,n,!1)}if("object"!==a)return n(e,t);for(s in t){var l=t[s];if(!de(l)&&!se(l)){var u="$"===s;if(!qr(u?e:e[s],l,n,u,u))return!1}}return!0;case"function":return!1;default:return n(e,t)}}function Gr(e){return null===e?"null":typeof e}function Xr(e){var r=e.NUMBER_FORMATS;return function(e,t,n){return se(t)&&(t=r.CURRENCY_SYM),se(n)&&(n=r.PATTERNS[1].maxFrac),null==e?e:Jr(e,r.PATTERNS[1],r.GROUP_SEP,r.DECIMAL_SEP,n).replace(/\u00A4/g,t)}}function Yr(e){var n=e.NUMBER_FORMATS;return function(e,t){return null==e?e:Jr(e,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,t)}}zr.$inject=["$document"],jr.$inject=["$provide"],Xr.$inject=["$locale"],Yr.$inject=["$locale"];var Kr=".";function Jr(e,t,n,r,i){if(le(e))return"";var o=e<0,a=(e=Math.abs(e))===1/0;if(!a&&!isFinite(e))return"";var s=e+"",l="",u=!1,c=[];if(a&&(l="∞"),!a&&-1!==s.indexOf("e")){var d=s.match(/([\d\.]+)e(-?)(\d+)/);d&&"-"==d[2]&&d[3]>i+1?e=0:(l=s,u=!0)}if(a||u)0<i&&e<1&&(l=e.toFixed(i),e=parseFloat(l));else{var f=(s.split(Kr)[1]||"").length;se(i)&&(i=Math.min(Math.max(t.minFrac,f),t.maxFrac));var h=(""+(e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i))).split(Kr),p=h[0];h=h[1]||"";var m,g=0,v=t.lgSize,y=t.gSize;if(p.length>=v+y)for(g=p.length-v,m=0;m<g;m++)(g-m)%y==0&&0!==m&&(l+=n),l+=p.charAt(m);for(m=g;m<p.length;m++)(p.length-m)%v==0&&0!==m&&(l+=n),l+=p.charAt(m);for(;h.length<i;)h+="0";i&&"0"!==i&&(l+=r+h.substr(0,i))}return 0===e&&(o=!1),c.push(o?t.negPre:t.posPre,l,o?t.negSuf:t.posSuf),c.join("")}function Zr(e,t,n){var r="";for(e<0&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Qr(n,r,i,o){return i=i||0,function(e){var t=e["get"+n]();return(0<i||-i<t)&&(t+=i),0===t&&-12==i&&(t=12),Zr(t,r,o)}}function ei(r,i){return function(e,t){var n=e["get"+r]();return t[c(i?"SHORT"+r:r)][n]}}function ti(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function ni(r){return function(e){var t=ti(e.getFullYear()),n=+function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}(e)-+t;return Zr(1+Math.round(n/6048e5),r)}}function ri(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}var ii={yyyy:Qr("FullYear",4),yy:Qr("FullYear",2,0,!0),y:Qr("FullYear",1),MMMM:ei("Month"),MMM:ei("Month",!0),MM:Qr("Month",2,1),M:Qr("Month",1,1),dd:Qr("Date",2),d:Qr("Date",1),HH:Qr("Hours",2),H:Qr("Hours",1),hh:Qr("Hours",2,-12),h:Qr("Hours",1,-12),mm:Qr("Minutes",2),m:Qr("Minutes",1),ss:Qr("Seconds",2),s:Qr("Seconds",1),sss:Qr("Milliseconds",3),EEEE:ei("Day"),EEE:ei("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,n){var r=-1*n,i=0<=r?"+":"";return i+=Zr(Math[0<r?"floor":"ceil"](r/60),2)+Zr(Math.abs(r%60),2)},ww:ni(2),w:ni(1),G:ri,GG:ri,GGG:ri,GGGG:function(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}},oi=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,ai=/^\-?\d+$/;function si(l){var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(t,e,n){var r,i,o="",a=[];if(e=e||"mediumDate",e=l.DATETIME_FORMATS[e]||e,ue(t)&&(t=ai.test(t)?y(t):function(e){var t;if(t=e.match(d)){var n=new Date(0),r=0,i=0,o=t[8]?n.setUTCFullYear:n.setFullYear,a=t[8]?n.setUTCHours:n.setHours;t[9]&&(r=y(t[9]+t[10]),i=y(t[9]+t[11])),o.call(n,y(t[1]),y(t[2])-1,y(t[3]));var s=y(t[4]||0)-r,l=y(t[5]||0)-i,u=y(t[6]||0),c=Math.round(1e3*parseFloat("0."+(t[7]||0)));return a.call(n,s,l,u,c),n}return e}(t)),k(t)&&(t=new Date(t)),!N(t)||!isFinite(t.getTime()))return t;for(;e;)e=(i=oi.exec(e))?(a=W(a,i,1)).pop():(a.push(e),null);var s=t.getTimezoneOffset();return n&&(s=K(n,t.getTimezoneOffset()),t=J(t,n,!0)),re(a,function(e){r=ii[e],o+=r?r(t,l.DATETIME_FORMATS,s):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),o}}function li(){return function(e,t){return se(t)&&(t=2),X(e,t)}}si.$inject=["$locale"];var ui=$(D),ci=$(c);function di(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):y(t),isNaN(t)?e:(k(e)&&(e=e.toString()),ce(e)||ue(e)?(n=(n=!n||isNaN(n)?0:y(n))<0&&n>=-e.length?e.length+n:n,0<=t?e.slice(n,n+t):0===n?e.slice(t,e.length):e.slice(Math.max(0,n+t),n)):e)}}function fi(a){return function(e,t,n){if(!P(e))return e;ce(t)||(t=[t]),0===t.length&&(t=["+"]);var o=function(e,i){return i=i?-1:1,e.map(function(e){var t=1,n=b;if(de(e))n=e;else if(ue(e)&&("+"!=e.charAt(0)&&"-"!=e.charAt(0)||(t="-"==e.charAt(0)?-1:1,e=e.substring(1)),""!==e&&(n=a(e)).constant)){var r=n();n=function(e){return e[r]}}return{get:n,descending:t*i}})}(t,n);o.push({get:function(){return{}},descending:n?-1:1});var r=Array.prototype.map.call(e,function(t,n){return{value:t,predicateValues:o.map(function(e){return function(e,t){var n=typeof e;null===e?(n="string",e="null"):"string"===n?e=e.toLowerCase():"object"===n&&(e=function(e,t){if("function"==typeof e.valueOf&&i(e=e.valueOf()))return e;if(w(e)&&i(e=e.toString()))return e;return t}(e,t));return{value:e,type:n}}(e.get(t),n)})}});return r.sort(function(e,t){for(var n=0,r=0,i=o.length;r<i&&!(n=s(e.predicateValues[r],t.predicateValues[r])*o[r].descending);++r);return n}),e=r.map(function(e){return e.value})};function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function s(e,t){var n=0;return e.type===t.type?e.value!==t.value&&(n=e.value<t.value?-1:1):n=e.type<t.type?-1:1,n}}function hi(e){return de(e)&&(e={link:e}),e.restrict=e.restrict||"AC",$(e)}fi.$inject=["$parse"];var pi=$({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===s.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),mi={};re(Ct,function(e,r){if("multiple"!=e){var i=tn("ng-"+r),t=o;"checked"===e&&(t=function(e,t,n){n.ngModel!==n[i]&&o(e,0,n)}),mi[i]=function(){return{restrict:"A",priority:100,link:t}}}function o(e,t,n){e.$watch(n[i],function(e){n.$set(r,!!e)})}}),re(St,function(e,i){mi[i]=function(){return{priority:100,link:function(e,t,n){if("ngPattern"===i&&"/"==n.ngPattern.charAt(0)){var r=n.ngPattern.match(o);if(r)return void n.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(n[i],function(e){n.$set(i,e)})}}}}),re(["src","srcset","href"],function(o){var a=tn("ng-"+o);mi[a]=function(){return{priority:99,link:function(e,t,n){var r=o,i=o;"href"===o&&"[object SVGAnimatedString]"===s.call(t.prop("href"))&&(i="xlinkHref",n.$attr[i]="xlink:href",r=null),n.$observe(a,function(e){e?(n.$set(i,e),O&&r&&t.prop(r,n[i])):"href"===o&&n.$set(i,null)})}}}});var gi={$addControl:ae,$$renameControl:function(e,t){e.$name=t},$removeControl:ae,$setValidity:ae,$setDirty:ae,$setPristine:ae,$setSubmitted:ae},vi="ng-submitted";function yi(e,t,n,r,i){var o=this,a=[],s=o.$$parentForm=e.parent().controller("form")||gi;o.$error={},o.$$success={},o.$pending=te,o.$name=i(t.name||t.ngForm||"")(n),o.$dirty=!1,o.$pristine=!0,o.$valid=!0,o.$invalid=!1,o.$submitted=!1,s.$addControl(o),o.$rollbackViewValue=function(){re(a,function(e){e.$rollbackViewValue()})},o.$commitViewValue=function(){re(a,function(e){e.$commitViewValue()})},o.$addControl=function(e){De(e.$name,"input"),a.push(e),e.$name&&(o[e.$name]=e)},o.$$renameControl=function(e,t){var n=e.$name;o[n]===e&&delete o[n],(o[t]=e).$name=t},o.$removeControl=function(n){n.$name&&o[n.$name]===n&&delete o[n.$name],re(o.$pending,function(e,t){o.$setValidity(t,null,n)}),re(o.$error,function(e,t){o.$setValidity(t,null,n)}),re(o.$$success,function(e,t){o.$setValidity(t,null,n)}),me(a,n)},vo({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];r?-1===r.indexOf(n)&&r.push(n):e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(me(r,n),0===r.length&&delete e[t])},parentForm:s,$animate:r}),o.$setDirty=function(){r.removeClass(e,so),r.addClass(e,lo),o.$dirty=!0,o.$pristine=!1,s.$setDirty()},o.$setPristine=function(){r.setClass(e,so,lo+" "+vi),o.$dirty=!1,o.$pristine=!0,o.$submitted=!1,re(a,function(e){e.$setPristine()})},o.$setUntouched=function(){re(a,function(e){e.$setUntouched()})},o.$setSubmitted=function(){r.addClass(e,vi),o.$submitted=!0,s.$setSubmitted()}}yi.$inject=["$element","$attrs","$scope","$animate","$interpolate"];function bi(n){return["$timeout","$parse",function(l,t){return{name:"form",restrict:n?"EAC":"E",controller:yi,compile:function(e,t){e.addClass(so).addClass(oo);var s=t.name?"name":!(!n||!t.ngForm)&&"ngForm";return{pre:function(t,e,n,r){if(!("action"in n)){var i=function(e){t.$apply(function(){r.$commitViewValue(),r.$setSubmitted()}),e.preventDefault()};qe(e[0],"submit",i),e.on("$destroy",function(){l(function(){Ge(e[0],"submit",i)},0,!1)})}var o=r.$$parentForm,a=s?u(r.$name):ae;s&&(a(t,r),n.$observe(s,function(e){r.$name!==e&&(a(t,te),o.$$renameControl(r,e),(a=u(r.$name))(t,r))})),e.on("$destroy",function(){o.$removeControl(r),a(t,te),ie(r,gi)})}}}};function u(e){return""===e?t('this[""]').assign:t(e).assign||ae}}]}var xi=bi(),$i=bi(!0),wi=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ci=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ei=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Si=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,_i=/^(\d{4})-(\d{2})-(\d{2})$/,ki=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ni=/^(\d{4})-W(\d\d)$/,Ti=/^(\d{4})-(\d\d)$/,Ai=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ri={text:function(e,t,n,r,i,o){Di(e,t,n,r,i,o),Bi(r)},date:Oi("date",_i,Mi(_i,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Oi("datetimelocal",ki,Mi(ki,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Oi("time",Ai,Mi(Ai,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Oi("week",Ni,function(e,t){if(N(e))return e;if(ue(e)){Ni.lastIndex=0;var n=Ni.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,u=ti(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,u.getDate()+c,o,a,s,l)}}return NaN},"yyyy-Www"),month:Oi("month",Ti,Mi(Ti,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,n,r,i,o){if(Pi(e,t,n,r),Di(e,t,n,r,i,o),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Si.test(e)?parseFloat(e):te}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!k(e))throw ho("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),E(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||se(a)||a<=e},n.$observe("min",function(e){E(e)&&!k(e)&&(e=parseFloat(e,10)),a=k(e)&&!isNaN(e)?e:te,r.$validate()})}if(E(n.max)||n.ngMax){var s;r.$validators.max=function(e){return r.$isEmpty(e)||se(s)||e<=s},n.$observe("max",function(e){E(e)&&!k(e)&&(e=parseFloat(e,10)),s=k(e)&&!isNaN(e)?e:te,r.$validate()})}},url:function(e,t,n,r,i,o){Di(e,t,n,r,i,o),Bi(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||Ci.test(n)}},email:function(e,t,n,r,i,o){Di(e,t,n,r,i,o),Bi(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ei.test(n)}},radio:function(e,t,n,r){se(n.name)&&t.attr("name",_());t.on("click",function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)}),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r,i,o,a,s){var l=Li(s,e,"ngTrueValue",n.ngTrueValue,!0),u=Li(s,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",function(e){r.$setViewValue(t[0].checked,e&&e.type)}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return!1===e},r.$formatters.push(function(e){return ge(e,l)}),r.$parsers.push(function(e){return e?l:u})},hidden:ae,button:ae,submit:ae,reset:ae,file:ae};function Bi(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Di(e,r,i,o,t,a){var s=D(r[0].type);if(!t.android){var l=!1;r.on("compositionstart",function(e){l=!0}),r.on("compositionend",function(){l=!1,u()})}var u=function(e){if(c&&(a.defer.cancel(c),c=null),!l){var t=r.val(),n=e&&e.type;"password"===s||i.ngTrim&&"false"===i.ngTrim||(t=he(t)),(o.$viewValue!==t||""===t&&o.$$hasNativeValidators)&&o.$setViewValue(t,n)}};if(t.hasEvent("input"))r.on("input",u);else{var c,n=function(e,t,n){c=c||a.defer(function(){c=null,t&&t.value===n||u(e)})};r.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||n(e,this,this.value)}),t.hasEvent("paste")&&r.on("paste cut",n)}r.on("change",u),o.$render=function(){var e=o.$isEmpty(o.$viewValue)?"":o.$viewValue;r.val()!==e&&r.val(e)}}function Mi(i,o){return function(e,t){var n,r;if(N(e))return e;if(ue(e)){if('"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),wi.test(e))return new Date(e);if(i.lastIndex=0,n=i.exec(e))return n.shift(),r=t?{yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds(),sss:t.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},re(n,function(e,t){t<o.length&&(r[o[t]]=+e)}),new Date(r.yyyy,r.MM-1,r.dd,r.HH,r.mm,r.ss||0,1e3*r.sss||0)}return NaN}}function Oi(h,p,m,g){return function(e,t,n,r,i,o,a){Pi(e,t,n,r),Di(0,t,n,r,i,o);var s,l,u,c=r&&r.$options&&r.$options.timezone;r.$$parserName=h,r.$parsers.push(function(e){if(r.$isEmpty(e))return null;if(p.test(e)){var t=m(e,s);return c&&(t=J(t,c)),t}return te}),r.$formatters.push(function(e){if(e&&!N(e))throw ho("datefmt","Expected `{0}` to be a date",e);return d(e)?((s=e)&&c&&(s=J(s,c,!0)),a("date")(e,g,c)):(s=null,"")}),(E(n.min)||n.ngMin)&&(r.$validators.min=function(e){return!d(e)||se(l)||m(e)>=l},n.$observe("min",function(e){l=f(e),r.$validate()}));(E(n.max)||n.ngMax)&&(r.$validators.max=function(e){return!d(e)||se(u)||m(e)<=u},n.$observe("max",function(e){u=f(e),r.$validate()}));function d(e){return e&&!(e.getTime&&e.getTime()!=e.getTime())}function f(e){return E(e)?N(e)?e:m(e):te}}}function Pi(e,n,t,r){var i=n[0];(r.$$hasNativeValidators=le(i.validity))&&r.$parsers.push(function(e){var t=n.prop(a)||{};return t.badInput&&!t.typeMismatch?te:e})}function Li(e,t,n,r,i){var o;if(E(r)){if(!(o=e(r)).constant)throw ho("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function Ii(){return{restrict:"A",priority:100,compile:function(e,t){return Hi.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}}var Fi=["$browser","$sniffer","$filter","$parse",function(i,o,a,s){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,t,n,r){r[0]&&(Ri[D(n.type)]||Ri.text)(e,t,n,r[0],o,i,a,s)}}}}],Hi=/^(true|false|\d+)$/,Ui=["$compile",function(r){return{restrict:"AC",compile:function(e){return r.$$addBindingClass(e),function(e,t,n){r.$$addBindingInfo(t,n.ngBind),t=t[0],e.$watch(n.ngBind,function(e){t.textContent=e===te?"":e})}}}}],zi=["$interpolate","$compile",function(i,o){return{compile:function(e){return o.$$addBindingClass(e),function(e,t,n){var r=i(t.attr(n.$attr.ngBindTemplate));o.$$addBindingInfo(t,r.expressions),t=t[0],n.$observe("ngBindTemplate",function(e){t.textContent=e===te?"":e})}}}}],Vi=["$sce","$parse","$compile",function(o,n,a){return{restrict:"A",compile:function(e,t){var r=n(t.ngBindHtml),i=n(t.ngBindHtml,function(e){return(e||"").toString()});return a.$$addBindingClass(e),function(e,t,n){a.$$addBindingInfo(t,n.ngBindHtml),e.$watch(i,function(){t.html(o.getTrustedHtml(r(e))||"")})}}}}],ji=$({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}});function Wi(f,h){return f="ngClass"+f,["$animate",function(u){return{restrict:"AC",link:function(i,o,a){var n;function s(e){var t=l(e,1);a.$addClass(t)}function l(e,t){var n=o.data("$classCounts")||Pe(),r=[];return re(e,function(e){(0<t||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(0<t)&&r.push(e))}),o.data("$classCounts",n),r.join(" ")}function t(e){if(!0===h||i.$index%2===h){var t=d(e||[]);if(n){if(!ge(e,n)){!function(e,t){var n=c(t,e),r=c(e,t);n=l(n,1),r=l(r,-1),n&&n.length&&u.addClass(o,n),r&&r.length&&u.removeClass(o,r)}(d(n),t)}}else s(t)}n=z(e)}i.$watch(a[f],t,!0),a.$observe("class",function(e){t(i.$eval(a[f]))}),"ngClass"!==f&&i.$watch("$index",function(e,t){var n=1&e;if(n!=(1&t)){var r=d(i.$eval(a[f]));n===h?s(r):function(e){var t=l(e,-1);a.$removeClass(t)}(r)}})}};function c(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function d(e){var n=[];return ce(e)?(re(e,function(e){n=n.concat(d(e))}),n):ue(e)?e.split(" "):le(e)?(re(e,function(e,t){e&&(n=n.concat(t.split(" ")))}),n):e}}]}var qi=Wi("",!0),Gi=Wi("Odd",0),Xi=Wi("Even",1),Yi=hi({compile:function(e,t){t.$set("ngCloak",te),e.removeClass("ng-cloak")}}),Ki=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ji={},Zi={blur:!0,focus:!0};re("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(o){var a=tn("ng-"+o);Ji[a]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(e,t){var r=n(t[a],null,!0);return function(n,e){e.on(o,function(e){function t(){r(n,{$event:e})}Zi[o]&&i.$$phase?n.$evalAsync(t):n.$apply(t)})}}}}]});function Qi(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var i=t.attr(n.$attr.ngList)||", ",o="false"!==n.ngTrim,a=o?he(i):i;r.$parsers.push(function(e){if(!se(e)){var t=[];return e&&re(e.split(a),function(e){e&&t.push(o?he(e):e)}),t}}),r.$formatters.push(function(e){return ce(e)?e.join(i):te}),r.$isEmpty=function(e){return!e||!e.length}}}}function eo(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),this.$options.updateOn!==te?(this.$options.updateOnDefault=!1,this.$options.updateOn=he(this.$options.updateOn.replace(go,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}}var to=["$animate",function(l){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(e,n,r,t,i){var o,a,s;e.$watch(r.ngIf,function(e){e?a||i(function(e,t){a=t,e[e.length++]=ee.createComment(" end ngIf: "+r.ngIf+" "),o={clone:e},l.enter(e,n.parent(),n)}):(s&&(s.remove(),s=null),a&&(a.$destroy(),a=null),o&&(s=Oe(o.clone),l.leave(s).then(function(){s=null}),o=null))})}}}],no=["$templateRequest","$anchorScroll","$animate",function(g,v,y){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:S.noop,compile:function(e,t){var n=t.ngInclude||t.src,p=t.onload||"",m=t.autoscroll;return function(a,s,e,l,u){function c(){t&&(t.remove(),t=null),d&&(d.$destroy(),d=null),f&&(y.leave(f).then(function(){t=null}),t=f,f=null)}var d,t,f,h=0;a.$watch(n,function(r){function i(){!E(m)||m&&!a.$eval(m)||v()}var o=++h;r?(g(r,!0).then(function(e){if(o===h){var t=a.$new();l.template=e;var n=u(t,function(e){c(),y.enter(e,null,s).then(i)});f=n,(d=t).$emit("$includeContentLoaded",r),a.$eval(p)}},function(){o===h&&(c(),a.$emit("$includeContentError",r))}),a.$emit("$includeContentRequested",r)):(c(),l.template=null)})}}}}],ro=["$compile",function(i){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(e,t,n,r){if(/SVG/.test(t[0].toString()))return t.empty(),void i(at(r.template,ee).childNodes)(e,function(e){t.append(e)},{futureParentElement:t});t.html(r.template),i(t.contents())(e)}}}],io=hi({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),oo="ng-valid",ao="ng-invalid",so="ng-pristine",lo="ng-dirty",uo="ng-untouched",co="ng-touched",fo="ng-pending",ho=x("ngModel"),po=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(o,t,i,a,s,e,l,u,c,n){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=te,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=te,this.$name=n(i.name||"",!1)(o);var d,f=s(i.ngModel),h=f.assign,p=f,m=h,g=null,v=this;this.$$setOptions=function(e){if((v.$options=e)&&e.getterSetter){var n=s(i.ngModel+"()"),r=s(i.ngModel+"($$$p)");p=function(e){var t=f(e);return de(t)&&(t=n(e)),t},m=function(e,t){de(f(e))?r(e,{$$$p:v.$modelValue}):h(e,v.$modelValue)}}else if(!f.assign)throw ho("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,ye(a))},this.$render=ae,this.$isEmpty=function(e){return se(e)||""===e||null===e||e!=e};var r=a.inheritedData("$formController")||gi,y=0;vo({ctrl:this,$element:a,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:r,$animate:e}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,e.removeClass(a,lo),e.addClass(a,so)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,e.removeClass(a,so),e.addClass(a,lo),r.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,e.setClass(a,uo,co)},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,e.setClass(a,co,uo)},this.$rollbackViewValue=function(){l.cancel(g),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!k(v.$modelValue)||!isNaN(v.$modelValue)){var e=v.$$lastCommittedViewValue,t=v.$$rawModelValue,n=v.$valid,r=v.$modelValue,i=v.$options&&v.$options.allowInvalid;v.$$runValidators(t,e,function(e){i||n===e||(v.$modelValue=e?t:te,v.$modelValue!==r&&v.$$writeModelToScope())})}},this.$$runValidators=function(r,i,t){var o,a,s,n=++y;(function(){var e=v.$$parserName||"parse";{if(d!==te)return d||(re(v.$validators,function(e,t){l(t,null)}),re(v.$asyncValidators,function(e,t){l(t,null)})),l(e,d),d;l(e,null)}return!0})()?(o=!0,re(v.$validators,function(e,t){var n=e(r,i);o=o&&n,l(t,n)}),o||(re(v.$asyncValidators,function(e,t){l(t,null)}),0)?(a=[],s=!0,re(v.$asyncValidators,function(e,t){var n=e(r,i);if(!B(n))throw ho("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",n);l(t,te),a.push(n.then(function(){l(t,!0)},function(e){l(t,s=!1)}))}),a.length?c.all(a).then(function(){e(s)},ae):e(!0)):e(!1)):e(!1);function l(e,t){n===y&&v.$setValidity(e,t)}function e(e){n===y&&t(e)}},this.$commitViewValue=function(){var e=v.$viewValue;l.cancel(g),(v.$$lastCommittedViewValue!==e||""===e&&v.$$hasNativeValidators)&&(v.$$lastCommittedViewValue=e,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var t=v.$$lastCommittedViewValue;if(d=!se(t)||te)for(var e=0;e<v.$parsers.length;e++)if(se(t=v.$parsers[e](t))){d=!1;break}k(v.$modelValue)&&isNaN(v.$modelValue)&&(v.$modelValue=p(o));var n=v.$modelValue,r=v.$options&&v.$options.allowInvalid;function i(){v.$modelValue!==n&&v.$$writeModelToScope()}v.$$rawModelValue=t,r&&(v.$modelValue=t,i()),v.$$runValidators(t,v.$$lastCommittedViewValue,function(e){r||(v.$modelValue=e?t:te,i())})},this.$$writeModelToScope=function(){m(o,v.$modelValue),re(v.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){v.$viewValue=e,v.$options&&!v.$options.updateOnDefault||v.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(e){var t,n=0,r=v.$options;r&&E(r.debounce)&&(k(t=r.debounce)?n=t:k(t[e])?n=t[e]:k(t.default)&&(n=t.default)),l.cancel(g),n?g=l(function(){v.$commitViewValue()},n):u.$$phase?v.$commitViewValue():o.$apply(function(){v.$commitViewValue()})},o.$watch(function(){var e=p(o);if(e!==v.$modelValue&&(v.$modelValue==v.$modelValue||e==e)){v.$modelValue=v.$$rawModelValue=e,d=te;for(var t=v.$formatters,n=t.length,r=e;n--;)r=t[n](r);v.$viewValue!==r&&(v.$viewValue=v.$$lastCommittedViewValue=r,v.$render(),v.$$runValidators(e,r,ae))}return e})}],mo=["$rootScope",function(o){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:po,priority:1,compile:function(e){return e.addClass(so).addClass(uo).addClass(oo),{pre:function(e,t,n,r){var i=r[0],o=r[1]||gi;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&o.$$renameControl(i,e)}),e.$on("$destroy",function(){o.$removeControl(i)})},post:function(t,e,n,r){var i=r[0];i.$options&&i.$options.updateOn&&e.on(i.$options.updateOn,function(e){i.$$debounceViewValueCommit(e&&e.type)}),e.on("blur",function(e){i.$touched||(o.$$phase?t.$evalAsync(i.$setTouched):t.$apply(i.$setTouched))})}}}}}],go=/(\s+|^)default(\s+|$)/;function vo(e){var i=e.ctrl,n=e.$element,r={},o=e.set,a=e.unset,s=e.parentForm,l=e.$animate;function u(e,t){t&&!r[e]?(l.addClass(n,e),r[e]=!0):!t&&r[e]&&(l.removeClass(n,e),r[e]=!1)}function c(e,t){e=e?"-"+Ne(e,"-"):"",u(oo+e,!0===t),u(ao+e,!1===t)}r[ao]=!(r[oo]=n.hasClass(oo)),i.$setValidity=function(e,t,n){t===te?function(e,t,n){i[e]||(i[e]={});o(i[e],t,n)}("$pending",e,n):function(e,t,n){i[e]&&a(i[e],t,n);yo(i[e])&&(i[e]=te)}("$pending",e,n);R(t)?t?(a(i.$error,e,n),o(i.$$success,e,n)):(o(i.$error,e,n),a(i.$$success,e,n)):(a(i.$error,e,n),a(i.$$success,e,n));i.$pending?(u(fo,!0),i.$valid=i.$invalid=te,c("",null)):(u(fo,!1),i.$valid=yo(i.$error),i.$invalid=!i.$valid,c("",i.$valid));var r;r=i.$pending&&i.$pending[e]?te:!i.$error[e]&&(!!i.$$success[e]||null);c(e,r),s.$setValidity(e,r,i)}}function yo(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function bo(){return{restrict:"E",require:["select","?ngModel"],controller:Wo,link:function(e,n,t,r){var i=r[1];if(i){var o=r[0];if((o.ngModelCtrl=i).$render=function(){o.writeValue(i.$viewValue)},n.on("change",function(){e.$apply(function(){i.$setViewValue(o.readValue())})}),t.multiple){o.readValue=function(){var t=[];return re(n.find("option"),function(e){e.selected&&t.push(e.value)}),t},o.writeValue=function(e){var t=new At(e);re(n.find("option"),function(e){e.selected=E(t.get(e.value))})};var a,s=NaN;e.$watch(function(){s!==i.$viewValue||ge(a,i.$viewValue)||(a=z(i.$viewValue),i.$render()),s=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}}}}}function xo(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}}function $o(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i,o=n.ngPattern||n.pattern;n.$observe("pattern",function(e){if(ue(e)&&0<e.length&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw x("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",o,e,ye(t));i=e||te,r.$validate()}),r.$validators.pattern=function(e,t){return r.$isEmpty(t)||se(i)||i.test(t)}}}}}function wo(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=y(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}}function Co(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=y(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}}var Eo,So,_o,ko,No=hi({terminal:!0,priority:1e3}),To=x("ngOptions"),Ao=/^\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]+?))?$/,Ro=["$compile","$parse",function($,E){var w=ee.createElement("option"),C=ee.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(e,a,t,n){var r=n[1];if(r){for(var s,l=n[0],i=t.multiple,o=0,u=a.children(),c=u.length;o<c;o++)if(""===u[o].value){s=u.eq(o);break}var d,f=!!s,h=ne(w.cloneNode(!1));h.val("?");var p=function(e,t,f){var c=e.match(Ao);if(!c)throw To("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,ye(t));function h(e,t){return g(e,$(e,t))}var n=c[5]||c[7],r=c[6],i=/ as /.test(c[0])&&c[1],p=c[9],o=E(c[2]?c[1]:n),m=i&&E(i)||o,a=p&&E(p),g=p?function(e,t){return a(f,t)}:function(e){return Tt(e)},v=E(c[2]||c[1]),y=E(c[3]||""),b=E(c[4]||""),x=E(c[8]),s={},$=r?function(e,t){return s[r]=t,s[n]=e,s}:function(e){return s[n]=e,s};function w(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function C(e){var t;if(!r&&P(e))t=e;else for(var n in t=[],e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n);return t}return{trackBy:p,getTrackByValue:h,getWatchables:E(x,function(e){for(var t=[],n=C(e=e||[]),r=n.length,i=0;i<r;i++){var o=e===n?i:n[i],a=(e[o],$(e[o],o)),s=g(e[o],a);if(t.push(s),c[2]||c[1]){var l=v(f,a);t.push(l)}if(c[4]){var u=b(f,a);t.push(u)}}return t}),getOptions:function(){for(var e=[],t={},n=x(f)||[],r=C(n),i=r.length,o=0;o<i;o++){var a=n===r?o:r[o],s=n[a],l=$(s,a),u=m(f,l),c=g(u,l),d=new w(c,u,v(f,l),y(f,l),b(f,l));e.push(d),t[c]=d}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[h(e)]},getViewValueFromOption:function(e){return p?S.copy(e.viewValue):e.viewValue}}}}}(t.ngOptions,a,e),m=function(){f||s.remove()},g=function(){h.remove()};i?(r.$isEmpty=function(e){return!e||0===e.length},l.writeValue=function(e){d.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=d.getOptionFromViewValue(e);t&&!t.disabled&&(t.element.selected=!0)})},l.readValue=function(){var e=a.val()||[],n=[];return re(e,function(e){var t=d.selectValueMap[e];t&&!t.disabled&&n.push(d.getViewValueFromOption(t))}),n},p.trackBy&&e.$watchCollection(function(){if(ce(r.$viewValue))return r.$viewValue.map(function(e){return p.getTrackByValue(e)})},function(){r.$render()})):(l.writeValue=function(e){var t=d.getOptionFromViewValue(e);t&&!t.disabled?a[0].value!==t.selectValue&&(g(),m(),a[0].value=t.selectValue,t.element.selected=!0,t.element.setAttribute("selected","selected")):null===e||f?(g(),f||a.prepend(s),a.val(""),s.prop("selected",!0),s.attr("selected",!0)):(m(),a.prepend(h),a.val("?"),h.prop("selected",!0),h.attr("selected",!0))},l.readValue=function(){var e=d.selectValueMap[a.val()];return e&&!e.disabled?(m(),g(),d.getViewValueFromOption(e)):null},p.trackBy&&e.$watch(function(){return p.getTrackByValue(r.$viewValue)},function(){r.$render()})),f?(s.remove(),$(s)(e),s.removeClass("ng-scope")):s=ne(w.cloneNode(!1)),x(),e.$watchCollection(p.getWatchables,x)}function v(e,t){(e.element=t).disabled=e.disabled,e.value!==t.value&&(t.value=e.selectValue),e.label!==t.label&&(t.label=e.label,t.textContent=e.label)}function y(e,t,n,r){var i;return t&&D(t.nodeName)===n?i=t:(i=r.cloneNode(!1),t?e.insertBefore(i,t):e.appendChild(i)),i}function b(e){for(var t;e;)t=e.nextSibling,$t(e),e=t}function x(){var e=d&&l.readValue();d=p.getOptions();var i={},o=a[0].firstChild;if(f&&a.prepend(s),o=function(e){var t=s&&s[0],n=h&&h[0];if(t||n)for(;e&&(e===t||e===n);)e=e.nextSibling;return e}(o),d.items.forEach(function(e){var t,n,r;e.group?((t=i[e.group])||(n=y(a[0],o,"optgroup",C),o=n.nextSibling,n.label=e.group,t=i[e.group]={groupElement:n,currentOptionElement:n.firstChild}),v(e,r=y(t.groupElement,t.currentOptionElement,"option",w)),t.currentOptionElement=r.nextSibling):(v(e,r=y(a[0],o,"option",w)),o=r.nextSibling)}),Object.keys(i).forEach(function(e){b(i[e].currentOptionElement)}),b(o),r.$render(),!r.$isEmpty(e)){var t=l.readValue();(p.trackBy?ge(e,t):e===t)||(r.$setViewValue(t),r.$render())}}}}}],Bo=["$locale","$interpolate","$log",function(p,m,g){var v=/{}/g,y=/^when(Minus)?(.+)$/;return{link:function(i,o,a){var s,e=a.count,l=a.$attr.when&&o.attr(a.$attr.when),u=a.offset||0,c=i.$eval(l)||{},d={},t=m.startSymbol(),n=m.endSymbol(),r=t+e+"-"+u+n,f=S.noop;function h(e){o.text(e||"")}re(a,function(e,t){var n=y.exec(t);if(n){var r=(n[1]?"-":"")+D(n[2]);c[r]=o.attr(a.$attr[t])}}),re(c,function(e,t){d[t]=m(e.replace(v,r))}),i.$watch(e,function(e){var t=parseFloat(e),n=isNaN(t);if(n||t in c||(t=p.pluralCat(t-u)),t!==s&&!(n&&k(s)&&isNaN(s))){f();var r=d[t];se(r)?(null!=e&&g.debug("ngPluralize: no rule defined for '"+t+"' in "+l),f=ae,h()):f=i.$watch(r,h),s=t}})}}}],Do=["$parse","$animate",function(l,A){function R(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))}var B="$$NG_REMOVED",D=x("ngRepeat");return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(e,t){var w=t.ngRepeat,C=ee.createComment(" end ngRepeat: "+w+" "),n=w.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!n)throw D("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",w);var r=n[1],i=n[2],E=n[3],o=n[4];if(!(n=r.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/)))throw D("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",r);var a,S,_,k,N=n[3]||n[1],T=n[2];if(E&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(E)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(E)))throw D("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",E);var s={$id:Tt};return o?a=l(o):(_=function(e,t){return Tt(t)},k=function(e){return e}),function(y,b,e,t,x){a&&(S=function(e,t,n){return T&&(s[T]=e),s[N]=t,s.$index=n,a(y,s)});var $=Pe();y.$watchCollection(i,function(e){var r,t,n,i,o,a,s,l,u,c,d,f,h,p=b[0],m=Pe();if(E&&(y[E]=e),P(e))u=e,l=S||_;else for(var g in l=S||k,u=[],e)e.hasOwnProperty(g)&&"$"!==g.charAt(0)&&u.push(g);for(i=u.length,d=new Array(i),r=0;r<i;r++)if(o=e===u?r:u[r],a=e[o],s=l(o,a,r),$[s])c=$[s],delete $[s],m[s]=c,d[r]=c;else{if(m[s])throw re(d,function(e){e&&e.scope&&($[e.id]=e)}),D("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",w,s,a);d[r]={id:s,scope:te,clone:te},m[s]=!0}for(var v in $){if(f=Oe((c=$[v]).clone),A.leave(f),f[0].parentNode)for(r=0,t=f.length;r<t;r++)f[r][B]=!0;c.scope.$destroy()}for(r=0;r<i;r++)if(o=e===u?r:u[r],a=e[o],(c=d[r]).scope){for(n=p;(n=n.nextSibling)&&n[B];);c.clone[0]!=n&&A.move(Oe(c.clone),null,ne(p)),p=(h=c).clone[h.clone.length-1],R(c.scope,r,N,a,T,o,i)}else x(function(e,t){c.scope=t;var n=C.cloneNode(!1);e[e.length++]=n,A.enter(e,null,ne(p)),p=n,c.clone=e,m[c.id]=c,R(c.scope,r,N,a,T,o,i)});$=m})}}}}],Mo="ng-hide",Oo="ng-hide-animate",Po=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngShow,function(e){r[e?"removeClass":"addClass"](t,Mo,{tempClasses:Oo})})}}}],Lo=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngHide,function(e){r[e?"addClass":"removeClass"](t,Mo,{tempClasses:Oo})})}}}],Io=hi(function(e,n,t){e.$watch(t.ngStyle,function(e,t){t&&e!==t&&re(t,function(e,t){n.css(t,"")}),e&&n.css(e)},!0)}),Fo=["$animate",function(c){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,i){function o(e,t){return function(){e.splice(t,1)}}var r=n.ngSwitch||n.on,a=[],s=[],l=[],u=[];e.$watch(r,function(e){var t,n;for(t=0,n=l.length;t<n;++t)c.cancel(l[t]);for(t=l.length=0,n=u.length;t<n;++t){var r=Oe(s[t].clone);u[t].$destroy(),(l[t]=c.leave(r)).then(o(l,t))}s.length=0,u.length=0,(a=i.cases["!"+e]||i.cases["?"])&&re(a,function(i){i.transclude(function(e,t){u.push(t);var n=i.element;e[e.length++]=ee.createComment(" end ngSwitchWhen: ");var r={clone:e};s.push(r),c.enter(e,n.parent(),n)})})})}}}],Ho=hi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Uo=hi({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),zo=hi({restrict:"EAC",link:function(e,t,n,r,i){if(!i)throw x("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",ye(t));i(function(e){t.empty(),t.append(e)})}}),Vo=["$templateCache",function(i){return{restrict:"E",terminal:!0,compile:function(e,t){if("text/ng-template"==t.type){var n=t.id,r=e[0].text;i.put(n,r)}}}}],jo={$setViewValue:ae,$render:ae},Wo=["$element","$scope","$attrs",function(n,e,t){var r=this,i=new At;r.ngModelCtrl=jo,r.unknownOption=ne(ee.createElement("option")),r.renderUnknownOption=function(e){var t="? "+Tt(e)+" ?";r.unknownOption.val(t),n.prepend(r.unknownOption),n.val(t)},e.$on("$destroy",function(){r.renderUnknownOption=ae}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),n.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),n.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),n.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){De(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1)},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=te)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)}}],qo=["$interpolate",function(n){function s(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}return{restrict:"E",priority:100,compile:function(e,t){if(se(t.value)){var a=n(e.text(),!0);a||t.$set("value",e.text())}return function(e,n,r){var t="$selectController",i=n.parent(),o=i.data(t)||i.parent().data(t);o&&o.ngModelCtrl&&(a?e.$watch(a,function(e,t){r.$set("value",e),t!==e&&o.removeOption(t),o.addOption(e,n),o.ngModelCtrl.$render(),s(n)}):(o.addOption(r.value,n),o.ngModelCtrl.$render(),s(n)),n.on("$destroy",function(){o.removeOption(r.value),o.ngModelCtrl.$render()}))}}}}],Go=$({restrict:"E",terminal:!1});l.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(function(){var i;if(!Ae){var e=j();g=l.jQuery,E(e)&&(g=null===e?te:l[e]),g&&g.fn.on?(ie((ne=g).fn,{scope:wt.scope,isolateScope:wt.isolateScope,controller:wt.controller,injector:wt.injector,inheritedData:wt.inheritedData}),i=g.cleanData,g.cleanData=function(e){var t;if(Te)Te=!1;else for(var n,r=0;null!=(n=e[r]);r++)(t=g._data(n,"events"))&&t.$destroy&&g(n).triggerHandler("$destroy");i(e)}):ne=st,S.element=ne,Ae=!0}}(),ie(S,{bootstrap:Ee,copy:U,extend:ie,merge:i,equals:ge,element:ne,forEach:re,injector:Lt,noop:ae,bind:q,toJson:X,fromJson:Y,identity:b,isUndefined:se,isDefined:E,isString:ue,isFunction:de,isObject:le,isNumber:k,isElement:H,isArray:ce,version:Ve,isDate:N,lowercase:D,uppercase:c,callbacks:{counter:0},getTestability:_e,$$minErr:x,$$csp:V,reloadWithDebugInfo:Se}),Eo=l,So=x("$injector"),_o=x("ng"),(ko=Xo(Eo,"angular",Object)).$$minErr=ko.$$minErr||x,(p=Xo(ko,"module",function(){var e={};return function(s,l,u){return function(e,t){if("hasOwnProperty"===e)throw _o("badname","hasOwnProperty is not a valid {0} name",t)}(s,"module"),l&&e.hasOwnProperty(s)&&(e[s]=null),Xo(e,s,function(){if(!l)throw So("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",s);var i=[],e=[],t=[],n=r("$injector","invoke","push",e),o={_invokeQueue:i,_configBlocks:e,_runBlocks:t,requires:l,name:s,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:r("$provide","value"),constant:r("$provide","constant","unshift"),decorator:a("$provide","decorator"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:n,run:function(e){return t.push(e),this}};return u&&n(u),o;function r(e,t,n,r){return r=r||i,function(){return r[n||"push"]([e,t,arguments]),o}}function a(n,r){return function(e,t){return t&&de(t)&&(t.$$moduleName=s),i.push([n,r,arguments]),o}}})}}))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:kr}),e.provider("$compile",Qt).directive({a:pi,input:Fi,textarea:Fi,form:xi,script:Vo,select:bo,style:Go,option:qo,ngBind:Ui,ngBindHtml:Vi,ngBindTemplate:zi,ngClass:qi,ngClassEven:Xi,ngClassOdd:Gi,ngCloak:Yi,ngController:Ki,ngForm:$i,ngHide:Lo,ngIf:to,ngInclude:no,ngInit:io,ngNonBindable:No,ngPluralize:Bo,ngRepeat:Do,ngShow:Po,ngStyle:Io,ngSwitch:Fo,ngSwitchWhen:Ho,ngSwitchDefault:Uo,ngOptions:Ro,ngTransclude:zo,ngModel:mo,ngList:Qi,ngChange:ji,pattern:$o,ngPattern:$o,required:xo,ngRequired:xo,minlength:Co,ngMinlength:Co,maxlength:wo,ngMaxlength:wo,ngValue:Ii,ngModelOptions:eo}).directive({ngInclude:ro}).directive(mi).directive(Ji),e.provider({$anchorScroll:It,$animate:Gt,$animateCss:qt,$$animateQueue:Wt,$$AnimateRunner:jt,$browser:Yt,$cacheFactory:Kt,$controller:sn,$document:ln,$exceptionHandler:un,$filter:jr,$$forceReflow:cn,$interpolate:An,$interval:Rn,$http:_n,$httpParamSerializer:bn,$httpParamSerializerJQLike:xn,$httpBackend:Nn,$location:Gn,$log:Xn,$parse:$r,$rootScope:_r,$q:wr,$$q:Cr,$sce:Br,$sceDelegate:Rr,$sniffer:Dr,$templateCache:Jt,$templateRequest:Mr,$$testability:Or,$timeout:Pr,$window:Ur,$$rAF:Sr,$$jqLite:Nt,$$HashMap:Rt,$$cookieReader:Vr})}]),S.module("ngLocale",[],["$provide",function(e){var i="one",o="other";e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",pluralCat:function(e,t){var n=0|e,r=function(e,t){var n=t;te===n&&(n=Math.min(function(e){var t=(e+="").indexOf(".");return-1==t?0:e.length-t-1}(e),3));var r=Math.pow(10,n);return{v:n,f:(e*r|0)%r}}(e,t);return 1==n&&0==r.v?i:o}})}]),ne(ee).ready(function(){Ce(ee,Ee)}));function Xo(e,t,n){return e[t]||(e[t]=n())}}(window,document),window.angular.$$csp().noInlineStyle||window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>')},{}],4:[function(e,t,n){e("./angular"),t.exports=angular},{"./angular":3}],5:[function(e,t,n){var r;!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function a(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(e){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){function i(n){if(!n.__listeners){n.upload||(n.upload={}),n.__listeners=[];var r=n.upload.addEventListener;n.upload.addEventListener=function(e,t){n.__listeners[e]=t,r&&r.apply(this,arguments)}}}e("open",function(r){return function(t,e,n){i(this),this.__url=e;try{r.apply(this,[t,e,n])}catch(e){-1<e.message.indexOf("Access is denied")&&(this.__origError=e,r.apply(this,[t,"_fix_for_ie_crossdomain__",n]))}}}),e("getResponseHeader",function(t){return function(e){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(e):null==t?null:t.apply(this,[e])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(r){return function(e,t){if("__setXHR_"===e){i(this);var n=t(this);n instanceof Function&&n(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[e]=t,r.apply(this,arguments)}}),e("send",function(o){return function(){var r=this;if(arguments[0]&&arguments[0].__isFileAPIShim){for(var e=arguments[0],t={url:r.__url,jsonp:!1,cache:!0,complete:function(e,t){e&&angular.isString(e)&&-1!==e.indexOf("#2174")&&(e=null),r.__completed=!0,!e&&r.__listeners.load&&r.__listeners.load({type:"load",loaded:r.__loaded,total:r.__total,target:r,lengthComputable:!0}),!e&&r.__listeners.loadend&&r.__listeners.loadend({type:"loadend",loaded:r.__loaded,total:r.__total,target:r,lengthComputable:!0}),"abort"===e&&r.__listeners.abort&&r.__listeners.abort({type:"abort",loaded:r.__loaded,total:r.__total,target:r,lengthComputable:!0}),void 0!==t.status&&a(r,"status",function(){return 0===t.status&&e&&"abort"!==e?500:t.status}),void 0!==t.statusText&&a(r,"statusText",function(){return t.statusText}),a(r,"readyState",function(){return 4}),void 0!==t.response&&a(r,"response",function(){return t.response});var n=t.responseText||(e&&0===t.status&&"abort"!==e?e:void 0);a(r,"responseText",function(){return n}),a(r,"response",function(){return n}),e&&a(r,"err",function(){return e}),r.__fileApiXHR=t,r.onreadystatechange&&r.onreadystatechange(),r.onload&&r.onload()},progress:function(e){if((e.target=r).__listeners.progress&&r.__listeners.progress(e),r.__total=e.total,r.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){r.__completed||(r.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:r.__requestHeaders,data:{},files:{}},n=0;n<e.data.length;n++){var i=e.data[n];null!=i.val&&null!=i.val.name&&null!=i.val.size&&null!=i.val.type?t.files[i.key]=i.val:t.data[i.key]=i.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';r.__fileApiXHR=FileAPI.upload(t)},1)}else{if(this.__origError)throw this.__origError;o.apply(r,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return!0}catch(e){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function o(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)for(;t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.hasFlash=e(),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var t,n,r,i,a,s=document.createElement("script"),l=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)t=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)n=window.FileAPI.jsPath;else for(r=0;r<l.length;r++)if(-1<(i=(a=l[r].src).search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/))){n=a.substring(0,i+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=n),s.setAttribute("src",t||n+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(s)}FileAPI.ngfFixIE=function(t,n,r){if(!e())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';t.bind("mouseenter",function(){var e=n.parent();t.attr("disabled")?e&&e.removeClass("js-fileapi-wrapper"):(n.attr("__ngf_flash_")||(n.unbind("change"),n.unbind("click"),n.bind("change",function(e){i.apply(this,[e]),r.apply(this,[e])}),n.attr("__ngf_flash_","true")),e.addClass("js-fileapi-wrapper"),function(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}(t)||(e.css("position","absolute").css("top",o(t[0]).top+"px").css("left",o(t[0]).left+"px").css("width",t[0].offsetWidth+"px").css("height",t[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",t.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),n.css("width",t[0].offsetWidth+"px").css("height",t[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))});var i=function(t){for(var e=FileAPI.getFiles(t),n=0;n<e.length;n++)void 0===e[n].size&&(e[n].size=0),void 0===e[n].name&&(e[n].name="file"),void 0===e[n].type&&(e[n].type="undefined");t.target||(t.target={}),t.target.files=e,t.target.files!==e&&(t.__files_=e),(t.__files_||t.target.files).item=function(e){return(t.__files_||t.target.files)[e]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var r=this,n=!1;this.listeners={},this.addEventListener=function(e,t){r.listeners[e]=r.listeners[e]||[],r.listeners[e].push(t)},this.removeEventListener=function(e,t){r.listeners[e]&&r.listeners[e].splice(r.listeners[e].indexOf(t),1)},this.dispatchEvent=function(e){var t=r.listeners[e.type];if(t)for(var n=0;n<t.length;n++)t[n].call(r,e)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;function i(e,t){var n={type:e,target:r,loaded:t.loaded,total:t.total,error:t.error};return null!=t.result&&(n.target.result=t.result),n}function t(e){var t;n||(n=!0,r.onloadstart&&r.onloadstart(i("loadstart",e))),"load"===e.type?(r.onloadend&&r.onloadend(i("loadend",e)),t=i("load",e),r.onload&&r.onload(t)):"progress"===e.type?(t=i("progress",e),r.onprogress&&r.onprogress(t)):(t=i("error",e),r.onerror&&r.onerror(t)),r.dispatchEvent(t)}this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,t)},this.readAsText=function(e){FileAPI.readAsText(e,t)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=(r=window.XMLHttpRequest.prototype.setRequestHeader,function(e,t){if("__setXHR_"===e){var n=t(this);n instanceof Function&&n(this)}else r.apply(this,arguments)}));var i=angular.module("ngFileUpload",[]);function a(r,e,i,o,a,s,l,u){function c(t){var n=r.attrGetter("ngfNoObjectUrl",a,i);r.dataUrl(t,n).finally(function(){e(function(){var e=(n?t.$ngfDataUrl:t.$ngfBlobUrl)||t.$ngfDataUrl;u?o.css("background-image","url('"+(e||"")+"')"):o.attr("src",e),e?o.removeClass("ng-hide"):o.addClass("ng-hide")})})}e(function(){var e=i.$watch(a[s],function(n){var e=l;if("ngfThumbnail"===s&&0===(e=e||{width:o[0].naturalWidth||o[0].clientWidth,height:o[0].naturalHeight||o[0].clientHeight}).width&&window.getComputedStyle){var t=getComputedStyle(o[0]);t.width&&-1<t.width.indexOf("px")&&t.height&&-1<t.height.indexOf("px")&&(e={width:parseInt(t.width.slice(0,-2)),height:parseInt(t.height.slice(0,-2))})}if(angular.isString(n))return o.removeClass("ng-hide"),u?o.css("background-image","url('"+n+"')"):o.attr("src",n);!n||!n.type||0!==n.type.search(function(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/./}(o[0]))||u&&0!==n.type.indexOf("image")?o.addClass("ng-hide"):e&&r.isResizeSupported()?(e.resizeIf=function(e,t){return r.attrGetter("ngfResizeIf",a,i,{$width:e,$height:t,$file:n})},r.resize(n,e).then(function(e){c(e)},function(e){throw e})):c(n)});i.$on("$destroy",function(){e()})})}function h(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}i.version="12.2.13",i.service("UploadBase",["$http","$q","$timeout",function(s,e,l){var u=this;u.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var c=this.isResumeSupported();function t(n){n.method=n.method||"POST",n.headers=n.headers||{};var r=n._deferred=n._deferred||e.defer(),i=r.promise;function o(e){r.notify&&r.notify(e),i.progressFunc&&l(function(){i.progressFunc(e)})}function t(e){return null!=n._start&&c?{loaded:e.loaded+n._start,total:n._file&&n._file.size||e.total,type:e.type,config:n,lengthComputable:!0,target:e.target}:e}function a(){s(n).then(function(e){if(c&&n._chunkSize&&!n._finished&&n._file){var t=n._file&&n._file.size||0;o({loaded:Math.min(n._end,t),total:t,config:n,type:"progress"}),u.upload(n,!0)}else n._finished&&delete n._finished,r.resolve(e)},function(e){r.reject(e)},function(e){r.notify(e)})}return n.disableProgress||(n.headers.__setXHR_=function(){return function(e){e&&e.upload&&e.upload.addEventListener&&(n.__XHR=e,n.xhrFn&&n.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=n,o(t(e))},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=n,o(t(e)))},!1))}}),c?n._chunkSize&&n._end&&!n._finished?(n._start=n._end,n._end+=n._chunkSize,a()):n.resumeSizeUrl?s.get(n.resumeSizeUrl).then(function(e){n.resumeSizeResponseReader?n._start=n.resumeSizeResponseReader(e.data):n._start=parseInt((null==e.data.size?e.data:e.data.size).toString()),n._chunkSize&&(n._end=n._start+n._chunkSize),a()},function(e){throw e}):n.resumeSize?n.resumeSize().then(function(e){n._start=e,n._chunkSize&&(n._end=n._start+n._chunkSize),a()},function(e){throw e}):(n._chunkSize&&(n._start=0,n._end=n._start+n._chunkSize),a()):a(),i.success=function(t){return i.then(function(e){t(e.data,e.status,e.headers,n)}),i},i.error=function(t){return i.then(null,function(e){t(e.data,e.status,e.headers,n)}),i},i.progress=function(t){return i.progressFunc=t,i.then(null,null,function(e){t(e)}),i},i.abort=i.pause=function(){return n.__XHR&&l(function(){n.__XHR.abort()}),i},i.xhr=function(e){var t;return n.xhrFn=(t=n.xhrFn,function(){t&&t.apply(i,arguments),e.apply(i,arguments)}),i},u.promisesCount++,i.finally&&i.finally instanceof Function&&i.finally(function(){u.promisesCount--}),i}function n(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}this.isUploadInProgress=function(){return 0<u.promisesCount},this.rename=function(e,t){return e.ngfName=t,e},this.jsonBlob=function(e){null==e||angular.isString(e)||(e=JSON.stringify(e));var t=new window.Blob([e],{type:"application/json"});return t._ngfBlob=!0,t},this.json=function(e){return angular.toJson(e)},this.isFile=function(e){return null!=e&&(e instanceof window.Blob||e.flashId&&e.name&&e.size)},this.upload=function(s,e){function l(e,t,n){if(void 0!==t)if(angular.isDate(t)&&(t=t.toISOString()),angular.isString(t))e.append(n,t);else if(u.isFile(t)){var r=function(e,t){if(e._ngfBlob)return e;if(s._file=s._file||e,null!=s._start&&c){s._end&&s._end>=e.size&&(s._finished=!0,s._end=e.size);var n=e.slice(s._start,s._end||e.size);return n.name=e.name,n.ngfName=e.ngfName,s._chunkSize&&(t.append("_chunkSize",s._chunkSize),t.append("_currentChunkSize",s._end-s._start),t.append("_chunkNumber",Math.floor(s._start/s._chunkSize)),t.append("_totalSize",s._file.size)),n}return e}(t,e),i=n.split(",");i[1]&&(r.ngfName=i[1].replace(/^\s+|\s+$/g,""),n=i[0]),s._fileKey=s._fileKey||n,e.append(n,r,r.ngfName||r.name)}else if(angular.isObject(t)){if(t.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+n;t.$$ngfCircularDetection=!0;try{for(var o in t)if(t.hasOwnProperty(o)&&"$$ngfCircularDetection"!==o){var a=null==s.objectKey?"[i]":s.objectKey;t.length&&-1<parseInt(o)&&(a=null==s.arrayKey?a:s.arrayKey),l(e,t[o],n+a.replace(/[ik]/g,o))}}finally{delete t.$$ngfCircularDetection}}else e.append(n,t)}return e||(s=n(s)),s._isDigested||(s._isDigested=!0,s._chunkSize=u.translateScalars(s.resumeChunkSize),s._chunkSize=s._chunkSize?parseInt(s._chunkSize.toString()):null,s.headers=s.headers||{},s.headers["Content-Type"]=void 0,s.transformRequest=s.transformRequest?angular.isArray(s.transformRequest)?s.transformRequest:[s.transformRequest]:[],s.transformRequest.push(function(e){var t,n=new window.FormData;for(t in e=e||s.fields||{},s.file&&(e.file=s.file),e)if(e.hasOwnProperty(t)){var r=e[t];s.formDataAppender?s.formDataAppender(n,t,r):l(n,r,t)}return n})),t(s)},this.http=function(e){return(e=n(e)).transformRequest=e.transformRequest||function(e){return window.ArrayBuffer&&e instanceof window.ArrayBuffer||e instanceof window.Blob?e:s.defaults.transformRequest[0].apply(this,arguments)},e._chunkSize=u.translateScalars(e.resumeChunkSize),e._chunkSize=e._chunkSize?parseInt(e._chunkSize.toString()):null,t(e)},this.translateScalars=function(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1024*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1048576*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1073741824*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e},this.urlToBlob=function(o){var a=e.defer();return s({url:o,method:"get",responseType:"arraybuffer"}).then(function(e){var t=new Uint8Array(e.data),n=e.headers("content-type")||"image/WebP",r=new window.Blob([t],{type:n}),i=o.match(/.*\/(.+?)(\?.*)?$/);1<i.length&&(r.name=i[1]),a.resolve(r)},function(e){a.reject(e)}),a.promise},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=i.version}]),i.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function($,w,e,C,t){var E=t;function S(r,i,o,a,s){var l=[E.emptyPromise()];function e(n,t){if(0===n.type.indexOf("image")){if(r.pattern&&!E.validatePattern(n,r.pattern))return;r.resizeIf=function(e,t){return E.attrGetter("ngfResizeIf",o,a,{$width:e,$height:t,$file:n})};var e=E.resize(n,r);l.push(e),e.then(function(e){i.splice(t,1,e)},function(e){n.$error="resize",(n.$errorMessages=n.$errorMessages||{}).resize=!0,n.$errorParam=(e?(e.message?e.message:e)+": ":"")+(n&&n.name),s.$ngfValidations.push({name:"resize",valid:!1}),E.applyModelValidation(s,i)})}}for(var t=0;t<i.length;t++)e(i[t],t);return C.all(l)}return E.getAttrWithDefaults=function(e,t){if(null!=e[t])return e[t];var n=E.defaults[t];return null==n?n:angular.isString(n)?n:JSON.stringify(n)},E.attrGetter=function(t,e,n,r){var i=this.getAttrWithDefaults(e,t);if(!n)return i;try{return r?$(i)(n,r):$(i)(n)}catch(e){if(t.search(/min|max|pattern/i))return i;throw e}},E.shouldUpdateOn=function(e,t,n){var r=E.attrGetter("ngfModelOptions",t,n);return!r||!r.updateOn||-1<r.updateOn.split(" ").indexOf(e)},E.emptyPromise=function(){var e=C.defer(),t=arguments;return w(function(){e.resolve.apply(e,t)}),e.promise},E.rejectPromise=function(){var e=C.defer(),t=arguments;return w(function(){e.reject.apply(e,t)}),e.promise},E.happyPromise=function(e,t){var n=C.defer();return e.then(function(e){n.resolve(e)},function(e){w(function(){throw e}),n.resolve(t)}),n.promise},E.updateModel=function(l,u,c,d,o,f,t){function n(e,t,n,r,i){u.$$ngfPrevValidFiles=e,u.$$ngfPrevInvalidFiles=t;var o=e&&e.length?e[0]:null,a=t&&t.length?t[0]:null;l&&(E.applyModelValidation(l,e),l.$setViewValue(i?o:e)),d&&$(d)(c,{$files:e,$file:o,$newFiles:n,$duplicateFiles:r,$invalidFiles:t,$invalidFile:a,$event:f});var s=E.attrGetter("ngfModelInvalid",u);s&&w(function(){$(s).assign(c,i?a:t)}),w(function(){})}var a,s,h,e,p=[],m=[],g=[];function r(){function r(){w(function(){n(v?s.concat(g):g,v?h.concat(m):m,o,p,y)},x&&x.debounce?x.debounce.change||x.debounce:0)}var i=b?a:g;(function(t,n,r,i){var e=E.attrGetter("ngfResize",n,r);if(!e||!E.isResizeSupported()||!t.length)return E.emptyPromise();if(e instanceof Function){var o=C.defer();return e(t).then(function(e){S(e,t,n,r,i).then(function(e){o.resolve(e)},function(e){o.reject(e)})},function(e){o.reject(e)})}return S(e,t,n,r,i)})(i,u,c,l).then(function(){b?E.validate(a,v?s.length:0,l,u,c).then(function(e){g=e.validsFiles,m=e.invalidsFiles,r()}):r()},function(){for(var e=0;e<i.length;e++){var t=i[e];if("resize"===t.$error){var n=g.indexOf(t);-1<n&&(g.splice(n,1),m.push(t)),r()}}})}s=u.$$ngfPrevValidFiles||[],h=u.$$ngfPrevInvalidFiles||[],l&&l.$modelValue&&(e=l.$modelValue,s=angular.isArray(e)?e:[e]);var v=E.attrGetter("ngfKeep",u,c);a=(o||[]).slice(0),"distinct"!==v&&!0!==E.attrGetter("ngfKeepDistinct",u,c)||function(){function n(e,t){return e.name===t.name&&(e.$ngfOrigSize||e.size)===(t.$ngfOrigSize||t.size)&&e.type===t.type}function e(e){var t;for(t=0;t<s.length;t++)if(n(e,s[t]))return!0;for(t=0;t<h.length;t++)if(n(e,h[t]))return!0;return!1}if(o){a=[],p=[];for(var t=0;t<o.length;t++)e(o[t])?p.push(o[t]):a.push(o[t])}}();var y=!v&&!E.attrGetter("ngfMultiple",u,c)&&!E.attrGetter("multiple",u);if(!v||a.length){E.attrGetter("ngfBeforeModelChange",u,c,{$files:o,$file:o&&o.length?o[0]:null,$newFiles:a,$duplicateFiles:p,$event:f});var b=E.attrGetter("ngfValidateAfterResize",u,c),x=E.attrGetter("ngfModelOptions",u,c);E.validate(a,v?s.length:0,l,u,c).then(function(e){t?n(a,[],o,p,y):(x&&x.allowInvalid||b?g=a:(g=e.validFiles,m=e.invalidFiles),E.attrGetter("ngfFixOrientation",u,c)&&E.isExifSupported()?function(n,r,i){var o=[E.emptyPromise()];return angular.forEach(n,function(e,t){0===e.type.indexOf("image/jpeg")&&E.attrGetter("ngfFixOrientation",r,i,{$file:e})&&o.push(E.happyPromise(E.applyExifRotation(e),e).then(function(e){n.splice(t,1,e)}))}),C.all(o)}(g,u,c).then(function(){r()}):r())})}},E}]),i.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(e,i,t,v){var y=[];function o(i,o,a,s,e,t,n,l){var r=function(e,t){return l.attrGetter(e,a,t)};function u(){return"input"===o[0].tagName.toLowerCase()&&a.type&&"file"===a.type.toLowerCase()}function c(){return r("ngfChange")||r("ngfSelect")}function d(e){if(l.shouldUpdateOn("change",a,i)){var t=e.__files_||e.target&&e.target.files,n=[];if(!t)return;for(var r=0;r<t.length;r++)n.push(t[r]);l.updateModel(s,a,i,c(),n.length?n:null,e)}}l.registerModelChangeValidator(s,a,i);var f=[];r("ngfMultiple")&&f.push(i.$watch(r("ngfMultiple"),function(){m.attr("multiple",r("ngfMultiple",i))})),r("ngfCapture")&&f.push(i.$watch(r("ngfCapture"),function(){m.attr("capture",r("ngfCapture",i))})),r("ngfAccept")&&f.push(i.$watch(r("ngfAccept"),function(){m.attr("accept",r("ngfAccept",i))})),f.push(a.$observe("accept",function(){m.attr("accept",r("accept"))}));var h=0,p=0;var m=o;function g(e){l.shouldUpdateOn("click",a,i)&&m.val()&&(m.val(null),l.updateModel(s,a,i,c(),null,e,!0))}u()||(m=function(){if(u())return o;var e=angular.element('<input type="file">'),t=angular.element("<label>upload</label>");return t.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),function(t,n){function e(e){t.attr("id","ngf-"+e),n.attr("id","ngf-label-"+e)}for(var r=0;r<o[0].attributes.length;r++){var i=o[0].attributes[r];"type"!==i.name&&"class"!==i.name&&"style"!==i.name&&("id"===i.name?(e(i.value),f.push(a.$observe("id",e))):t.attr(i.name,i.value||"required"!==i.name&&"multiple"!==i.name?i.value:i.name))}}(e,t),y.push({el:o,ref:t}),document.body.appendChild(t.append(e)[0]),e}()),m.bind("change",d),u()?o.bind("click",g):o.bind("click touchstart touchend",function(e){if(o.attr("disabled"))return!1;if(!r("ngfSelectDisabled",i)){var t=function(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if(t){if("touchstart"===e.type)return p=t[0].clientX,h=t[0].clientY,!0;if("touchend"===e.type){var n=t[0].clientX,r=t[0].clientY;if(20<Math.abs(n-p)||20<Math.abs(r-h))return e.stopPropagation(),e.preventDefault(),!1}return!0}}(e);if(null!=t)return t;g(e);try{u()||document.body.contains(m[0])||(y.push({el:o,ref:m.parent()}),document.body.appendChild(m.parent()[0]),m.bind("change",d))}catch(e){}return!function(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&2<t.length){var n=v.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return-1===e.indexOf("Chrome")&&/.*Windows.*Safari.*/.test(e)}(navigator.userAgent)?m[0].click():setTimeout(function(){m[0].click()},0),!1}}),-1!==navigator.appVersion.indexOf("MSIE 10")&&m.bind("click",function e(t){if(m&&!m.attr("__ngf_ie10_Fix_")){if(!m[0].parentNode)return void(m=null);t.preventDefault(),t.stopPropagation(),m.unbind("click");var n=m.clone();return m.replaceWith(n),(m=n).attr("__ngf_ie10_Fix_","true"),m.bind("change",d),m.bind("click",e),m[0].click(),!1}m.removeAttr("__ngf_ie10_Fix_")}),s&&s.$formatters.push(function(e){return null!=e&&0!==e.length||m.val()&&m.val(null),e}),i.$on("$destroy",function(){u()||m.parent().remove(),angular.forEach(f,function(e){e()})}),t(function(){for(var e=0;e<y.length;e++){var t=y[e];document.body.contains(t.el[0])||(y.splice(e,1),t.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(o,m,d)}return{restrict:"AEC",require:"?ngModel",link:function(e,t,n,r){o(e,t,n,r,0,i,0,v)}}}]),i.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,n,s){var l=e;return l.base64DataUrl=function(n){if(angular.isArray(n)){var r=s.defer(),i=0;return angular.forEach(n,function(e){l.dataUrl(e,!0).finally(function(){if(++i===n.length){var t=[];angular.forEach(n,function(e){t.push(e.$ngfDataUrl)}),r.resolve(t,n)}})}),r.promise}return l.dataUrl(n,!0)},l.dataUrl=function(o,t){if(!o)return l.emptyPromise(o,o);if(t&&null!=o.$ngfDataUrl||!t&&null!=o.$ngfBlobUrl)return l.emptyPromise(t?o.$ngfDataUrl:o.$ngfBlobUrl,o);var e=t?o.$$ngfDataUrlPromise:o.$$ngfBlobUrlPromise;if(e)return e;var a=s.defer();return n(function(){if(window.FileReader&&o&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 8")||o.size<2e4)&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 9")||o.size<4e6)){var r=window.URL||window.webkitURL;if(r&&r.createObjectURL&&!t){var i;try{i=r.createObjectURL(o)}catch(e){return void n(function(){o.$ngfBlobUrl="",a.reject()})}n(function(){if(o.$ngfBlobUrl=i){a.resolve(i,o),l.blobUrls=l.blobUrls||[],l.blobUrlsTotalSize=l.blobUrlsTotalSize||0,l.blobUrls.push({url:i,size:o.size}),l.blobUrlsTotalSize+=o.size||0;for(var e=l.defaults.blobUrlsMaxMemory||268435456,t=l.defaults.blobUrlsMaxQueueSize||200;(l.blobUrlsTotalSize>e||l.blobUrls.length>t)&&1<l.blobUrls.length;){var n=l.blobUrls.splice(0,1)[0];r.revokeObjectURL(n.url),l.blobUrlsTotalSize-=n.size}}})}else{var e=new FileReader;e.onload=function(e){n(function(){o.$ngfDataUrl=e.target.result,a.resolve(e.target.result,o),n(function(){delete o.$ngfDataUrl},1e3)})},e.onerror=function(){n(function(){o.$ngfDataUrl="",a.reject()})},e.readAsDataURL(o)}}else n(function(){o[t?"$ngfDataUrl":"$ngfBlobUrl"]="",a.reject()})}),(e=t?o.$$ngfDataUrlPromise=a.promise:o.$$ngfBlobUrlPromise=a.promise).finally(function(){delete o[t?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),e},l}]),i.directive("ngfSrc",["Upload","$timeout",function(r,i){return{restrict:"AE",link:function(e,t,n){a(r,i,e,t,n,"ngfSrc",r.attrGetter("ngfResize",n,e),!1)}}}]),i.directive("ngfBackground",["Upload","$timeout",function(r,i){return{restrict:"AE",link:function(e,t,n){a(r,i,e,t,n,"ngfBackground",r.attrGetter("ngfResize",n,e),!0)}}}]),i.directive("ngfThumbnail",["Upload","$timeout",function(i,o){return{restrict:"AE",link:function(e,t,n){var r=i.attrGetter("ngfSize",n,e);a(i,o,e,t,n,"ngfThumbnail",r,i.attrGetter("ngfAsBackground",n,e))}}}]),i.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),i.filter("ngfDataUrl",["UploadDataUrl","$sce",function(i,o){return function(e,t,n){if(angular.isString(e))return o.trustAsResourceUrl(e);var r=e&&((t?e.$ngfDataUrl:e.$ngfBlobUrl)||e.$ngfDataUrl);return e&&!r?(!e.$ngfDataUrlFilterInProgress&&angular.isObject(e)&&(e.$ngfDataUrlFilterInProgress=!0,i.dataUrl(e,t)),""):(e&&delete e.$ngfDataUrlFilterInProgress,(e&&r?n?o.trustAsResourceUrl(r):r:e)||"")}}]),i.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(e,v,s){var y=e;return y.validatePattern=function(e,t){if(!t)return!0;var n=function e(t){var n="",r=[];if(2<t.length&&"/"===t[0]&&"/"===t[t.length-1])n=t.substring(1,t.length-1);else{var i=t.split(",");if(1<i.length)for(var o=0;o<i.length;o++){var a=e(i[o]);a.regexp?(n+="("+a.regexp+")",o<i.length-1&&(n+="|")):r=r.concat(a.excludes)}else 0===t.indexOf("!")?r.push("^((?!"+e(t.substring(1)).regexp+").)*$"):(0===t.indexOf(".")&&(t="*"+t),n=(n="^"+t.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$").replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:n,excludes:r}}(t),r=!0;if(n.regexp&&n.regexp.length){var i=new RegExp(n.regexp,"i");r=null!=e.type&&i.test(e.type)||null!=e.name&&i.test(e.name)}for(var o=n.excludes.length;o--;){var a=new RegExp(n.excludes[o],"i");r=r&&(null==e.type||a.test(e.type))&&(null==e.name||a.test(e.name))}return r},y.ratioToFloat=function(e){var t=e.toString(),n=t.search(/[x:]/i);return t=-1<n?parseFloat(t.substring(0,n))/parseFloat(t.substring(n+1)):parseFloat(t)},y.registerModelChangeValidator=function(n,r,i){n&&n.$formatters.push(function(e){if(n.$dirty){var t=e;e&&!angular.isArray(e)&&(t=[e]),y.validate(t,0,n,r,i).then(function(){y.applyModelValidation(n,t)})}return e})},y.applyModelValidation=function(t,e){!function(e,t){null==t||e.$dirty||(e.$setDirty?e.$setDirty():e.$dirty=!0)}(t,e),angular.forEach(t.$ngfValidations,function(e){t.$setValidity(e.name,e.valid)})},y.getValidationAttr=function(e,t,n,r,i){var o="ngf"+n[0].toUpperCase()+n.substr(1),a=y.attrGetter(o,e,t,{$file:i});if(null==a&&(a=y.attrGetter("ngfValidate",e,t,{$file:i}))){var s=(r||n).split(".");a=a[s[0]],1<s.length&&(a=a&&a[s[1]])}return a},y.validate=function(u,r,c,d,f){(c=c||{}).$ngfValidations=c.$ngfValidations||[],angular.forEach(c.$ngfValidations,function(e){e.valid=!0});var h=function(e,t){return y.attrGetter(e,d,f,t)},p=(y.attrGetter("ngfIgnoreInvalid",d,f)||"").split(" "),m=y.attrGetter("ngfRunAllValidations",d,f);if(null==u||0===u.length)return y.emptyPromise({validFiles:u,invalidFiles:[]});u=void 0===u.length?[u]:u.slice(0);var g=[];function t(e,t,n){if(u){for(var r=u.length,i=null;r--;){var o=u[r];if(o){var a=y.getValidationAttr(d,f,e,t,o);null!=a&&(n(o,a,r)||(-1===p.indexOf(e)?(o.$error=e,(o.$errorMessages=o.$errorMessages||{})[e]=!0,o.$errorParam=a,-1===g.indexOf(o)&&g.push(o),m||u.splice(r,1),i=!1):u.splice(r,1)))}}null!==i&&c.$ngfValidations.push({name:e,valid:i})}}t("pattern",null,y.validatePattern),t("minSize","size.min",function(e,t){return e.size+.1>=y.translateScalars(t)}),t("maxSize","size.max",function(e,t){return e.size-.1<=y.translateScalars(t)});var n=0;if(t("maxTotalSize",null,function(e,t){return!((n+=e.size)>y.translateScalars(t))||(u.splice(0,u.length),!1)}),t("validateFn",null,function(e,t){return!0===t||null===t||""===t}),!u.length)return y.emptyPromise({validFiles:[],invalidFiles:g});function e(a,e,r,n,s){function i(r,i,o){function t(e){if(e())if(-1===p.indexOf(a)){if(i.$error=a,(i.$errorMessages=i.$errorMessages||{})[a]=!0,i.$errorParam=o,-1===g.indexOf(i)&&g.push(i),!m){var t=u.indexOf(i);-1<t&&u.splice(t,1)}r.resolve(!1)}else{var n=u.indexOf(i);-1<n&&u.splice(n,1),r.resolve(!0)}else r.resolve(!0)}null!=o?n(i,o).then(function(e){t(function(){return!s(e,o)})},function(){t(function(){return h("ngfValidateForce",{$file:i})})}):r.resolve(!0)}var o=[y.emptyPromise(!0)];u&&(u=void 0===u.length?[u]:u,angular.forEach(u,function(t){var n=v.defer();o.push(n.promise),!r||null!=t.type&&0===t.type.search(r)?"dimensions"===a&&null!=y.attrGetter("ngfDimensions",d)?y.imageDimensions(t).then(function(e){i(n,t,h("ngfDimensions",{$file:t,$width:e.width,$height:e.height}))},function(){n.resolve(!1)}):"duration"===a&&null!=y.attrGetter("ngfDuration",d)?y.mediaDuration(t).then(function(e){i(n,t,h("ngfDuration",{$file:t,$duration:e}))},function(){n.resolve(!1)}):i(n,t,y.getValidationAttr(d,f,a,e,t)):n.resolve(!0)}));var l=v.defer();return v.all(o).then(function(e){for(var t=!0,n=0;n<e.length;n++)if(!e[n]){t=!1;break}c.$ngfValidations.push({name:a,valid:t}),l.resolve(t)}),l.promise}var i=v.defer(),o=[];return o.push(e("maxHeight","height.max",/image/,this.imageDimensions,function(e,t){return e.height<=t})),o.push(e("minHeight","height.min",/image/,this.imageDimensions,function(e,t){return e.height>=t})),o.push(e("maxWidth","width.max",/image/,this.imageDimensions,function(e,t){return e.width<=t})),o.push(e("minWidth","width.min",/image/,this.imageDimensions,function(e,t){return e.width>=t})),o.push(e("dimensions",null,/image/,function(e,t){return y.emptyPromise(t)},function(e){return e})),o.push(e("ratio",null,/image/,this.imageDimensions,function(e,t){for(var n=t.toString().split(","),r=!1,i=0;i<n.length;i++)Math.abs(e.width/e.height-y.ratioToFloat(n[i]))<.01&&(r=!0);return r})),o.push(e("maxRatio","ratio.max",/image/,this.imageDimensions,function(e,t){return e.width/e.height-y.ratioToFloat(t)<1e-4})),o.push(e("minRatio","ratio.min",/image/,this.imageDimensions,function(e,t){return-1e-4<e.width/e.height-y.ratioToFloat(t)})),o.push(e("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(e,t){return e<=y.translateScalars(t)})),o.push(e("minDuration","duration.min",/audio|video/,this.mediaDuration,function(e,t){return e>=y.translateScalars(t)})),o.push(e("duration",null,/audio|video/,function(e,t){return y.emptyPromise(t)},function(e){return e})),o.push(e("validateAsyncFn",null,null,function(e,t){return t},function(e){return!0===e||null===e||""===e})),v.all(o).then(function(){if(m)for(var e=0;e<u.length;e++){u[e].$error&&u.splice(e--,1)}m=!1,t("maxFiles",null,function(e,t,n){return r+n<t}),i.resolve({validFiles:u,invalidFiles:g})}),i.promise},y.imageDimensions=function(o){if(o.$ngfWidth&&o.$ngfHeight){var e=v.defer();return s(function(){e.resolve({width:o.$ngfWidth,height:o.$ngfHeight})}),e.promise}if(o.$ngfDimensionPromise)return o.$ngfDimensionPromise;var a=v.defer();return s(function(){0===o.type.indexOf("image")?y.dataUrl(o).then(function(e){var n=angular.element("<img>").attr("src",e).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");function t(){var e=n[0].naturalWidth||n[0].clientWidth,t=n[0].naturalHeight||n[0].clientHeight;n.remove(),o.$ngfWidth=e,o.$ngfHeight=t,a.resolve({width:e,height:t})}function r(){n.remove(),a.reject("load error")}n.on("load",t),n.on("error",r);var i=0;!function e(){s(function(){n[0].parentNode&&(n[0].clientWidth?t():10<i++?r():e())},1e3)}(),angular.element(document.getElementsByTagName("body")[0]).append(n)},function(){a.reject("load error")}):a.reject("not image")}),o.$ngfDimensionPromise=a.promise,o.$ngfDimensionPromise.finally(function(){delete o.$ngfDimensionPromise}),o.$ngfDimensionPromise},y.mediaDuration=function(o){if(o.$ngfDuration){var e=v.defer();return s(function(){e.resolve(o.$ngfDuration)}),e.promise}if(o.$ngfDurationPromise)return o.$ngfDurationPromise;var a=v.defer();return s(function(){0===o.type.indexOf("audio")||0===o.type.indexOf("video")?y.dataUrl(o).then(function(e){var t=angular.element(0===o.type.indexOf("audio")?"<audio>":"<video>").attr("src",e).css("visibility","none").css("position","fixed");function n(){var e=t[0].duration;o.$ngfDuration=e,t.remove(),a.resolve(e)}function r(){t.remove(),a.reject("load error")}t.on("loadedmetadata",n),t.on("error",r);var i=0;!function e(){s(function(){t[0].parentNode&&(t[0].duration?n():10<i?r():e())},1e3)}(),angular.element(document.body).append(t)},function(){a.reject("load error")}):a.reject("not media")}),o.$ngfDurationPromise=a.promise,o.$ngfDurationPromise.finally(function(){delete o.$ngfDurationPromise}),o.$ngfDurationPromise},y}]),i.service("UploadResize",["UploadValidate","$q",function(e,t){function a(e,i,o,a,s,l,u,c){var d=t.defer(),f=document.createElement("canvas"),h=document.createElement("img");return h.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(h),h.onload=function(){var e=h.width,t=h.height;if(h.parentNode.removeChild(h),null==c||!1!==c(e,t))try{if(l){var n=p.ratioToFloat(l);e/t<n?o=(i=e)/n:i=(o=t)*n}var r=function(e,t,n,r,i){var o=i?Math.max(n/e,r/t):Math.min(n/e,r/t);return{width:e*o,height:t*o,marginX:e*o-n,marginY:t*o-r}}(e,t,i=i||e,o=o||t,u);f.width=Math.min(r.width,i),f.height=Math.min(r.height,o),f.getContext("2d").drawImage(h,Math.min(0,-r.marginX/2),Math.min(0,-r.marginY/2),r.width,r.height),d.resolve(f.toDataURL(s||"image/WebP",a||.934))}catch(e){d.reject(e)}else d.reject("resizeIf")},h.onerror=function(){h.parentNode.removeChild(h),d.reject()},h.src=e,d.promise}var p=e;return p.dataUrltoBlob=function(e,t,n){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var l=new window.Blob([s],{type:i});return l.name=t,l.$ngfOrigSize=n,l},p.isResizeSupported=function(){var e=document.createElement("canvas");return window.atob&&e.getContext&&e.getContext("2d")&&window.Blob},p.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(e){this.$ngfName=e},configurable:!0}),p.resize=function(r,i){if(0!==r.type.indexOf("image"))return p.emptyPromise(r);var o=t.defer();return p.dataUrl(r,!0).then(function(n){a(n,i.width,i.height,i.quality,i.type||r.type,i.ratio,i.centerCrop,i.resizeIf).then(function(e){if("image/jpeg"===r.type&&!1!==i.restoreExif)try{e=p.restoreExif(n,e)}catch(e){setTimeout(function(){throw e},1)}try{var t=p.dataUrltoBlob(e,r.name,r.size);o.resolve(t)}catch(e){o.reject(e)}},function(e){"resizeIf"===e&&o.resolve(r),o.reject(e)})},function(e){o.reject(e)}),o.promise},p}]),i.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(i,o,a,s,e,l){return{restrict:"AEC",require:"?ngModel",link:function(e,t,n,r){!function(v,n,y,r,e,i,b,x,t,$){var o=h(),w=function(e,t,n){return x.attrGetter(e,y,t,n)};if(w("dropAvailable")&&i(function(){v[w("dropAvailable")]?v[w("dropAvailable")].value=o:v[w("dropAvailable")]=o}),!o)return!0===w("ngfHideOnDropNotAvailable",v)&&n.css("display","none");function a(){return n.attr("disabled")||w("ngfDropDisabled",v)}null==w("ngfSelect")&&x.registerModelChangeValidator(r,y,v);var s,l=null,u=e(w("ngfStopPropagation")),c=1;function d(e,t,n){if(e){var r;try{r=e&&e.getData&&e.getData("text/html")}catch(e){}(function(e,t,n,r){var l=x.getValidationAttr(y,v,"maxFiles");null==l&&(l=Number.MAX_VALUE);var u=x.getValidationAttr(y,v,"maxTotalSize");null==u&&(u=Number.MAX_VALUE);var c=w("ngfIncludeDir",v),d=[],f=0;function h(t,n){var r=$.defer();if(null!=t)if(t.isDirectory){var i=[x.emptyPromise()];if(c){var e={type:"directory"};e.name=e.path=(n||"")+t.name,d.push(e)}var o=t.createReader(),a=[],s=function(){o.readEntries(function(e){try{e.length?(a=a.concat(Array.prototype.slice.call(e||[],0)),s()):(angular.forEach(a.slice(0),function(e){d.length<=l&&f<=u&&i.push(h(e,(n||"")+t.name+"/"))}),$.all(i).then(function(){r.resolve()},function(e){r.reject(e)}))}catch(e){r.reject(e)}},function(e){r.reject(e)})};s()}else t.file(function(e){try{e.path=(n||"")+e.name,c&&(e=x.rename(e,e.path)),d.push(e),f+=e.size,r.resolve()}catch(e){r.reject(e)}},function(e){r.reject(e)});return r.promise}var i=[x.emptyPromise()];if(e&&0<e.length&&"file:"!==b.location.protocol)for(var o=0;o<e.length;o++){if(e[o].webkitGetAsEntry&&e[o].webkitGetAsEntry()&&e[o].webkitGetAsEntry().isDirectory){var a=e[o].webkitGetAsEntry();if(a.isDirectory&&!n)continue;null!=a&&i.push(h(a))}else{var s=e[o].getAsFile();null!=s&&(d.push(s),f+=s.size)}if(d.length>l||u<f||!r&&0<d.length)break}else if(null!=t)for(var p=0;p<t.length;p++){var m=t.item(p);if((m.type||0<m.size)&&(d.push(m),f+=m.size),d.length>l||u<f||!r&&0<d.length)break}var g=$.defer();return $.all(i).then(function(){if(r||c||!d.length)g.resolve(d);else{for(var e=0;d[e]&&"directory"===d[e].type;)e++;g.resolve([d[e]])}},function(e){g.reject(e)}),g.promise})(e.items,e.files,!1!==w("ngfAllowDir",v),w("multiple")||w("ngfMultiple",v)).then(function(e){e.length?f(e,t):function(e,t){if(!x.shouldUpdateOn(e,y,v)||"string"!=typeof t)return x.rejectPromise([]);var r=[];t.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(e,t,n){r.push(n)});var n=[],i=[];if(r.length){angular.forEach(r,function(e){n.push(x.urlToBlob(e).then(function(e){i.push(e)}))});var o=$.defer();return $.all(n).then(function(){o.resolve(i)},function(e){o.reject(e)}),o.promise}return x.emptyPromise()}(n,r).then(function(e){f(e,t)})})}}function f(e,t){x.updateModel(r,y,v,w("ngfChange")||w("ngfDrop"),e,t)}n[0].addEventListener("dragover",function(t){if(!a()&&x.shouldUpdateOn("drop",y,v)){if(t.preventDefault(),u(v)&&t.stopPropagation(),-1<navigator.userAgent.indexOf("Chrome")){var e=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===e||"linkMove"===e?"move":"copy"}i.cancel(l),s||(s="C",function(e,t,n,r){var i=w("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(c=i.delay),i.accept||i.reject)){var a=n.dataTransfer.items;if(null!=a&&a.length)for(var s=i.pattern||w("ngfPattern",e,{$event:n}),l=a.length;l--;){if(!x.validatePattern(a[l],s)){o=i.reject;break}o=i.accept}else o=i.accept}r(o)}(v,0,t,function(e){s=e,n.addClass(s),w("ngfDrag",v,{$isDragging:!0,$class:s,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(e){!a()&&x.shouldUpdateOn("drop",y,v)&&(e.preventDefault(),u(v)&&e.stopPropagation())},!1),n[0].addEventListener("dragleave",function(e){!a()&&x.shouldUpdateOn("drop",y,v)&&(e.preventDefault(),u(v)&&e.stopPropagation(),l=i(function(){s&&n.removeClass(s),s=null,w("ngfDrag",v,{$isDragging:!1,$event:e})},c||100))},!1),n[0].addEventListener("drop",function(e){!a()&&x.shouldUpdateOn("drop",y,v)&&(e.preventDefault(),u(v)&&e.stopPropagation(),s&&n.removeClass(s),s=null,d(e.dataTransfer,e,"dropUrl"))},!1),n[0].addEventListener("paste",function(e){-1<navigator.userAgent.toLowerCase().indexOf("firefox")&&w("ngfEnableFirefoxPaste",v)&&e.preventDefault(),!a()&&x.shouldUpdateOn("paste",y,v)&&d(e.clipboardData||e.originalEvent.clipboardData,e,"pasteUrl")},!1),-1<navigator.userAgent.toLowerCase().indexOf("firefox")&&w("ngfEnableFirefoxPaste",v)&&(n.attr("contenteditable",!0),n.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}(e,t,n,r,i,o,a,s,0,l)}}}]),i.directive("ngfNoFileDrop",function(){return function(e,t){h()&&t.css("display","none")}}),i.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(i,o,a){return function(e,t,n){if(h()){var r=i(a.attrGetter("ngfDropAvailable",n));o(function(){r(e),r.assign&&r.assign(e,!0)})}}}]),i.service("UploadExif",["UploadResize","$q",function(e,r){var l=e;return l.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&l.isResizeSupported()},l.readOrientation=function(e){var c=r.defer(),t=new FileReader,n=e.slice?e.slice(0,65536):e;return t.readAsArrayBuffer(n),t.onerror=function(e){return c.reject(e)},t.onload=function(e){var t={orientation:1},n=new DataView(this.result);if(65496!==n.getUint16(0,!1))return c.resolve(t);for(var r=n.byteLength,i=2;i<r;){var o=n.getUint16(i,!1);if(i+=2,65505===o){if(1165519206!==n.getUint32(i+=2,!1))return c.resolve(t);var a=18761===n.getUint16(i+=6,!1);i+=n.getUint32(i+4,a);var s=n.getUint16(i,a);i+=2;for(var l=0;l<s;l++)if(274===n.getUint16(i+12*l,a)){var u=n.getUint16(i+12*l+8,a);return 2<=u&&u<=8&&(n.setUint16(i+12*l+8,1,a),t.fixedArrayBuffer=e.target.result),t.orientation=u,c.resolve(t)}}else{if(65280!=(65280&o))break;i+=n.getUint16(i,!1)}}return c.resolve(t)},c.promise},l.applyExifRotation=function(a){if(0!==a.type.indexOf("image/jpeg"))return l.emptyPromise(a);var s=r.defer();return l.readOrientation(a).then(function(o){if(o.orientation<2||8<o.orientation)return s.resolve(a);l.dataUrl(a,!0).then(function(e){var r=document.createElement("canvas"),i=document.createElement("img");i.onload=function(){try{r.width=4<o.orientation?i.height:i.width,r.height=4<o.orientation?i.width:i.height;var e=r.getContext("2d");!function(e,t,n,r){switch(t){case 2:return e.transform(-1,0,0,1,n,0);case 3:return e.transform(-1,0,0,-1,n,r);case 4:return e.transform(1,0,0,-1,0,r);case 5:return e.transform(0,1,1,0,0,0);case 6:return e.transform(0,1,-1,0,r,0);case 7:return e.transform(0,-1,-1,0,r,n);case 8:e.transform(0,-1,1,0,0,n)}}(e,o.orientation,i.width,i.height),e.drawImage(i,0,0);var t=r.toDataURL(a.type||"image/WebP",.934);t=l.restoreExif(function(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}(o.fixedArrayBuffer),t);var n=l.dataUrltoBlob(t,a.name);s.resolve(n)}catch(e){return s.reject(e)}},i.onerror=function(){s.reject()},i.src=e},function(e){s.reject(e)})},function(e){s.reject(e)}),s.promise},l.restoreExif=function(e,t){var n={KEY_STR:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode64:function(e){for(var t,n,r,i,o,a="",s="",l="",u=0;r=(t=e[u++])>>2,i=(3&t)<<4|(n=e[u++])>>4,o=(15&n)<<2|(s=e[u++])>>6,l=63&s,isNaN(n)?o=l=64:isNaN(s)&&(l=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(l),t=n=s="",r=i=o=l="",u<e.length;);return a},restore:function(e,t){e.match("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,",""));var n=this.decode64(e),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,"+this.encode64(i)},exifManipulation:function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)},getExifArray:function(e){for(var t,n=0;n<e.length;n++)if(255===(t=e[n])[0]&225===t[1])return t;return[]},insertExif:function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=(s=s.concat(t)).concat(a)},slice2Segments:function(e){for(var t=0,n=[];!(255===e[t]&218===e[t+1]);){if(255===e[t]&216===e[t+1])t+=2;else{var r=t+(256*e[t+2]+e[t+3])+2,i=e.slice(t,r);n.push(i),t=r}if(t>e.length)break}return n},decode64:function(e){var t,n,r,i,o="",a="",s=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(s++))<<2|(r=this.KEY_STR.indexOf(e.charAt(s++)))>>4,n=(15&r)<<4|(i=this.KEY_STR.indexOf(e.charAt(s++)))>>2,o=(3&i)<<6|(a=this.KEY_STR.indexOf(e.charAt(s++))),l.push(t),64!==i&&l.push(n),64!==a&&l.push(o),t=n=o="",r=i=a="",s<e.length;);return l}};return n.restore(e,t)},l}])},{}],6:[function(e,t,n){e("./dist/ng-file-upload-all"),t.exports="ngFileUpload"},{"./dist/ng-file-upload-all":5}],7:[function(n,e,t){!function(){"use strict";var e=angular.module("ngNotie",[]),t=n("notie");e.service("notie",["$rootScope",function(e){this.alert=function(){var e=[].slice.call(arguments,0);t.alert.apply(void 0,e)},this.confirm=function(){var e=[].slice.call(arguments,0);t.confirm.apply(void 0,e)},this.input=function(){var e=[].slice.call(arguments,0);t.input.apply(void 0,e)}}])}()},{notie:8}],8:[function(e,t,n){var r=function(){function e(e){window.innerWidth<=600?e.style.fontSize=i:e.style.fontSize=a}function t(r,i,o){var a;return function(){var e=this,t=arguments,n=o&&!a;clearTimeout(a),a=setTimeout(function(){a=null,o||r.apply(e,t)},i),n&&r.apply(e,t)}}var n,r,o=!0,i="18px",a="24px",s=.3,l="#57BF57",u="#E3B771",c="#E1715B",d="#4D82D6";function f(){n=document.body.style.height,r=document.body.style.overflow,document.body.style.height="100%",document.body.style.overflow="hidden"}function h(){document.body.style.height=n,document.body.style.overflow=r}window.addEventListener("keydown",function(e){var t=13==e.which||13==e.keyCode,n=27==e.which||27==e.keyCode;b?(t||n)&&(clearTimeout(v),clearTimeout(y),w()):R?t?_.click():n&&k.click():j&&(t?F.click():n&&H.click())}),void 0===Element.prototype.addEventListener&&(Element.prototype.addEventListener=Window.prototype.addEventListener=function(e,t){return e="on"+e,this.attachEvent(e,t)});var p=document.createElement("div");p.id="notie-alert-outer",p.style.position="fixed",p.style.top="0",p.style.left="0",p.style.zIndex="999999999",p.style.height="auto",p.style.width="100%",p.style.display="none",p.style.textAlign="center",p.style.cursor="default",p.style.MozTransition="",p.style.WebkitTransition="",p.style.transition="",p.style.cursor="pointer",p.onclick=function(){clearTimeout(v),clearTimeout(y),w()};var m=document.createElement("div");m.id="notie-alert-inner",m.style.padding="20px",m.style.display="table-cell",m.style.verticalAlign="middle",p.appendChild(m);var g=document.createElement("span");g.id="notie-alert-text",g.style.color="#FFF",window.innerWidth<=600?g.style.fontSize=i:g.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,g),500),!0),m.appendChild(g),document.body.appendChild(p);var v,y,b=!1,x=0;function $(e,t,n){b=!0;var r=0;if(void 0===n)r=3e3;else r=n<1?1e3:1e3*n;switch(e){case 1:p.style.backgroundColor=l;break;case 2:p.style.backgroundColor=u;break;case 3:p.style.backgroundColor=c;break;case 4:p.style.backgroundColor=d}g.innerHTML=t,p.style.top="-10000px",p.style.display="table",p.style.top="-"+p.offsetHeight-5+"px",v=setTimeout(function(){o&&(p.style.boxShadow="0px 0px 10px 0px rgba(0,0,0,0.5)"),p.style.MozTransition="all "+s+"s ease",p.style.WebkitTransition="all "+s+"s ease",p.style.transition="all "+s+"s ease",p.style.top=0,y=setTimeout(function(){w(function(){})},r)},20)}function w(e){p.style.top="-"+p.offsetHeight-5+"px",setTimeout(function(){o&&(p.style.boxShadow=""),p.style.MozTransition="",p.style.WebkitTransition="",p.style.transition="",p.style.top="-10000px",b=!1,e&&e()},1e3*s+10)}var C=document.createElement("div");C.id="notie-confirm-outer",C.style.position="fixed",C.style.top="0",C.style.left="0",C.style.zIndex="999999998",C.style.height="auto",C.style.width="100%",C.style.display="none",C.style.textAlign="center",C.style.MozTransition="",C.style.WebkitTransition="",C.style.transition="";var E=document.createElement("div");E.id="notie-confirm-background",E.style.position="fixed",E.style.top="0",E.style.left="0",E.style.zIndex="999999997",E.style.height="100%",E.style.width="100%",E.style.display="none",E.style.backgroundColor="white",E.style.MozTransition="all "+s+"s ease",E.style.WebkitTransition="all "+s+"s ease",E.style.transition="all "+s+"s ease",E.style.opacity="0",E.onclick=function(){D()};var S=document.createElement("div");S.id="notie-confirm-inner",S.style.boxSizing="border-box",S.style.width="100%",S.style.padding="20px",S.style.display="block",S.style.cursor="default",S.style.backgroundColor="#4D82D6",C.appendChild(S);var _=document.createElement("div");_.id="notie-confirm-yes",_.style.cssFloat="left",_.style.height="50px",_.style.lineHeight="50px",_.style.width="50%",_.style.cursor="pointer",_.style.backgroundColor="#57BF57",C.appendChild(_);var k=document.createElement("div");k.id="notie-confirm-no",k.style.cssFloat="right",k.style.height="50px",k.style.lineHeight="50px",k.style.width="50%",k.style.cursor="pointer",k.style.backgroundColor="#E1715B",k.onclick=function(){D()},C.appendChild(k);var N=document.createElement("span");N.id="notie-confirm-text",N.style.color="#FFF",window.innerWidth<=600?N.style.fontSize=i:N.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,N),500),!0),S.appendChild(N);var T=document.createElement("span");T.id="notie-confirm-yes-text",T.style.color="#FFF",window.innerWidth<=600?T.style.fontSize=i:T.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,T),500),!0),_.appendChild(T);var A=document.createElement("span");A.id="notie-confirm-no-text",A.style.color="#FFF",window.innerWidth<=600?A.style.fontSize=i:A.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,A),500),!0),k.appendChild(A),document.body.appendChild(C),document.body.appendChild(E);var R=!1;function B(e,t,n,r){function i(){N.innerHTML=e,T.innerHTML=t,A.innerHTML=n,C.style.top="-10000px",C.style.display="table",C.style.top="-"+C.offsetHeight-5+"px",E.style.display="block",setTimeout(function(){o&&(C.style.boxShadow="0px 0px 10px 0px rgba(0,0,0,0.5)"),C.style.MozTransition="all "+s+"s ease",C.style.WebkitTransition="all "+s+"s ease",C.style.transition="all "+s+"s ease",C.style.top=0,E.style.opacity="0.75",setTimeout(function(){R=!0},1e3*s+10)},20)}f(),_.onclick=function(){D(),setTimeout(function(){r()},1e3*s+10)},R?(D(),setTimeout(function(){i()},1e3*s+10)):i()}function D(){C.style.top="-"+C.offsetHeight-5+"px",E.style.opacity="0",setTimeout(function(){o&&(C.style.boxShadow=""),C.style.MozTransition="",C.style.WebkitTransition="",C.style.transition="",E.style.display="none",C.style.top="-10000px",h(),R=!1},1e3*s+10)}var M=document.createElement("div");M.id="notie-input-outer",M.style.position="fixed",M.style.top="0",M.style.left="0",M.style.zIndex="999999998",M.style.height="auto",M.style.width="100%",M.style.display="none",M.style.textAlign="center",M.style.MozTransition="",M.style.WebkitTransition="",M.style.transition="";var O=document.createElement("div");O.id="notie-input-background",O.style.position="fixed",O.style.top="0",O.style.left="0",O.style.zIndex="999999997",O.style.height="100%",O.style.width="100%",O.style.display="none",O.style.backgroundColor="white",O.style.MozTransition="all "+s+"s ease",O.style.WebkitTransition="all "+s+"s ease",O.style.transition="all "+s+"s ease",O.style.opacity="0",O.onclick=function(){q()};var P=document.createElement("div");P.id="notie-input-inner",P.style.boxSizing="border-box",P.style.width="100%",P.style.padding="20px",P.style.display="block",P.style.cursor="default",P.style.backgroundColor="#4D82D6",M.appendChild(P);var L=document.createElement("div");L.id="notie-input-div",L.style.boxSizing="border-box",L.style.height="55px",L.style.width="100%",L.style.display="block",L.style.cursor="default",L.style.backgroundColor="#FFF",M.appendChild(L);var I=document.createElement("input");I.id="notie-input-field",I.setAttribute("autocomplete","off"),I.setAttribute("autocorrect","off"),I.setAttribute("autocapitalize","off"),I.setAttribute("spellcheck","false"),I.style.boxSizing="border-box",I.style.height="55px",I.style.width="100%",I.style.textAlign="center",I.style.textIndent="10px",I.style.paddingRight="10px",I.style.outline="0",I.style.border="0",I.style.fontFamily="inherit",I.style.fontSize=a,window.innerWidth<=600?I.style.fontSize=i:I.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,I),500),!0),L.appendChild(I);var F=document.createElement("div");F.id="notie-input-yes",F.style.cssFloat="left",F.style.height="50px",F.style.lineHeight="50px",F.style.width="50%",F.style.cursor="pointer",F.style.backgroundColor="#57BF57",M.appendChild(F);var H=document.createElement("div");H.id="notie-input-no",H.style.cssFloat="right",H.style.height="50px",H.style.lineHeight="50px",H.style.width="50%",H.style.cursor="pointer",H.style.backgroundColor="#E1715B",H.onclick=function(){q()},M.appendChild(H);var U=document.createElement("span");U.id="notie-input-text",U.style.color="#FFF",window.innerWidth<=600?U.style.fontSize=i:U.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,U),500),!0),P.appendChild(U);var z=document.createElement("span");z.id="notie-input-yes-text",z.style.color="#FFF",window.innerWidth<=600?z.style.fontSize=i:z.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,z),500),!0),F.appendChild(z);var V=document.createElement("span");V.id="notie-input-no-text",V.style.color="#FFF",window.innerWidth<=600?V.style.fontSize=i:V.style.fontSize=a,window.addEventListener("resize",t(e.bind(null,V),500),!0),H.appendChild(V),document.body.appendChild(M),document.body.appendChild(O);var j=!1;function W(e,t,n,r){function i(){U.innerHTML=e,z.innerHTML=t,V.innerHTML=n,M.style.top="-10000px",M.style.display="table",M.style.top="-"+M.offsetHeight-5+"px",O.style.display="block",setTimeout(function(){o&&(M.style.boxShadow="0px 0px 10px 0px rgba(0,0,0,0.5)"),M.style.MozTransition="all "+s+"s ease",M.style.WebkitTransition="all "+s+"s ease",M.style.transition="all "+s+"s ease",M.style.top=0,O.style.opacity="0.75",setTimeout(function(){j=!0},1e3*s+10)},20)}f(),F.onclick=function(){q(),setTimeout(function(){r(I.value)},1e3*s+10)},j?(q(),setTimeout(function(){i()},1e3*s+10)):i()}function q(){M.style.top="-"+M.offsetHeight-5+"px",O.style.opacity="0",setTimeout(function(){o&&(M.style.boxShadow=""),M.style.MozTransition="",M.style.WebkitTransition="",M.style.transition="",O.style.display="none",M.style.top="-10000px",h(),j=!1},1e3*s+10)}return{alert:function(e,t,n){document.activeElement.blur(),x++,setTimeout(function(){x--},1e3*s+10),1==x&&(b?(clearTimeout(v),clearTimeout(y),w(function(){$(e,t,n)})):$(e,t,n))},confirm:function(e,t,n,r){document.activeElement.blur(),b?(clearTimeout(v),clearTimeout(y),w(function(){B(e,t,n,r)})):B(e,t,n,r)},input:function(e,t,n,r,i,o,a){document.activeElement.blur(),setTimeout(function(){I.focus()},1e3*s),I.setAttribute("type",r),I.setAttribute("placeholder",i),I.value="",void 0!==a&&0<a.length&&(I.value=a),b?(clearTimeout(v),clearTimeout(y),w(function(){W(e,t,n,o)})):W(e,t,n,o)}}}();void 0!==t&&t&&(t.exports=r)},{}],9:[function(e,t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var u,c=[],d=!1,f=-1;function h(){d&&u&&(d=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!d){var e=l(h);d=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,d=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||d||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],10:[function(l,e,u){(function(e,t){var r=l("process/browser.js").nextTick,n=Function.prototype.apply,i=Array.prototype.slice,o={},a=0;function s(e,t){this._id=e,this._clearFn=t}u.setTimeout=function(){return new s(n.call(setTimeout,window,arguments),clearTimeout)},u.setInterval=function(){return new s(n.call(setInterval,window,arguments),clearInterval)},u.clearTimeout=u.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},u.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},u.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},u._unrefActive=u.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},u.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&i.call(arguments,1);return o[t]=!0,r(function(){o[t]&&(n?e.apply(null,n):e.call(null),u.clearImmediate(t))}),t},u.clearImmediate="function"==typeof t?t:function(e){delete o[e]}}).call(this,l("timers").setImmediate,l("timers").clearImmediate)},{"process/browser.js":9,timers:10}],11:[function(e,t,n){t.exports=["$scope","$http","$rootScope","notie","$routeParams","$location",function(t,e,n,r,i,o){t.tinymceOptions={inline:!1,skin:"lightgray",theme:"modern"},t.lpath="/list-items",t.edit=!0,t.now=new Date,t.item={description:"",title:"",price:0},e.get("/api/items/"+i.id).success(function(e){t.item=e,t.invalidForm=function(){var e=!1;""==t.item.description&&(e=!0),""==t.item.title&&(e=!0),""==t.item.price&&(e=!0),t.invalid=e},t.invalid=!1}).error(n.$error),t.invalidForm=function(){return!0},t.invalid=!0,t.publish=function(){t.progress=!0,e.put("/api/items/"+t.item._id,t.item).success(function(e){r.alert(1,"L'article a été modifié.",3),t.progress=!1,o.path("/edit-item/"+e._id)}).error(function(){n.$error(),t.progress=!1})}}]},{}],12:[function(e,t,n){t.exports=[function(){}]},{}],13:[function(e,t,n){t.exports=["$scope","$http","$rootScope","notie","$location",function(t,n,r,i,o){n.get("/api/items").success(function(e){t.items=e}).error(r.$error),t.removeItem=function(e){i.confirm("Êtes-vous sûre de vouloir supprimer cet article ?","Oui","Annuler",function(){n.delete("/api/items/"+e).success(function(){i.alert(1,"L'article a été supprimé avec succès.",3),o.path("/")}).error(r.$error)})}}]},{}],14:[function(e,t,n){t.exports=["$scope","Upload","notie","$location",function(t,n,r,i){t.tinymceOptions={inline:!1,skin:"lightgray",theme:"modern"},t.lpath="/",t.edit=!1,t.invalid=!0,t.item={description:"",title:"",price:0},t.invalidForm=function(){var e=!1;""==t.item.description&&(e=!0),""==t.item.title&&(e=!0),""==t.item.price&&(e=!0),t.invalid=e},t.publish=function(){t.progress=!0;var e=t.item;e.file=t.content,n.upload({url:"/api/items/",data:e}).then(function(){r.alert(1,"Le fichier a été sauvegardé.",3),i.path("/")},function(){t.progress=!1,r.alert(3,"Une erreur a eu lieu lors de l'envoie du fichier.",3)},function(e){t.progress=parseInt(100*e.loaded/e.total)})}}]},{}],15:[function(e,t,n){e("angular"),e("angular-route"),e("ng-notie"),e("./tinymce/tinymce.min.js"),e("./tinymce/ui-tinymce.js"),e("ng-file-upload");var r=angular.module("Decouverto",["ngNotie","ngFileUpload","ngRoute","ui.tinymce"]);r.config(["$routeProvider",function(e){e.when("/",{templateUrl:"/views/home.html",controller:"HomeCtrl"}).when("/publish",{templateUrl:"/views/publish.html",controller:"PublishCtrl"}).when("/list-items/",{templateUrl:"/views/list-items.html",controller:"ListItemsCtrl"}).when("/edit-item/:id",{templateUrl:"/views/publish.html",controller:"EditItemCtrl"}).otherwise({redirectTo:"/"})}]),r.run(["$rootScope","$location","notie",function(e,t,n){e.$error=function(){n.alert(3,"Une erreur est survenue.",3)},e.$goTo=function(e){t.path(e)}}]),r.controller("HomeCtrl",e("./controllers/home.js")),r.controller("PublishCtrl",e("./controllers/publish.js")),r.controller("ListItemsCtrl",e("./controllers/list-items.js")),r.controller("EditItemCtrl",e("./controllers/edit-item.js"))},{"./controllers/edit-item.js":11,"./controllers/home.js":12,"./controllers/list-items.js":13,"./controllers/publish.js":14,"./tinymce/tinymce.min.js":16,"./tinymce/ui-tinymce.js":17,angular:4,"angular-route":2,"ng-file-upload":6,"ng-notie":7}],16:[function(e,rn,t){(function(nn){!function(s,ye){"use strict";function e(e,t,n){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(t===ye)throw"invalid module definition, dependencies must be specified";if(n===ye)throw"invalid module definition, definition function must be specified";!function(e,t){for(var n,r=[],i=0;i<e.length;++i){if(!(n=l[e[i]]||o(e[i])))throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}(t,function(){l[e]=n.apply(null,arguments)})}function o(e){for(var t=s,n=e.split(/[.\/]/),r=0;r<n.length;++r){if(!t[n[r]])return;t=t[n[r]]}return t}var l={},t="tinymce/geom/Rect",n="tinymce/util/Promise",r="tinymce/util/Delay",i="tinymce/Env",a="tinymce/dom/EventUtils",u="tinymce/dom/Sizzle",c="tinymce/util/Arr",d="tinymce/util/Tools",f="tinymce/dom/DomQuery",h="tinymce/html/Styles",p="tinymce/dom/TreeWalker",m="tinymce/dom/Range",g="tinymce/html/Entities",v="tinymce/dom/StyleSheetLoader",y="tinymce/dom/DOMUtils",b="tinymce/dom/ScriptLoader",x="tinymce/AddOnManager",$="tinymce/dom/NodeType",w="tinymce/text/Zwsp",C="tinymce/caret/CaretContainer",E="tinymce/dom/RangeUtils",S="tinymce/NodeChange",_="tinymce/html/Node",k="tinymce/html/Schema",N="tinymce/html/SaxParser",T="tinymce/html/DomParser",A="tinymce/html/Writer",R="tinymce/html/Serializer",B="tinymce/dom/Serializer",D="tinymce/dom/TridentSelection",M="tinymce/util/VK",O="tinymce/dom/ControlSelection",P="tinymce/util/Fun",L="tinymce/caret/CaretCandidate",I="tinymce/geom/ClientRect",F="tinymce/text/ExtendingChar",H="tinymce/caret/CaretPosition",U="tinymce/caret/CaretBookmark",z="tinymce/dom/BookmarkManager",V="tinymce/dom/Selection",j="tinymce/dom/ElementUtils",W="tinymce/fmt/Preview",q="tinymce/fmt/Hooks",G="tinymce/Formatter",X="tinymce/undo/Diff",Y="tinymce/undo/Fragments",K="tinymce/undo/Levels",J="tinymce/UndoManager",Z="tinymce/EnterKey",Q="tinymce/ForceBlocks",ee="tinymce/caret/CaretUtils",te="tinymce/caret/CaretWalker",ne="tinymce/InsertList",re="tinymce/InsertContent",ie="tinymce/EditorCommands",oe="tinymce/util/URI",ae="tinymce/util/Class",se="tinymce/util/EventDispatcher",le="tinymce/data/Binding",ue="tinymce/util/Observable",ce="tinymce/data/ObservableObject",de="tinymce/ui/Selector",fe="tinymce/ui/Collection",he="tinymce/ui/DomUtils",pe="tinymce/ui/BoxUtils",me="tinymce/ui/ClassList",ge="tinymce/ui/ReflowQueue",ve="tinymce/ui/Control",be="tinymce/ui/Factory",xe="tinymce/ui/KeyboardNavigation",$e="tinymce/ui/Container",we="tinymce/ui/DragHelper",Ce="tinymce/ui/Scrollable",Ee="tinymce/ui/Panel",Se="tinymce/ui/Movable",_e="tinymce/ui/Resizable",ke="tinymce/ui/FloatPanel",Ne="tinymce/ui/Window",Te="tinymce/ui/MessageBox",Ae="tinymce/WindowManager",Re="tinymce/ui/Tooltip",Be="tinymce/ui/Widget",De="tinymce/ui/Progress",Me="tinymce/ui/Notification",Oe="tinymce/NotificationManager",Pe="tinymce/dom/NodePath",Le="tinymce/util/Quirks",Ie="tinymce/EditorObservable",Fe="tinymce/Mode",He="tinymce/Shortcuts",Ue="tinymce/file/Uploader",ze="tinymce/file/Conversions",Ve="tinymce/file/ImageScanner",je="tinymce/file/BlobCache",We="tinymce/file/UploadStatus",qe="tinymce/ErrorReporter",Ge="tinymce/EditorUpload",Xe="tinymce/caret/FakeCaret",Ye="tinymce/dom/Dimensions",Ke="tinymce/caret/LineWalker",Je="tinymce/caret/LineUtils",Ze="tinymce/dom/MousePosition",Qe="tinymce/DragDropOverrides",et="tinymce/SelectionOverrides",tt="tinymce/util/Uuid",nt="tinymce/ui/Sidebar",rt="tinymce/Editor",it="tinymce/util/I18n",ot="tinymce/FocusManager",at="tinymce/EditorManager",st="tinymce/util/XHR",lt="tinymce/util/JSON",ut="tinymce/util/JSONRequest",ct="tinymce/util/JSONP",dt="tinymce/util/LocalStorage",ft="tinymce/Compat",ht="tinymce/ui/Layout",pt="tinymce/ui/AbsoluteLayout",mt="tinymce/ui/Button",gt="tinymce/ui/ButtonGroup",vt="tinymce/ui/Checkbox",yt="tinymce/ui/ComboBox",bt="tinymce/ui/ColorBox",xt="tinymce/ui/PanelButton",$t="tinymce/ui/ColorButton",wt="tinymce/util/Color",Ct="tinymce/ui/ColorPicker",Et="tinymce/ui/Path",St="tinymce/ui/ElementPath",_t="tinymce/ui/FormItem",kt="tinymce/ui/Form",Nt="tinymce/ui/FieldSet",Tt="tinymce/content/LinkTargets",At="tinymce/ui/FilePicker",Rt="tinymce/ui/FitLayout",Bt="tinymce/ui/FlexLayout",Dt="tinymce/ui/FlowLayout",Mt="tinymce/fmt/FontInfo",Ot="tinymce/ui/FormatControls",Pt="tinymce/ui/GridLayout",Lt="tinymce/ui/Iframe",It="tinymce/ui/InfoBox",Ft="tinymce/ui/Label",Ht="tinymce/ui/Toolbar",Ut="tinymce/ui/MenuBar",zt="tinymce/ui/MenuButton",Vt="tinymce/ui/MenuItem",jt="tinymce/ui/Throbber",Wt="tinymce/ui/Menu",qt="tinymce/ui/ListBox",Gt="tinymce/ui/Radio",Xt="tinymce/ui/ResizeHandle",Yt="tinymce/ui/SelectBox",Kt="tinymce/ui/Slider",Jt="tinymce/ui/Spacer",Zt="tinymce/ui/SplitButton",Qt="tinymce/ui/StackLayout",en="tinymce/ui/TabPanel",tn="tinymce/ui/TextBox";e(t,[],function(){function a(e,t,n){var r,i,o,a,s,l;return r=t.x,i=t.y,o=e.w,a=e.h,s=t.w,l=t.h,"b"===(n=(n||"").split(""))[0]&&(i+=l),"r"===n[1]&&(r+=s),"c"===n[0]&&(i+=u(l/2)),"c"===n[1]&&(r+=u(s/2)),"b"===n[3]&&(i-=a),"r"===n[4]&&(r-=o),"c"===n[3]&&(i-=u(a/2)),"c"===n[4]&&(r-=u(o/2)),h(r,i,o,a)}function h(e,t,n,r){return{x:e,y:t,w:n,h:r}}var s=Math.min,p=Math.max,u=Math.round;return{inflate:function(e,t,n){return h(e.x-t,e.y-n,e.w+2*t,e.h+2*n)},relativePosition:a,findBestRelativePosition:function(e,t,n,r){var i,o;for(o=0;o<r.length;o++)if((i=a(e,t,r[o])).x>=n.x&&i.x+i.w<=n.w+n.x&&i.y>=n.y&&i.y+i.h<=n.h+n.y)return r[o];return null},intersect:function(e,t){var n,r,i,o;return n=p(e.x,t.x),r=p(e.y,t.y),i=s(e.x+e.w,t.x+t.w),o=s(e.y+e.h,t.y+t.h),i-n<0||o-r<0?null:h(n,r,i-n,o-r)},clamp:function(e,t,n){var r,i,o,a,s,l,u,c,d,f;return s=e.x,l=e.y,u=e.x+e.w,c=e.y+e.h,d=t.x+t.w,f=t.y+t.h,r=p(0,t.x-s),i=p(0,t.y-l),o=p(0,u-d),a=p(0,c-f),s+=r,l+=i,n&&(u+=r,c+=i,s-=o,l-=a),h(s,l,(u-=o)-s,(c-=a)-l)},create:h,fromClientRect:function(e){return h(e.left,e.top,e.width,e.height)}}}),e(n,[],function(){function n(e,t){return function(){e.apply(t,arguments)}}function e(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,n(r,this),n(i,this))}function o(n){var r=this;return null===this._state?void this._deferreds.push(n):void t(function(){var e=r._state?n.onFulfilled:n.onRejected;if(null!==e){var t;try{t=e(r._value)}catch(e){return void n.reject(e)}n.resolve(t)}else(r._state?n.resolve:n.reject)(r._value)})}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void l(n(t,e),n(r,this),n(i,this))}this._state=!0,this._value=e,a.call(this)}catch(e){i.call(this,e)}}function i(e){this._state=!1,this._value=e,a.call(this)}function a(){for(var e=0,t=this._deferreds.length;e<t;e++)o.call(this,this._deferreds[e]);this._deferreds=null}function s(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function l(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(e){if(r)return;r=!0,n(e)}}if(window.Promise)return window.Promise;var t=e.immediateFn||"function"==typeof nn&&nn||function(e){setTimeout(e,1)},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.then=function(n,r){var i=this;return new e(function(e,t){o.call(i,new s(n,r,e,t))})},e.all=function(){var s=Array.prototype.slice.call(1===arguments.length&&u(arguments[0])?arguments[0]:arguments);return new e(function(r,i){function o(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){o(t,e)},i)}s[t]=e,0==--a&&r(s)}catch(e){i(e)}}if(0===s.length)return r([]);for(var a=s.length,e=0;e<s.length;e++)o(e,s[e])})},e.resolve=function(t){return t&&"object"==typeof t&&t.constructor===e?t:new e(function(e){e(t)})},e.reject=function(n){return new e(function(e,t){t(n)})},e.race=function(i){return new e(function(e,t){for(var n=0,r=i.length;n<r;n++)i[n].then(e,t)})},e}),e(r,[n],function(n){function i(e,t){return"number"!=typeof t&&(t=0),setTimeout(e,t)}function o(e,t){return"number"!=typeof t&&(t=1),setInterval(e,t)}function e(t,n){var r,e;return(e=function(){var e=arguments;clearTimeout(r),r=i(function(){t.apply(this,e)},n)}).stop=function(){clearTimeout(r)},e}var r;return{requestAnimationFrame:function(e,t){return r?void r.then(e):void(r=new n(function(e){(function(e,t){var n,r=window.requestAnimationFrame,i=["ms","moz","webkit"];for(n=0;n<i.length&&!r;n++)r=window[i[n]+"RequestAnimationFrame"];(r=r||function(e){window.setTimeout(e,0)})(e,t)})(e,t=t||document.body)}).then(e))},setTimeout:i,setInterval:o,setEditorTimeout:function(e,t,n){return i(function(){e.removed||t()},n)},setEditorInterval:function(e,t,n){var r;return r=o(function(){e.removed?clearInterval(r):t()},n)},debounce:e,throttle:e,clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)}}}),e(i,[],function(){function e(e){return"matchMedia"in window&&matchMedia(e).matches}var t,n,r,i,o,a,s,l,u,c,d,f,h,p=navigator,m=p.userAgent;return t=window.opera&&window.opera.buildNumber,u=/Android/.test(m),r=(r=!(n=/WebKit/.test(m))&&!t&&/MSIE/gi.test(m)&&/Explorer/gi.test(p.appName))&&/MSIE (\w+)\./.exec(m)[1],i=-1!=m.indexOf("Trident/")&&(-1!=m.indexOf("rv:")||-1!=p.appName.indexOf("Netscape"))&&11,o=-1!=m.indexOf("Edge/")&&!r&&!i&&12,r=r||i||o,a=!n&&!i&&/Gecko/.test(m),s=-1!=m.indexOf("Mac"),l=/(iPad|iPhone)/.test(m),c="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,d=e("only screen and (max-device-width: 480px)")&&(u||l),f=e("only screen and (min-width: 800px)")&&(u||l),h=-1!=m.indexOf("Windows Phone"),o&&(n=!1),{opera:t,webkit:n,ie:r,gecko:a,mac:s,iOS:l,android:u,contentEditable:!l||c||534<=m.match(/AppleWebKit\/(\d*)/)[1],transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=r,range:window.getSelection&&"Range"in window,documentMode:r&&!o?document.documentMode||7:10,fileApi:c,ceFalse:!1===r||8<r,canHaveCSP:!1===r||11<r,desktop:!d&&!f,windowsPhone:h}}),e(a,[r,i],function(a,u){function $(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function w(e,t){function n(){return!1}function r(){return!0}var i,o=t||{};for(i in e)d[i]||(o[i]=e[i]);if(o.target||(o.target=o.srcElement||document),u.experimentalShadowDom&&(o.target=function(e,t){var n,r=t;return(n=e.path)&&0<n.length&&(r=n[0]),e.deepPath&&((n=e.deepPath())&&0<n.length&&(r=n[0])),r}(e,o.target)),e&&c.test(e.type)&&void 0===e.pageX&&void 0!==e.clientX){var a=o.target.ownerDocument||document,s=a.documentElement,l=a.body;o.pageX=e.clientX+(s&&s.scrollLeft||l&&l.scrollLeft||0)-(s&&s.clientLeft||l&&l.clientLeft||0),o.pageY=e.clientY+(s&&s.scrollTop||l&&l.scrollTop||0)-(s&&s.clientTop||l&&l.clientTop||0)}return o.preventDefault=function(){o.isDefaultPrevented=r,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=r,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=r,o.stopPropagation()},o.isDefaultPrevented||(o.isDefaultPrevented=n,o.isPropagationStopped=n,o.isImmediatePropagationStopped=n),void 0===o.metaKey&&(o.metaKey=!1),o}function C(e,t,n){function r(){n.domLoaded||(n.domLoaded=!0,t(o))}var i=e.document,o={type:"ready"};return n.domLoaded?void t(o):(i.addEventListener?"complete"===i.readyState?r():$(e,"DOMContentLoaded",r):($(i,"readystatechange",function e(){("complete"===i.readyState||"interactive"===i.readyState&&i.body)&&(f(i,"readystatechange",e),r())}),i.documentElement.doScroll&&e.self===e.top&&function t(){try{i.documentElement.doScroll("left")}catch(e){return void a.setTimeout(t)}r()}()),void $(e,"load",r))}function e(){function h(e,t){var n,r,i,o,a=x[t];if(n=a&&a[e.type])for(r=0,i=n.length;r<i;r++)if((o=n[r])&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}var p,m,g,v,y,b=this,x={};m="mce-data-"+(+new Date).toString(32),v="onmouseenter"in document.documentElement,g="onfocusin"in document.documentElement,y={mouseenter:"mouseover",mouseleave:"mouseout"},p=1,b.domLoaded=!1,b.events=x,b.bind=function(e,t,n,r){function i(e){h(w(e||f.event),o)}var o,a,s,l,u,c,d,f=window;if(e&&3!==e.nodeType&&8!==e.nodeType){for(e[m]?o=e[m]:(o=p++,e[m]=o,x[o]={}),r=r||e,s=(t=t.split(" ")).length;s--;)c=i,u=d=!1,"DOMContentLoaded"===(l=t[s])&&(l="ready"),b.domLoaded&&"ready"===l&&"complete"==e.readyState?n.call(r,w({type:l})):(v||(u=y[l])&&(c=function(e){var t,n;if(t=e.currentTarget,(n=e.relatedTarget)&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||((e=w(e||f.event)).type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,h(e,o))}),g||"focusin"!==l&&"focusout"!==l||(d=!0,u="focusin"===l?"focus":"blur",c=function(e){(e=w(e||f.event)).type="focus"===e.type?"focusin":"focusout",h(e,o)}),(a=x[o][l])?"ready"===l&&b.domLoaded?n({type:l}):a.push({func:n,scope:r}):(x[o][l]=a=[{func:n,scope:r}],a.fakeName=u,a.capture=d,a.nativeHandler=c,"ready"===l?C(e,c,b):$(e,u||l,c,d)));return e=a=0,n}},b.unbind=function(t,e,n){var r,i,o,a,s,l;if(!t||3===t.nodeType||8===t.nodeType)return b;if(r=t[m]){if(l=x[r],e){for(o=(e=e.split(" ")).length;o--;)if(i=l[s=e[o]]){if(n)for(a=i.length;a--;)if(i[a].func===n){var u=i.nativeHandler,c=i.fakeName,d=i.capture;(i=i.slice(0,a).concat(i.slice(a+1))).nativeHandler=u,i.fakeName=c,i.capture=d,l[s]=i}n&&0!==i.length||(delete l[s],f(t,i.fakeName||s,i.nativeHandler,i.capture))}}else{for(s in l)f(t,(i=l[s]).fakeName||s,i.nativeHandler,i.capture);l={}}for(s in l)return b;delete x[r];try{delete t[m]}catch(e){t[m]=null}}return b},b.fire=function(e,t,n){var r;if(!e||3===e.nodeType||8===e.nodeType)return b;for((n=w(null,n)).type=t,n.target=e;(r=e[m])&&h(n,r),(e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow)&&!n.isPropagationStopped(););return b},b.clean=function(e){var t,n,r=b.unbind;if(!e||3===e.nodeType||8===e.nodeType)return b;if(e[m]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),t=(n=e.getElementsByTagName("*")).length;t--;)(e=n[t])[m]&&r(e);return b},b.destroy=function(){x={}},b.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var c=/^(?:mouse|contextmenu)|click/,d={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return(e.Event=new e).bind(window,"ready",function(){}),e}),e(u,[],function(){function x(e,t,n,r){var i,o,a,s,l,u,c,d,f,h;if((t?t.ownerDocument||t:I)!==A&&T(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=(t=t||A).nodeType)&&9!==s)return[];if(B&&!r){if(i=pe.exec(e))if(a=i[1]){if(9===s){if(!(o=t.getElementById(a))||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&P(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return K.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&v.getElementsByClassName)return K.apply(n,t.getElementsByClassName(a)),n}if(v.qsa&&(!D||!D.test(e))){if(d=c=L,f=t,h=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=C(e),(c=t.getAttribute("id"))?d=c.replace(ge,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",l=u.length;l--;)u[l]=d+m(u[l]);f=me.test(e)&&p(t.parentNode)||t,h=u.join(",")}if(h)try{return K.apply(n,f.querySelectorAll(h)),n}catch(e){}finally{c||t.removeAttribute("id")}}}return S(e.replace(ie,"$1"),t,n,r)}function e(){var r=[];return function e(t,n){return r.push(t+" ")>w.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function l(e){return e[L]=!0,e}function r(e){var t=A.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function t(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function u(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function n(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function i(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function o(a){return l(function(o){return o=+o,l(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function p(e){return e&&typeof e.getElementsByTagName!==W&&e}function a(){}function m(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function d(a,e,t){var s=e.dir,l=t&&"parentNode"===s,u=H++;return e.first?function(e,t,n){for(;e=e[s];)if(1===e.nodeType||l)return a(e,t,n)}:function(e,t,n){var r,i,o=[F,u];if(n){for(;e=e[s];)if((1===e.nodeType||l)&&a(e,t,n))return!0}else for(;e=e[s];)if(1===e.nodeType||l){if((r=(i=e[L]||(e[L]={}))[s])&&r[0]===F&&r[1]===u)return o[2]=r[2];if((i[s]=o)[2]=a(e,t,n))return!0}}}function f(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function $(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s<l;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),u&&t.push(s)));return a}function y(h,p,m,g,v,e){return g&&!g[L]&&(g=y(g)),v&&!v[L]&&(v=y(v,e)),l(function(e,t,n,r){var i,o,a,s=[],l=[],u=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)x(e,t[r],n);return n}(p||"*",n.nodeType?[n]:n,[]),d=!h||!e&&p?c:$(c,s,h,n,r),f=m?v||(e?h:u||g)?[]:t:d;if(m&&m(d,f,n,r),g)for(i=$(f,l),g(i,[],n,r),o=i.length;o--;)(a=i[o])&&(f[l[o]]=!(d[l[o]]=a));if(e){if(v||h){if(v){for(i=[],o=f.length;o--;)(a=f[o])&&i.push(d[o]=a);v(null,f=[],i,r)}for(o=f.length;o--;)(a=f[o])&&-1<(i=v?Z.call(e,a):s[o])&&(e[i]=!(t[i]=a))}}else f=$(f===t?f.splice(u,f.length):f),v?v(null,t,f,r):K.apply(t,f)})}function h(e){for(var r,t,n,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=d(function(e){return e===r},a,!0),u=d(function(e){return-1<Z.call(r,e)},a,!0),c=[function(e,t,n){return!o&&(n||t!==_)||((r=t).nodeType?l(e,t,n):u(e,t,n))}];s<i;s++)if(t=w.relative[e[s].type])c=[d(f(c),t)];else{if((t=w.filter[e[s].type].apply(null,e[s].matches))[L]){for(n=++s;n<i&&!w.relative[e[n].type];n++);return y(1<s&&f(c),1<s&&m(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ie,"$1"),t,s<n&&h(e.slice(s,n)),n<i&&h(e=e.slice(n)),n<i&&m(e))}c.push(t)}return f(c)}function g(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(65536+r):String.fromCharCode(r>>10|55296,1023&r|56320)}var s,v,w,c,b,C,E,S,_,k,N,T,A,R,B,D,M,O,P,L="sizzle"+-new Date,I=window.document,F=0,H=0,U=e(),z=e(),V=e(),j=function(e,t){return e===t&&(N=!0),0},W=typeof ye,q={}.hasOwnProperty,G=[],X=G.pop,Y=G.push,K=G.push,J=G.slice,Z=G.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},Q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ne="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",re=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ne+")*)|.*)\\)|)",ie=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),oe=new RegExp("^"+ee+"*,"+ee+"*"),ae=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),se=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),le=new RegExp(re),ue=new RegExp("^"+te+"$"),ce={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,he=/^[^{]+\{\s*\[native \w/,pe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ge=/'|\\/g,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig");try{K.apply(G=J.call(I.childNodes),I.childNodes),G[I.childNodes.length].nodeType}catch(e){K={apply:G.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}for(s in v=x.support={},b=x.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=x.setDocument=function(e){var t,l=e?e.ownerDocument||e:I,n=l.defaultView;return l!==A&&9===l.nodeType&&l.documentElement?(R=(A=l).documentElement,B=!b(l),n&&n!==function(e){try{return e.top}catch(e){}return null}(n)&&(n.addEventListener?n.addEventListener("unload",function(){T()},!1):n.attachEvent&&n.attachEvent("onunload",function(){T()})),v.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),v.getElementsByTagName=r(function(e){return e.appendChild(l.createComment("")),!e.getElementsByTagName("*").length}),v.getElementsByClassName=he.test(l.getElementsByClassName),v.getById=r(function(e){return R.appendChild(e).id=L,!l.getElementsByName||!l.getElementsByName(L).length}),v.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==W&&B){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(ve,g);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var n=e.replace(ve,g);return function(e){var t=typeof e.getAttributeNode!==W&&e.getAttributeNode("id");return t&&t.value===n}}),w.find.TAG=v.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==W)return t.getElementsByTagName(e)}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},w.find.CLASS=v.getElementsByClassName&&function(e,t){if(B)return t.getElementsByClassName(e)},M=[],D=[],(v.qsa=he.test(l.querySelectorAll))&&(r(function(e){e.innerHTML="<select msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+Q+")"),e.querySelectorAll(":checked").length||D.push(":checked")}),r(function(e){var t=l.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(v.matchesSelector=he.test(O=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&r(function(e){v.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",re)}),D=D.length&&new RegExp(D.join("|")),M=M.length&&new RegExp(M.join("|")),t=he.test(R.compareDocumentPosition),P=t||he.test(R.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return N=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument===I&&P(I,e)?-1:t===l||t.ownerDocument===I&&P(I,t)?1:k?Z.call(k,e)-Z.call(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return N=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===l?-1:t===l?1:i?-1:o?1:k?Z.call(k,e)-Z.call(k,t):0;if(i===o)return u(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?u(a[r],s[r]):a[r]===I?-1:s[r]===I?1:0},l):A},x.matches=function(e,t){return x(e,null,null,t)},x.matchesSelector=function(e,t){if((e.ownerDocument||e)!==A&&T(e),t=t.replace(se,"='$1']"),v.matchesSelector&&B&&(!M||!M.test(t))&&(!D||!D.test(t)))try{var n=O.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<x(t,A,null,[e]).length},x.contains=function(e,t){return(e.ownerDocument||e)!==A&&T(e),P(e,t)},x.attr=function(e,t){(e.ownerDocument||e)!==A&&T(e);var n=w.attrHandle[t.toLowerCase()],r=n&&q.call(w.attrHandle,t.toLowerCase())?n(e,t,!B):ye;return r!==ye?r:v.attributes||!B?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},x.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},x.uniqueSort=function(e){var t,n=[],r=0,i=0;if(N=!v.detectDuplicates,k=!v.sortStable&&e.slice(0),e.sort(j),N){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return k=null,e},c=x.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=c(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=c(t);return n},(w=x.selectors={cacheLength:50,createPseudo:l,match:ce,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,g),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,g),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||x.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&x.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ce.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&le.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,g).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==W&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=x.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,p,m){var g="nth"!==h.slice(0,3),v="last"!==h.slice(-4),y="of-type"===e;return 1===p&&0===m?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,l,u=g!=v?"nextSibling":"previousSibling",c=e.parentNode,d=y&&e.nodeName.toLowerCase(),f=!n&&!y;if(c){if(g){for(;u;){for(o=e;o=o[u];)if(y?o.nodeName.toLowerCase()===d:1===o.nodeType)return!1;l=u="only"===h&&!l&&"nextSibling"}return!0}if(l=[v?c.firstChild:c.lastChild],v&&f){for(s=(r=(i=c[L]||(c[L]={}))[h]||[])[0]===F&&r[1],a=r[0]===F&&r[2],o=s&&c.childNodes[s];o=++s&&o&&o[u]||(a=s=0)||l.pop();)if(1===o.nodeType&&++a&&o===e){i[h]=[F,s,a];break}}else if(f&&(r=(e[L]||(e[L]={}))[h])&&r[0]===F)a=r[1];else for(;(o=++s&&o&&o[u]||(a=s=0)||l.pop())&&((y?o.nodeName.toLowerCase()!==d:1!==o.nodeType)||!++a||(f&&((o[L]||(o[L]={}))[h]=[F,a]),o!==e)););return(a-=m)===p||a%p==0&&0<=a/p}}},PSEUDO:function(e,o){var t,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||x.error("unsupported pseudo: "+e);return a[L]?a(o):1<a.length?(t=[e,e,"",o],w.setFilters.hasOwnProperty(e.toLowerCase())?l(function(e,t){for(var n,r=a(e,o),i=r.length;i--;)e[n=Z.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:l(function(e){var r=[],i=[],s=E(e.replace(ie,"$1"));return s[L]?l(function(e,t,n,r){for(var i,o=s(e,null,r,[]),a=e.length;a--;)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),!i.pop()}}),has:l(function(t){return function(e){return 0<x(t,e).length}}),contains:l(function(t){return t=t.replace(ve,g),function(e){return-1<(e.textContent||e.innerText||c(e)).indexOf(t)}}),lang:l(function(n){return ue.test(n||"")||x.error("unsupported lang: "+n),n=n.replace(ve,g).toLowerCase(),function(e){var t;do{if(t=B?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===R},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:o(function(){return[0]}),last:o(function(e,t){return[t-1]}),eq:o(function(e,t,n){return[n<0?n+t:n]}),even:o(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:o(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:o(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:o(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=w.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[s]=n(s);for(s in{submit:!0,reset:!0})w.pseudos[s]=i(s);return a.prototype=w.filters=w.pseudos,w.setFilters=new a,C=x.tokenize=function(e,t){var n,r,i,o,a,s,l,u=z[e+" "];if(u)return t?0:u.slice(0);for(a=e,s=[],l=w.preFilter;a;){for(o in n&&!(r=oe.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=ae.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ie," ")}),a=a.slice(n.length)),w.filter)!(r=ce[o].exec(a))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?x.error(e):z(e,s).slice(0)},E=x.compile=function(e,t){var n,r=[],i=[],o=V[e+" "];if(!o){for(n=(t=t||C(e)).length;n--;)(o=h(t[n]))[L]?r.push(o):i.push(o);(o=V(e,function(g,v){function e(e,t,n,r,i){var o,a,s,l=0,u="0",c=e&&[],d=[],f=_,h=e||b&&w.find.TAG("*",i),p=F+=null==f?1:Math.random()||.1,m=h.length;for(i&&(_=t!==A&&t);u!==m&&null!=(o=h[u]);u++){if(b&&o){for(a=0;s=g[a++];)if(s(o,t,n)){r.push(o);break}i&&(F=p)}y&&((o=!s&&o)&&l--,e&&c.push(o))}if(l+=u,y&&u!==l){for(a=0;s=v[a++];)s(c,d,t,n);if(e){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=X.call(r));d=$(d)}K.apply(r,d),i&&!e&&0<d.length&&1<l+v.length&&x.uniqueSort(r)}return i&&(F=p,_=f),c}var y=0<v.length,b=0<g.length;return y?l(e):e}(i,r))).selector=e}return o},S=x.select=function(e,t,n,r){var i,o,a,s,l,u="function"==typeof e&&e,c=!r&&C(e=u.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&v.getById&&9===t.nodeType&&B&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ve,g),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=ce.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(ve,g),me.test(o[0].type)&&p(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&m(o)))return K.apply(n,r),n;break}}return(u||E(e,c))(r,t,!B,n,me.test(e)&&p(t.parentNode)||t),n},v.sortStable=L.split("").sort(j).join("")===L,v.detectDuplicates=!!N,T(),v.sortDetached=r(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||t("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),v.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||t("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||t(Q,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),x}),e(c,[],function(){function e(e,t,n){var r,i;if(!e)return 0;if(n=n||e,e.length!==ye){for(r=0,i=e.length;r<i;r++)if(!1===t.call(n,e[r],r,e))return 0}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))return 0;return 1}function i(e,t,n){var r,i;for(r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return r;return-1}var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:o,toArray:function(e){var t,n,r=e;if(!o(e))for(r=[],t=0,n=e.length;t<n;t++)r[t]=e[t];return r},each:e,map:function(n,r){var i=[];return e(n,function(e,t){i.push(r(e,t,n))}),i},filter:function(n,r){var i=[];return e(n,function(e,t){r&&!r(e,t,n)||i.push(e)}),i},indexOf:function(e,t){var n,r;if(e)for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},reduce:function(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);i<e.length;i++)n=t.call(r,n,e[i],i);return n},findIndex:i,find:function(e,t,n){var r=i(e,t,n);return-1!==r?e[r]:ye},last:function(e){return e[e.length-1]}}}),e(d,[i,c],function(n,a){function r(e){return null===e||e===ye?"":(""+e).replace(t,"")}function i(e,t){return t?!("array"!=t||!a.isArray(e))||typeof e==t:e!==ye}var t=/^\s*|\s*$/g;return{trim:r,isArray:a.isArray,is:i,toArray:a.toArray,makeMap:function(e,t,n){var r;for(t=t||",","string"==typeof(e=e||[])&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},each:a.each,map:a.map,grep:a.filter,inArray:a.indexOf,hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},extend:function(e,t){var n,r,i,o,a=arguments;for(n=1,r=a.length;n<r;n++)for(i in t=a[n])t.hasOwnProperty(i)&&((o=t[i])!==ye&&(e[i]=o));return e},create:function(e,t,n){var r,i,o,a,s,l=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),o=e[3].match(/(^|\.)(\w+)$/i)[2],!(i=this.createNS(e[3].replace(/\.\w+$/,""),n))[o]){if("static"==e[2])return i[o]=t,void(this.onCreate&&this.onCreate(e[2],e[3],i[o]));t[o]||(t[o]=function(){},l=1),i[o]=t[o],this.extend(i[o].prototype,t),e[5]&&(r=this.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=i[o],i[o]=l?function(){return r[a].apply(this,arguments)}:function(){return this.parent=r[a],s.apply(this,arguments)},i[o].prototype[o]=i[o],this.each(r,function(e,t){i[o].prototype[t]=r[t]}),this.each(t,function(e,t){r[t]?i[o].prototype[t]=function(){return this.parent=r[t],e.apply(this,arguments)}:t!=o&&(i[o].prototype[t]=e)})),this.each(t.static,function(e,t){i[o][t]=e})}},walk:function n(e,r,i,o){o=o||this,e&&(i&&(e=e[i]),a.each(e,function(e,t){return!1!==r.call(o,e,t,i)&&void n(e,r,i,o)}))},createNS:function(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;n<e.length;n++)t[r=e[n]]||(t[r]={}),t=t[r];return t},resolve:function(e,t){var n,r;for(t=t||window,n=0,r=(e=e.split(".")).length;n<r&&(t=t[e[n]]);n++);return t},explode:function(e,t){return!e||i(e,"array")?e:a.map(e.split(t||","),r)},_addCacheSuffix:function(e){var t=n.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}}}),e(f,[a,u,d,i],function(e,t,n,r){function s(e){return void 0!==e}function o(e){return"string"==typeof e}function a(e,t){var n,r,i;for(i=(t=t||x).createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function l(e,t,n,r){var i;if(o(t))t=a(t,p(e[0]));else if(t.length&&!t.nodeType){if(t=c.makeArray(t),r)for(i=t.length-1;0<=i;i--)l(e,t[i],n,r);else for(i=0;i<t.length;i++)l(e,t[i],n,r);return e}if(t.nodeType)for(i=e.length;i--;)n.call(e[i],t);return e}function u(e,t){return e&&t&&-1!==(" "+e.className+" ").indexOf(" "+t+" ")}function i(e,t,n){var r,i;return t=c(t)[0],e.each(function(){n&&r==this.parentNode||(r=this.parentNode,i=t.cloneNode(!1),this.parentNode.insertBefore(i,this)),i.appendChild(this)}),e}function c(e,t){return new c.fn.init(e,t)}function d(e){return null===e||e===b?"":(""+e).replace(B,"")}function f(e,t){var n,r,i,o;if(e)if(void 0===(n=e.length)){for(r in e)if(e.hasOwnProperty(r)&&(o=e[r],!1===t.call(o,r,o)))break}else for(i=0;i<n&&(o=e[i],!1!==t.call(o,i,o));i++);return e}function h(e,n){var r=[];return f(e,function(e,t){n(t,e)&&r.push(t)}),r}function p(e){return e?9==e.nodeType?e:e.ownerDocument:x}function m(e,t,n){var r=[],i=e[t];for("string"!=typeof n&&n instanceof c&&(n=n[0]);i&&9!==i.nodeType;){if(n!==ye){if(i===n)break;if("string"==typeof n&&c(i).is(n))break}1===i.nodeType&&r.push(i),i=i[t]}return r}function g(e,t,n,r){var i=[];for(r instanceof c&&(r=r[0]);e;e=e[t])if(!n||e.nodeType===n){if(r!==ye){if(e===r)break;if("string"==typeof r&&c(e).is(r))break}i.push(e)}return i}function v(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function y(n,r,e){f(e,function(e,t){n[e]=n[e]||{},n[e][r]=t})}var b,x=document,$=Array.prototype.push,w=Array.prototype.slice,C=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=e.Event,S=n.makeMap("children,contents,next,prev"),_=n.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),k=n.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),N={for:"htmlFor",class:"className",readonly:"readOnly"},T={float:"cssFloat"},A={},R={},B=/^\s*|\s*$/g;return c.fn=c.prototype={constructor:c,selector:"",context:null,length:0,init:function(e,t){var n,r,i=this;if(!e)return i;if(e.nodeType)return i.context=i[0]=e,i.length=1,i;if(t&&t.nodeType)i.context=t;else{if(t)return c(e).attr(t);i.context=t=document}if(o(e)){if(!(n="<"===(i.selector=e).charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:C.exec(e)))return c(t).find(e);if(n[1])for(r=a(e,p(t)).firstChild;r;)$.call(i,r),r=r.nextSibling;else{if(!(r=p(t).getElementById(n[2])))return i;if(r.id!==n[2])return i.find(e);i.length=1,i[0]=r}}else this.add(e,!1);return i},toArray:function(){return n.toArray(this)},add:function(e,t){var n,r;if(o(e))return this.add(c(e));if(!1!==t)for(n=c.unique(this.toArray().concat(c.makeArray(e))),this.length=n.length,r=0;r<n.length;r++)this[r]=n[r];else $.apply(this,c.makeArray(e));return this},attr:function(t,n){var e,r=this;if("object"==typeof t)f(t,function(e,t){r.attr(e,t)});else{if(!s(n)){if(r[0]&&1===r[0].nodeType){if((e=A[t])&&e.get)return e.get(r[0],t);if(k[t])return r.prop(t)?t:b;null===(n=r[0].getAttribute(t,2))&&(n=b)}return n}this.each(function(){var e;if(1===this.nodeType){if((e=A[t])&&e.set)return void e.set(this,n);null===n?this.removeAttribute(t,2):this.setAttribute(t,n,2)}})}return r},removeAttr:function(e){return this.attr(e,null)},prop:function(e,t){var n=this;if("object"==typeof(e=N[e]||e))f(e,function(e,t){n.prop(e,t)});else{if(!s(t))return n[0]&&n[0].nodeType&&e in n[0]?n[0][e]:t;this.each(function(){1==this.nodeType&&(this[e]=t)})}return n},css:function(t,n){function e(e){return e.replace(/-(\D)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e})}var i,o,a=this;if("object"==typeof t)f(t,function(e,t){a.css(e,t)});else if(s(n))t=e(t),"number"!=typeof n||_[t]||(n+="px"),a.each(function(){var e=this.style;if((o=R[t])&&o.set)o.set(this,n);else{try{this.style[T[t]||t]=n}catch(e){}null!==n&&""!==n||(e.removeProperty?e.removeProperty(r(t)):e.removeAttribute(t))}});else{if(i=a[0],(o=R[t])&&o.get)return o.get(i);if(i.ownerDocument.defaultView)try{return i.ownerDocument.defaultView.getComputedStyle(i,null).getPropertyValue(r(t))}catch(e){return b}else if(i.currentStyle)return i.currentStyle[e(t)]}return a},remove:function(){for(var e,t=this.length;t--;)e=this[t],E.clean(e),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var e,t=this.length;t--;)for(e=this[t];e.firstChild;)e.removeChild(e.firstChild);return this},html:function(t){var n,r=this;if(s(t)){n=r.length;try{for(;n--;)r[n].innerHTML=t}catch(e){c(r[n]).empty().append(t)}return r}return r[0]?r[0].innerHTML:""},text:function(e){var t;if(s(e)){for(t=this.length;t--;)"innerText"in this[t]?this[t].innerText=e:this[0].textContent=e;return this}return this[0]?this[0].innerText||this[0].textContent:""},append:function(){return l(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.appendChild(e)})},prepend:function(){return l(this,arguments,function(e){(1===this.nodeType||this.host&&1===this.host.nodeType)&&this.insertBefore(e,this.firstChild)},!0)},before:function(){return this[0]&&this[0].parentNode?l(this,arguments,function(e){this.parentNode.insertBefore(e,this)}):this},after:function(){return this[0]&&this[0].parentNode?l(this,arguments,function(e){this.parentNode.insertBefore(e,this.nextSibling)},!0):this},appendTo:function(e){return c(e).append(this),this},prependTo:function(e){return c(e).prepend(this),this},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){return i(this,e)},wrapAll:function(e){return i(this,e,!0)},wrapInner:function(e){return this.each(function(){c(this).contents().wrapAll(e)}),this},unwrap:function(){return this.parent().each(function(){c(this).replaceWith(this.childNodes)})},clone:function(){var e=[];return this.each(function(){e.push(this.cloneNode(!0))}),c(e)},addClass:function(e){return this.toggleClass(e,!0)},removeClass:function(e){return this.toggleClass(e,!1)},toggleClass:function(i,o){var e=this;return"string"!=typeof i||(-1!==i.indexOf(" ")?f(i.split(" "),function(){e.toggleClass(this,o)}):e.each(function(e,t){var n,r;(r=u(t,i))!==o&&(n=t.className,r?t.className=d((" "+n+" ").replace(" "+i+" "," ")):t.className+=n?" "+i:i)})),e},hasClass:function(e){return u(this[0],e)},each:function(e){return f(this,e)},on:function(e,t){return this.each(function(){E.bind(this,e,t)})},off:function(e,t){return this.each(function(){E.unbind(this,e,t)})},trigger:function(e){return this.each(function(){"object"==typeof e?E.fire(this,e.type,e):E.fire(this,e)})},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},slice:function(){return new c(w.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},find:function(e){var t,n,r=[];for(t=0,n=this.length;t<n;t++)c.find(e,this[t],r);return c(r)},filter:function(n){return c("function"==typeof n?h(this.toArray(),function(e,t){return n(t,e)}):c.filter(n,this.toArray()))},closest:function(n){var r=[];return n instanceof c&&(n=n[0]),this.each(function(e,t){for(;t;){if("string"==typeof n&&c(t).is(n)){r.push(t);break}if(t==n){r.push(t);break}t=t.parentNode}}),c(r)},offset:function(e){var t,n,r,i,o=0,a=0;return e?this.css(e):((t=this[0])&&(r=(n=t.ownerDocument).documentElement,t.getBoundingClientRect&&(o=(i=t.getBoundingClientRect()).left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,a=i.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:o,top:a})},push:$,sort:[].sort,splice:[].splice},n.extend(c,{extend:n.extend,makeArray:function(e){return function(e){return e&&e==e.window}(e)||e.nodeType?[e]:n.toArray(e)},inArray:function(e,t){var n;if(t.indexOf)return t.indexOf(e);for(n=t.length;n--;)if(t[n]===e)return n;return-1},isArray:n.isArray,each:f,trim:d,grep:h,find:t,expr:t.selectors,unique:t.uniqueSort,text:t.getText,contains:t.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return 1===t.length?c.find.matchesSelector(t[0],e)?[t[0]]:[]:c.find.matches(e,t)}}),f({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return m(e,"parentNode")},next:function(e){return v(e,"nextSibling",1)},prev:function(e){return v(e,"previousSibling",1)},children:function(e){return g(e.firstChild,"nextSibling",1)},contents:function(e){return n.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,r){c.fn[e]=function(t){var n=[];return this.each(function(){var e=r.call(n,this,t,n);e&&(c.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(S[e]||(n=c.unique(n)),0===e.indexOf("parents")&&(n=n.reverse())),n=c(n),t?n.filter(t):n}}),f({parentsUntil:function(e,t){return m(e,"parentNode",t)},nextUntil:function(e,t){return g(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return g(e,"previousSibling",1,t).slice(1)}},function(r,i){c.fn[r]=function(t,e){var n=[];return this.each(function(){var e=i.call(n,this,t,n);e&&(c.isArray(e)?n.push.apply(n,e):n.push(e))}),1<this.length&&(n=c.unique(n),0!==r.indexOf("parents")&&"prevUntil"!==r||(n=n.reverse())),n=c(n),e?n.filter(e):n}}),c.fn.is=function(e){return!!e&&0<this.filter(e).length},c.fn.init.prototype=c.fn,c.overrideDefaults=function(n){function r(e,t){return i=i||n(),0===arguments.length&&(e=i.element),t=t||i.context,new r.fn.init(e,t)}var i;return c.extend(r,this),r},r.ie&&r.ie<8&&(y(A,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?b:t},size:function(e){var t=e.size;return 20===t?b:t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?b:t}}),y(A,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),r.ie&&r.ie<9&&(T.float="styleFloat",y(R,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),c.attrHooks=A,c.cssHooks=R,c}),e(h,[],function(){return function(b,e){function x(e,t,n,r){function i(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var $,t,u,c,w=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,C=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,E=/\s*([^:]+):\s*([^;]+);?/g,S=/\s+$/,_={},k="\ufeff";for(b=b||{},e&&(u=e.getValidStyles(),c=e.getInvalidStyles()),t=("\\\" \\' \\; \\: ; : "+k).split(" "),$=0;$<t.length;$++)_[t[$]]=k+$,_[k+$]=t[$];return{toHex:function(e){return e.replace(w,x)},parse:function(e){function t(e,t,n){var r,i,o,a;if((r=g[e+"-top"+t])&&((i=g[e+"-right"+t])&&((o=g[e+"-bottom"+t])&&(a=g[e+"-left"+t])))){var s=[r,i,o,a];for($=s.length-1;$--&&s[$]===s[$+1];);-1<$&&n||(g[e+t]=-1==$?s[0]:s.join(" "),delete g[e+"-top"+t],delete g[e+"-right"+t],delete g[e+"-bottom"+t],delete g[e+"-left"+t])}}function n(e){var t,n=g[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return g[e]=n[0],!0}}function r(e){return d=!0,_[e]}function s(e,t){return d&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return _[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function i(e){return String.fromCharCode(parseInt(e.slice(1),16))}function o(e){return e.replace(/\\[0-9a-f]+/gi,i)}function a(e,t,n,r,i,o){if(i=i||o)return"'"+(i=s(i)).replace(/\'/g,"\\'")+"'";if(t=s(t||n||r),!b.allow_script_urls){var a=t.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(a))return"";if(!b.allow_svg_data_urls&&/^data:image\/svg/i.test(a))return""}return v&&(t=v.call(y,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')"}var l,u,c,d,f,h,p,m,g={},v=b.url_converter,y=b.url_converter_scope||this;if(e){for(e=(e=e.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,r).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,r)});l=E.exec(e);)if(E.lastIndex=l.index+l[0].length,u=l[1].replace(S,"").toLowerCase(),c=l[2].replace(S,""),u&&c){if(u=o(u),c=o(c),-1!==u.indexOf(k)||-1!==u.indexOf('"'))continue;if(!b.allow_script_urls&&("behavior"==u||/expression\s*\(|\/\*|\*\//.test(c)))continue;"font-weight"===u&&"700"===c?c="bold":"color"!==u&&"background-color"!==u||(c=c.toLowerCase()),c=(c=c.replace(w,x)).replace(C,a),g[u]=d?s(c,!0):c}t("border","",!0),t("border","-width"),t("border","-color"),t("border","-style"),t("padding",""),t("margin",""),f="border",p="border-style",m="border-color",n(h="border-width")&&n(p)&&n(m)&&(g[f]=g[h]+" "+g[p]+" "+g[m],delete g[h],delete g[p],delete g[m]),"medium none"===g.border&&delete g.border,"none"===g["border-image"]&&delete g["border-image"]}return g},serialize:function(o,e){function t(e){var t,n,r,i;if(t=u[e])for(n=0,r=t.length;n<r;n++)e=t[n],(i=o[e])&&(l+=(0<l.length?" ":"")+e+": "+i+";")}var n,r,i,a,s,l="";if(e&&u)t("*"),t(e);else for(n in o)!(r=o[n])||c&&(i=n,a=e,s=void 0,(s=c["*"])&&s[i]||(s=c[a])&&s[i])||(l+=(0<l.length?" ":"")+n+": "+r+";");return l}}}}),e(p,[],function(){return function(e,s){function t(e,t,n,r){var i,o;if(e){if(!r&&e[t])return e[t];if(e!=s){if(i=e[n])return i;for(o=e.parentNode;o&&o!=s;o=o.parentNode)if(i=o[n])return i}}}var n=e;this.current=function(){return n},this.next=function(e){return n=t(n,"firstChild","nextSibling",e)},this.prev=function(e){return n=t(n,"lastChild","previousSibling",e)},this.prev2=function(e){return n=function(e,t,n,r){var i,o,a;if(e){if(i=e[n],s&&i===s)return;if(i){if(!r)for(a=i[t];a;a=a[t])if(!a[t])return a;return i}if((o=e.parentNode)&&o!==s)return o}}(n,"lastChild","previousSibling",e)}}}),e(m,[d],function(A){function R(c){function d(){return x.createDocumentFragment()}function t(e,t){o(C,e,t)}function n(e,t){o(E,e,t)}function r(e){t(e.parentNode,T(e))}function i(e){n(e.parentNode,T(e)+1)}function e(){return a($)}function f(e,t){var n;if(3==e.nodeType)return e;if(t<0)return e;for(n=e.firstChild;n&&0<t;)--t,n=n.nextSibling;return n||e}function h(e,t,n,r){var i,o,a,s,l,u;if(e==n)return t==r?0:t<r?-1:1;for(i=n;i&&i.parentNode!=e;)i=i.parentNode;if(i){for(o=0,a=e.firstChild;a!=i&&o<t;)o++,a=a.nextSibling;return t<=o?-1:1}for(i=e;i&&i.parentNode!=n;)i=i.parentNode;if(i){for(o=0,a=n.firstChild;a!=i&&o<r;)o++,a=a.nextSibling;return o<r?-1:1}for(s=c.findCommonAncestor(e,n),l=e;l&&l.parentNode!=s;)l=l.parentNode;for(l=l||s,u=n;u&&u.parentNode!=s;)u=u.parentNode;if(l==(u=u||s))return 0;for(a=s.firstChild;a;){if(a==l)return-1;if(a==u)return 1;a=a.nextSibling}}function o(e,t,n){var r,i;for(e?(b[_]=t,b[S]=n):(b[k]=t,b[N]=n),r=b[k];r.parentNode;)r=r.parentNode;for(i=b[_];i.parentNode;)i=i.parentNode;i==r?0<h(b[_],b[S],b[k],b[N])&&b.collapse(e):b.collapse(e),b.collapsed=b[_]==b[k]&&b[S]==b[N],b.commonAncestorContainer=c.findCommonAncestor(b[_],b[k])}function a(e){var t,n,r,i,o,a,s,l=0,u=0;if(b[_]==b[k])return function(e){var t,n,r,i,o,a,s,l,u;if(e!=w&&(t=d()),b[S]==b[N])return t;if(3==b[_].nodeType){if(n=b[_].nodeValue,r=n.substring(b[S],b[N]),e!=$&&(i=b[_],l=b[S],u=b[N]-b[S],0===l&&u>=i.nodeValue.length-1?i.parentNode.removeChild(i):i.deleteData(l,u),b.collapse(C)),e==w)return;return 0<r.length&&t.appendChild(x.createTextNode(r)),t}for(i=f(b[_],b[S]),o=b[N]-b[S];i&&0<o;)a=i.nextSibling,s=y(i,e),t&&t.appendChild(s),--o,i=a;return e!=$&&b.collapse(C),t}(e);for(n=(t=b[k]).parentNode;n;n=(t=n).parentNode){if(n==b[_])return p(t,e);++l}for(n=(t=b[_]).parentNode;n;n=(t=n).parentNode){if(n==b[k])return m(t,e);++u}for(r=u-l,i=b[_];0<r;)i=i.parentNode,r--;for(o=b[k];r<0;)o=o.parentNode,r++;for(a=i.parentNode,s=o.parentNode;a!=s;a=a.parentNode,s=s.parentNode)i=a,o=s;return function(e,t,n){var r,i,o,a,s,l,u;for(n!=w&&(i=d()),r=v(e,n),i&&i.appendChild(r),o=T(e),a=T(t),s=a-++o,l=e.nextSibling;0<s;)u=l.nextSibling,r=y(l,n),i&&i.appendChild(r),l=u,--s;return r=g(t,n),i&&i.appendChild(r),n!=$&&(b.setStartAfter(e),b.collapse(C)),i}(i,o,e)}function p(e,t){var n,r,i,o,a;if(t!=w&&(n=d()),r=g(e,t),n&&n.appendChild(r),(i=T(e)-b[S])<=0)return t!=$&&(b.setEndBefore(e),b.collapse(E)),n;for(r=e.previousSibling;0<i;)o=r.previousSibling,a=y(r,t),n&&n.insertBefore(a,n.firstChild),--i,r=o;return t!=$&&(b.setEndBefore(e),b.collapse(E)),n}function m(e,t){var n,r,i,o,a,s;for(t!=w&&(n=d()),i=v(e,t),n&&n.appendChild(i),r=T(e),++r,o=b[N]-r,i=e.nextSibling;i&&0<o;)a=i.nextSibling,s=y(i,t),n&&n.appendChild(s),--o,i=a;return t!=$&&(b.setStartAfter(e),b.collapse(C)),n}function g(e,t){var n,r,i,o,a,s=f(b[k],b[N]-1),l=s!=b[k];if(s==e)return u(s,l,E,t);for(r=u(n=s.parentNode,E,E,t);n;){for(;s;)i=s.previousSibling,o=u(s,l,E,t),t!=w&&r.insertBefore(o,r.firstChild),l=C,s=i;if(n==e)return r;s=n.previousSibling,a=u(n=n.parentNode,E,E,t),t!=w&&a.appendChild(r),r=a}}function v(e,t){var n,r,i,o,a,s=f(b[_],b[S]),l=s!=b[_];if(s==e)return u(s,l,C,t);for(r=u(n=s.parentNode,E,C,t);n;){for(;s;)i=s.nextSibling,o=u(s,l,C,t),t!=w&&r.appendChild(o),l=C,s=i;if(n==e)return r;s=n.nextSibling,a=u(n=n.parentNode,E,C,t),t!=w&&a.appendChild(r),r=a}}function u(e,t,n,r){var i,o,a,s,l;return t?y(e,r):3!=e.nodeType?r!=w?c.clone(e,E):void 0:(i=e.nodeValue,a=n?(s=b[S],o=i.substring(s),i.substring(0,s)):(s=b[N],o=i.substring(0,s),i.substring(s)),r!=$&&(e.nodeValue=a),r!=w?((l=c.clone(e,E)).nodeValue=o,l):void 0)}function y(e,t){return t!=w?t==$?c.clone(e,C):e:void e.parentNode.removeChild(e)}var b=this,x=c.doc,s=0,$=1,w=2,C=!0,E=!1,S="startOffset",_="startContainer",k="endContainer",N="endOffset",l=A.extend,T=c.nodeIndex;return l(b,{startContainer:x,startOffset:0,endContainer:x,endOffset:0,collapsed:C,commonAncestorContainer:x,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:t,setEnd:n,setStartBefore:r,setStartAfter:function(e){t(e.parentNode,T(e)+1)},setEndBefore:function(e){n(e.parentNode,T(e))},setEndAfter:i,collapse:function(e){e?(b[k]=b[_],b[N]=b[S]):(b[_]=b[k],b[S]=b[N]),b.collapsed=C},selectNode:function(e){r(e),i(e)},selectNodeContents:function(e){t(e,0),n(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)},compareBoundaryPoints:function(e,t){var n=b[_],r=b[S],i=b[k],o=b[N],a=t.startContainer,s=t.startOffset,l=t.endContainer,u=t.endOffset;return 0===e?h(n,r,a,s):1===e?h(i,o,a,s):2===e?h(i,o,l,u):3===e?h(n,r,l,u):void 0},deleteContents:function(){a(w)},extractContents:function(){return a(s)},cloneContents:e,insertNode:function(e){var t,n,r=this[_],i=this[S];3!==r.nodeType&&4!==r.nodeType||!r.nodeValue?(0<r.childNodes.length&&(n=r.childNodes[i]),n?r.insertBefore(e,n):3==r.nodeType?c.insertAfter(e,r):r.appendChild(e)):i?i>=r.nodeValue.length?c.insertAfter(e,r):(t=r.splitText(i),r.parentNode.insertBefore(e,t)):r.parentNode.insertBefore(e,r)},surroundContents:function(e){var t=b.extractContents();b.insertNode(e),e.appendChild(t),b.selectNode(e)},cloneRange:function(){return l(new R(c),{startContainer:b[_],startOffset:b[S],endContainer:b[k],endOffset:b[N],collapsed:b.collapsed,commonAncestorContainer:b.commonAncestorContainer})},toStringIE:function(){return c.create("body",null,e()).outerText}}),b}return R.prototype.toString=function(){return this.toStringIE()},R}),e(g,[d],function(e){function t(e,t){var n,r,i,o={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)r=String.fromCharCode(parseInt(e[n],t)),a[r]||(i="&"+e[n+1]+";",o[r]=i,o[i]=r);return o}}var r,a,n,i=e.makeMap,o=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,c={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};a={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},n={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},r=t("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var d={encodeRaw:function(e,t){return e.replace(t?o:s,function(e){return a[e]||e})},encodeAllRaw:function(e){return(""+e).replace(l,function(e){return a[e]||e})},encodeNumeric:function(e,t){return e.replace(t?o:s,function(e){return 1<e.length?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":a[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||r,e.replace(t?o:s,function(e){return a[e]||n[e]||e})},getEncodeFunc:function(e,n){return n=t(n)||r,(e=i(e.replace(/\+/g,","))).named&&e.numeric?function(e,t){return e.replace(t?o:s,function(e){return a[e]||n[e]||"&#"+e.charCodeAt(0)+";"||e})}:e.named?n?function(e,t){return d.encodeNamed(e,t,n)}:d.encodeNamed:e.numeric?d.encodeNumeric:d.encodeRaw},decode:function(e){return e.replace(u,function(e,t){return t?65535<(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):c[t]||String.fromCharCode(t):n[e]||r[e]||function(e){var t;return(t=document.createElement("div")).innerHTML=e,t.textContent||t.innerText||e}(e)})}};return d}),e(v,[d,r],function(v,y){return function(f,e){function h(e){f.getElementsByTagName("head")[0].appendChild(e)}var p,m=0,g={};p=(e=e||{}).maxLoadTime||5e3,this.load=function(e,t,n){function i(){for(var e=c.passed,t=e.length;t--;)e[t]();c.status=2,c.passed=[],c.failed=[]}function r(){for(var e=c.failed,t=e.length;t--;)e[t]();c.status=3,c.passed=[],c.failed=[]}function o(e,t){e()||((new Date).getTime()-u<p?y.setTimeout(t):r())}function a(){o(function(){for(var e,t,n=f.styleSheets,r=n.length;r--;)if((t=(e=n[r]).ownerNode?e.ownerNode:e.owningElement)&&t.id===s.id)return i(),!0},a)}var s,l,u,c,d;if(e=v._addCacheSuffix(e),g[e]?c=g[e]:(c={passed:[],failed:[]},g[e]=c),t&&c.passed.push(t),n&&c.failed.push(n),1!=c.status){if(2==c.status)return void i();if(3==c.status)return void r();if(c.status=1,(s=f.createElement("link")).rel="stylesheet",s.type="text/css",s.id="u"+m++,s.async=!1,s.defer=!1,u=(new Date).getTime(),"onload"in s&&!((d=navigator.userAgent.match(/WebKit\/(\d*)/))&&d[1]<536))s.onload=a,s.onerror=r;else{if(0<navigator.userAgent.indexOf("Firefox"))return(l=f.createElement("style")).textContent='@import "'+e+'"',function e(){o(function(){try{var e=l.sheet.cssRules;return i(),!!e}catch(e){}},e)}(),void h(l);a()}h(s),s.href=e}}}}),e(y,[u,f,h,a,p,m,g,i,d,v],function(i,l,o,a,c,t,e,r,s,u){function d(e,t){var n=t.attr("style");n=(n=e.serializeStyle(e.parseStyle(n),t[0].nodeName))||null,t.attr("data-mce-style",n)}function n(e,t){var n,r,i=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)r=e.nodeType,(!t||3!=r||r!=n&&e.nodeValue.length)&&(i++,n=r);return i}function f(e,t){var n,r=this;r.doc=e,r.win=window,r.files={},r.counter=0,r.stdMode=!v||8<=e.documentMode,r.boxModel=!v||"CSS1Compat"==e.compatMode||r.stdMode,r.styleSheetLoader=new u(e),r.boundEvents=[],r.settings=t=t||{},r.schema=t.schema,r.styles=new o({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),r.fixDoc(e),r.events=t.ownEvents?new a(t.proxy):a.Event,r.attrHooks=function(r,i){var e,t={},n=i.keep_values;return e={set:function(e,t,n){i.url_converter&&(t=i.url_converter.call(i.url_converter_scope||r,t,n,e[0])),e.attr("data-mce-"+n,t).attr(n,t)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},t={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(n&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(e){var t=e.attr("data-mce-style")||e.attr("style");return r.serializeStyle(r.parseStyle(t),e[0].nodeName)}}},n&&(t.href=t.src=e),t}(r,t),n=t.schema?t.schema.getBlockElements():{},r.$=l.overrideDefaults(function(){return{context:e,element:r.getRoot()}}),r.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!n[e.nodeName]):!!n[e]}}var h=s.each,p=s.is,m=s.grep,g=s.trim,v=r.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/;return f.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(t){var e,n=this.settings;if(v&&n.schema)for(e in"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(e){t.createElement(e)}),n.schema.getCustomElements())t.createElement(e)},clone:function(t,e){var n,r,i=this;return!v||1!==t.nodeType||e?t.cloneNode(e):(r=i.doc,e?n.firstChild:(n=r.createElement(t.nodeName),h(i.getAttribs(t),function(e){i.setAttrib(n,e.nodeName,i.getAttrib(t,e.nodeName))}),n))},getRoot:function(){return this.settings.root_element||this.doc.body},getViewPort:function(e){var t,n;return t=(e=e||this.win).document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n;return e=this.get(e),t=this.getPos(e),n=this.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n;return e=this.get(e),t=this.getStyle(e,"width"),n=this.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,n,r){var i,o=this,a=[];for(e=o.get(e),r=r===ye,n=n||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),p(t,"string")&&(t="*"===(i=t)?function(e){return 1==e.nodeType}:function(e){return o.is(e,i)});e&&e!=n&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!r)return e;a.push(e)}e=e.parentNode}return r?a:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(e))&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(e,t){return i(e,this.get(t)||this.settings.root_element||this.doc,[])},is:function(e,t){var n;if(e.length===ye){if("*"===t)return 1==e.nodeType;if(y.test(t)){for(t=t.toLowerCase().split(/,/),e=e.nodeName.toLowerCase(),n=t.length-1;0<=n;n--)if(t[n]==e)return!0;return!1}}if(e.nodeType&&1!=e.nodeType)return!1;var r=e.nodeType?[e]:e;return 0<i(t,r[0].ownerDocument||r[0],null,r).length},add:function(e,n,r,i,o){var a=this;return this.run(e,function(e){var t;return t=p(n,"string")?a.doc.createElement(n):n,a.setAttribs(t,r),i&&(i.nodeType?t.appendChild(i):a.setHTML(t,i)),o?t:e.appendChild(t)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r,i="";for(r in i+="<"+e,t)t.hasOwnProperty(r)&&null!==t[r]&&void 0!==t[r]&&(i+=" "+r+'="'+this.encode(t[r])+'"');return void 0!==n?i+">"+n+"</"+e+">":i+" />"},createFragment:function(e){var t,n,r,i=this.doc;for(r=i.createElement("div"),t=i.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),1<e.length?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&d(this,e)},getStyle:function(e,t,n){return e=this.$$(e),n?e.css(t):("float"==(t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(t=r.ie&&r.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[t]:ye)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&d(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;0<=t;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r,i,o=this.settings;""===n&&(n=null),r=(e=this.$$(e)).attr(t),e.length&&((i=this.attrHooks[t])&&i.set?i.set(e,n,t):e.attr(t,n),r!=n&&o.onSetAttrib&&o.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var r=this;r.$$(e).each(function(e,n){h(t,function(e,t){r.setAttrib(n,t,e)})})},getAttrib:function(e,t,n){var r,i;return(e=this.$$(e)).length&&(i=(r=this.attrHooks[t])&&r.get?r.get(e,t):e.attr(t)),void 0===i&&(i=n||""),i},getPos:function(e,t){var n,r,i=0,o=0,a=this.doc,s=a.body;if(t=t||s,e=this.get(e)){if(t===s&&e.getBoundingClientRect&&"static"===l(s).css("position"))return r=e.getBoundingClientRect(),t=this.boxModel?a.documentElement:s,{x:i=r.left+(a.documentElement.scrollLeft||s.scrollLeft)-t.clientLeft,y:o=r.top+(a.documentElement.scrollTop||s.scrollTop)-t.clientTop};for(n=e;n&&n!=t&&n.nodeType;)i+=n.offsetLeft||0,o+=n.offsetTop||0,n=n.offsetParent;for(n=e.parentNode;n&&n!=t&&n.nodeType;)i-=n.scrollLeft||0,o-=n.scrollTop||0,n=n.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,r=this.doc;if(this!==f.DOM&&r===document){var i=f.DOM.addedStyles;if((i=i||[])[e])return;i[e]=!0,f.DOM.addedStyles=i}(n=r.getElementById("mceDefaultStyles"))||((n=r.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=r.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(r.createTextNode(e))},loadCSS:function(e){var n,r=this,i=r.doc;return r!==f.DOM&&i===document?void f.DOM.loadCSS(e):(e=e||"",n=i.getElementsByTagName("head")[0],void h(e.split(","),function(e){var t;e=s._addCacheSuffix(e),r.files[e]||(r.files[e]=!0,t=r.create("link",{rel:"stylesheet",href:e}),v&&i.documentMode&&i.recalc&&(t.onload=function(){i.recalc&&i.recalc(),t.onload=null}),n.appendChild(t))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,n){this.$$(e).toggleClass(t,n).each(function(){""===this.className&&l(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,n){e=this.$$(e),v?e.each(function(e,t){if(!1!==t.canHaveHTML){for(;t.firstChild;)t.removeChild(t.firstChild);try{t.innerHTML="<br>"+n,t.removeChild(t.firstChild)}catch(e){l("<div></div>").html("<br>"+n).contents().slice(1).appendTo(t)}return n}}):e.html(n)},getOuterHTML:function(e){return 1==(e=this.get(e)).nodeType&&"outerHTML"in e?e.outerHTML:l("<div></div>").append(l(e).clone()).html()},setOuterHTML:function(e,t){var n=this;n.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}n.remove(l(this).html(t),!0)})},decode:e.decode,encode:e.encodeAllRaw,insertAfter:function(e,r){return r=this.get(r),this.run(e,function(e){var t,n;return t=r.parentNode,(n=r.nextSibling)?t.insertBefore(e,n):t.appendChild(e),e})},replace:function(t,e,n){return this.run(e,function(e){return p(e,"array")&&(t=t.cloneNode(!0)),n&&h(m(e.childNodes),function(e){t.appendChild(e)}),e.parentNode.replaceChild(t,e)})},rename:function(t,e){var n,r=this;return t.nodeName!=e.toUpperCase()&&(n=r.create(e),h(r.getAttribs(t),function(e){r.setAttrib(n,e.nodeName,r.getAttrib(t,e.nodeName))}),r.replace(n,t,1)),n||t},findCommonAncestor:function(e,t){for(var n,r=e;r;){for(n=t;n&&r!=n;)n=n.parentNode;if(r==n)break;r=r.parentNode}return!r&&e.ownerDocument?e.ownerDocument.documentElement:r},toHex:function(e){return this.styles.toHex(s.trim(e))},run:function(e,n,r){var i,o=this;return"string"==typeof e&&(e=o.get(e)),!!e&&(r=r||this,e.nodeType||!e.length&&0!==e.length?n.call(r,e):(i=[],h(e,function(e,t){e&&("string"==typeof e&&(e=o.get(e)),i.push(n.call(r,e,t)))}),i))},getAttribs:function(e){var t;if(!(e=this.get(e)))return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});return e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n,r,i,o,a,s,l=0;if(e=e.firstChild){a=new c(e,e.parentNode),t=t||(this.schema?this.schema.getNonEmptyElements():null),o=this.schema?this.schema.getWhiteSpaceElements():{};do{if(1===(i=e.nodeType)){var u=e.getAttribute("data-mce-bogus");if(u){e=a.next("all"===u);continue}if(s=e.nodeName.toLowerCase(),t&&t[s]){if("br"!==s)return!1;l++,e=a.next();continue}for(n=(r=this.getAttribs(e)).length;n--;)if("name"===(s=r[n].nodeName)||"data-mce-bookmark"===s)return!1}if(8==i)return!1;if(3===i&&!b.test(e.nodeValue))return!1;if(3===i&&e.parentNode&&o[e.parentNode.nodeName]&&b.test(e.nodeValue))return!1;e=a.next()}while(e)}return l<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new t(this)},nodeIndex:n,split:function(e,t,n){function l(e){var t,n,r,i,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(t=o.length-1;0<=t;t--)l(o[t]);if(9!=a){if(3==a&&0<e.nodeValue.length){var s=g(e.nodeValue).length;if(!u.isBlock(e.parentNode)||0<s||0===s&&(r=(n=e).previousSibling&&"SPAN"==n.previousSibling.nodeName,i=n.nextSibling&&"SPAN"==n.nextSibling.nodeName,r&&i))return}else if(1==a&&(1==(o=e.childNodes).length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;u.remove(e)}return e}}var r,i,o,u=this,a=u.createRng();if(e&&t)return a.setStart(e.parentNode,u.nodeIndex(e)),a.setEnd(t.parentNode,u.nodeIndex(t)),r=a.extractContents(),(a=u.createRng()).setStart(t.parentNode,u.nodeIndex(t)+1),a.setEnd(e.parentNode,u.nodeIndex(e)+1),i=a.extractContents(),(o=e.parentNode).insertBefore(l(r),e),n?o.insertBefore(n,e):o.insertBefore(t,e),o.insertBefore(l(i),e),u.remove(e),n||t},bind:function(e,t,n,r){if(s.isArray(e)){for(var i=e.length;i--;)e[i]=this.bind(e[i],t,n,r);return e}return!this.settings.collect||e!==this.doc&&e!==this.win||this.boundEvents.push([e,t,n,r]),this.events.bind(e,t,n,r||this)},unbind:function(e,t,n){var r;if(s.isArray(e)){for(r=e.length;r--;)e[r]=this.unbind(e[r],t,n);return e}if(this.boundEvents&&(e===this.doc||e===this.win))for(r=this.boundEvents.length;r--;){var i=this.boundEvents[r];e!=i[0]||t&&t!=i[1]||n&&n!=i[2]||this.events.unbind(i[0],i[1],i[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){if(this.boundEvents){for(var e=this.boundEvents.length;e--;){var t=this.boundEvents[e];this.events.unbind(t[0],t[1],t[2])}this.boundEvents=null}i.setDocument&&i.setDocument(),this.win=this.doc=this.root=this.events=this.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},f.DOM=new f(document),f.nodeIndex=n,f}),e(b,[y,d],function(e,d){function t(){var s={},i=[],l={},u=[],c=0;this.isDone=function(e){return 2==s[e]},this.markDone=function(e){s[e]=2},this.add=this.load=function(e,t,n,r){null==s[e]&&(i.push(e),s[e]=0),t&&(l[e]||(l[e]=[]),l[e].push({success:t,failure:r,scope:n||this}))},this.remove=function(e){delete s[e],delete l[e]},this.loadQueue=function(e,t,n){this.loadScripts(i,e,t,n)},this.loadScripts=function(t,e,n,r){function i(t,e){p(l[e],function(e){f(e[t])&&e[t].call(e.scope)}),l[e]=void 0}var o,a=[];u.push({success:e,failure:r,scope:n||this}),(o=function(){var e=m(t);t.length=0,p(e,function(e){return 2===s[e]?void i("success",e):3===s[e]?void i("failure",e):void(1!==s[e]&&(s[e]=1,c++,function(e,t,n){function r(){a.remove(o),i&&(i.onreadystatechange=i.onload=i=null),t()}var i,o,a=h;o=a.uniqueId(),(i=document.createElement("script")).id=o,i.type="text/javascript",i.src=d._addCacheSuffix(e),"onreadystatechange"in i?i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&r()}:i.onload=r,i.onerror=function(){f(n)?n():"undefined"!=typeof console&&console.log&&console.log("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(i)}(e,function(){s[e]=2,c--,i("success",e),o()},function(){s[e]=3,c--,a.push(e),i("failure",e),o()})))}),c||(p(u,function(e){0===a.length?f(e.success)&&e.success.call(e.scope):f(e.failure)&&e.failure.call(e.scope,a)}),u.length=0)})()}}function f(e){return"function"==typeof e}var h=e.DOM,p=d.each,m=d.grep;return t.ScriptLoader=new t,t}),e(x,[b,d],function(l,e){function u(){this.items=[],this.urls={},this.lookup={}}var c=e.each;return u.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:ye},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(e,t){var n=u.language;if(n&&!1!==u.languageLoad){if(t)if(-1!=(t=","+t+",").indexOf(","+n.substr(0,2)+","))n=n.substr(0,2);else if(-1==t.indexOf(","+n+","))return;l.ScriptLoader.add(this.urls[e]+"/langs/"+n+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(e,t){var n=this.urls[e];c(t,function(e){l.ScriptLoader.add(n+"/"+e)})},load:function(t,n,r,i,e){function o(){var e=a.dependencies(t);c(e,function(e){var t=a.createUrl(n,e);a.load(t.resource,t,ye,ye)}),r&&(i?r.call(i):r.call(l))}var a=this,s=n;a.urls[t]||("object"==typeof n&&(s=n.prefix+n.resource+n.suffix),0!==s.indexOf("/")&&-1==s.indexOf("://")&&(s=u.baseURL+"/"+s),a.urls[t]=s.substring(0,s.lastIndexOf("/")),a.lookup[t]?o():l.ScriptLoader.add(s,o,i,e))}},u.PluginManager=new u,u.ThemeManager=new u,u}),e($,[],function(){function e(t){return function(e){return!!e&&e.nodeType==t}}function t(r){return r=r.toLowerCase().split(" "),function(e){var t,n;if(e&&e.nodeType)for(n=e.nodeName.toLowerCase(),t=0;t<r.length;t++)if(n===r[t])return!0;return!1}}function n(t){return function(e){if(i(e)){if(e.contentEditable===t)return!0;if(e.getAttribute("data-mce-contenteditable")===t)return!0}return!1}}var i=e(1);return{isText:e(3),isElement:i,isComment:e(8),isBr:t("br"),isContentEditableTrue:n("true"),isContentEditableFalse:n("false"),matchNodeNames:t,hasPropValue:function(t,n){return function(e){return i(e)&&e[t]===n}},hasAttributeValue:function(t,n){return function(e){return i(e)&&e.getAttribute(t)===n}},matchStyleValues:function(n,r){return r=r.toLowerCase().split(" "),function(e){var t;if(i(e))for(t=0;t<r.length;t++)if(getComputedStyle(e,null).getPropertyValue(n)===r[t])return!0;return!1}},isBogus:function(e){return i(e)&&e.hasAttribute("data-mce-bogus")}}}),e(w,[],function(){var t="\ufeff";return{isZwsp:function(e){return e==t},ZWSP:t,trim:function(e){return e.replace(new RegExp(t,"g"),"")}}}),e(C,[$,w],function(r,o){function t(e){return d(e)&&(e=e.parentNode),c(e)&&e.hasAttribute("data-mce-caret")}function n(e){return d(e)&&o.isZwsp(e.data)}function a(e){return t(e)||n(e)}function i(e){var t=e.parentNode;t&&t.removeChild(e)}function s(e){return e.firstChild!==e.lastChild||!r.isBr(e.firstChild)}function l(e){return d(e)&&e.data[0]==o.ZWSP}function u(e){return d(e)&&e.data[e.data.length-1]==o.ZWSP}var c=r.isElement,d=r.isText;return{isCaretContainer:a,isCaretContainerBlock:t,isCaretContainerInline:n,showCaretContainerBlock:function(e){return e&&e.hasAttribute("data-mce-caret")?(function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];r.isBogus(n)&&n.parentNode.removeChild(n)}(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},insertInline:function(e,t){var n,r,i;if(r=e.ownerDocument.createTextNode(o.ZWSP),i=e.parentNode,t){if(n=e.previousSibling,d(n)){if(a(n))return n;if(u(n))return n.splitText(n.data.length-1)}i.insertBefore(r,e)}else{if(n=e.nextSibling,d(n)){if(a(n))return n;if(l(n))return n.splitText(1),n}e.nextSibling?i.insertBefore(r,e.nextSibling):i.appendChild(r)}return r},insertBlock:function(e,t,n){var r,i;return(r=t.ownerDocument.createElement(e)).setAttribute("data-mce-caret",n?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e}()),i=t.parentNode,n?i.insertBefore(r,t):t.nextSibling?i.insertBefore(r,t.nextSibling):i.appendChild(r),r},hasContent:s,remove:function(e){c(e)&&a(e)&&(s(e)?e.removeAttribute("data-mce-caret"):i(e)),d(e)&&function(e,t){0===t.length?i(e):e.nodeValue=t}(e,o.trim(function(e){try{return e.nodeValue}catch(e){return""}}(e)))},startsWithCaretContainer:l,endsWithCaretContainer:u}}),e(E,[d,p,$,m,C],function(a,y,e,t,n){function o(e){return l(e)||$(e)}function s(e,t,n){for(;e&&e!==t;){if(n(e))return e;e=e.parentNode}return null}function r(e){return"_mce_caret"===e.id}function b(e,t){return w(e)&&!1===function(e,t,n){return null!==s(e,t,n)}(e,t,r)}function i(v){this.walk=function(e,i){function o(e){var t;return 3===(t=e[0]).nodeType&&t===h&&p>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===g&&0<e.length&&t===m&&3===t.nodeType&&e.splice(e.length-1,1),e}function a(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function t(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function n(e,t,n){var r=n?"nextSibling":"previousSibling";for(c=(u=e).parentNode;u&&u!=t;u=c)c=u.parentNode,(d=a(u==e?u:u[r],r)).length&&(n||d.reverse(),i(o(d)))}var r,s,l,u,c,d,f,h=e.startContainer,p=e.startOffset,m=e.endContainer,g=e.endOffset;if(0<(f=v.select("td[data-mce-selected],th[data-mce-selected]")).length)x(f,function(e){i([e])});else{if(1==h.nodeType&&h.hasChildNodes()&&(h=h.childNodes[p]),1==m.nodeType&&m.hasChildNodes()&&(m=function(e,t){var n=e.childNodes;return--t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}(m,g)),h==m)return i(o([h]));for(r=v.findCommonAncestor(h,m),u=h;u;u=u.parentNode){if(u===m)return n(h,r,!0);if(u===r)break}for(u=m;u;u=u.parentNode){if(u===h)return n(m,r);if(u===r)break}s=t(h,r)||h,l=t(m,r)||m,n(h,s,!0),(d=a(s==h?s:s.nextSibling,"nextSibling",l==m?l.nextSibling:l)).length&&i(o(d)),n(m,l)}},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?0<r&&r<n.nodeValue.length&&(n=(i=t(n,r)).previousSibling,r<o?(n=i=t(i,o-=r).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&0<r&&r<n.nodeValue.length&&(n=t(n,r),r=0),3==i.nodeType&&0<o&&o<i.nodeValue.length&&(o=(i=t(i,o).previousSibling).nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}},this.normalize=function(p){function e(e){function t(e,t){for(var n=new y(e,v.getParent(e.parentNode,v.isBlock)||h);e=n[t?"prev":"next"]();)if("BR"===e.nodeName)return!0}function n(e,t){var n,r,i;if(t=t||o,i=v.getParent(t.parentNode,v.isBlock)||h,e&&"BR"==t.nodeName&&u&&v.isEmpty(i))return o=t.parentNode,a=v.nodeIndex(t),void(m=!0);for(n=new y(t,i);s=n[e?"prev":"next"]();){if("false"===v.getContentEditableParent(s)||b(s,v.getRoot()))return;if(3===s.nodeType&&0<s.nodeValue.length)return o=s,a=e?s.nodeValue.length:0,void(m=!0);if(v.isBlock(s)||l[s.nodeName.toLowerCase()])return;r=s}g&&r&&(o=r,m=!0,a=0)}var o,a,r,s,l,i,u,c,d,f,h=v.getRoot();if(o=p[(e?"start":"end")+"Container"],a=p[(e?"start":"end")+"Offset"],u=1==o.nodeType&&a===o.childNodes.length,l=v.schema.getNonEmptyElements(),i=e,!w(o)){if(1==o.nodeType&&a>o.childNodes.length-1&&(i=!1),9===o.nodeType&&(o=v.getRoot(),a=0),o===h){if(i&&(s=o.childNodes[0<a?a-1:0])){if(w(s))return;if(l[s.nodeName]||"TABLE"==s.nodeName)return}if(o.hasChildNodes()){if(a=Math.min(!i&&0<a?a-1:a,o.childNodes.length-1),o=o.childNodes[a],a=0,!g&&o===h.lastChild&&"TABLE"===o.nodeName)return;if(function(e){for(;e&&e!=h;){if($(e))return!0;e=e.parentNode}return!1}(o)||w(o))return;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){r=new y(s=o,h);do{if($(s)||w(s)){m=!1;break}if(3===s.nodeType&&0<s.nodeValue.length){a=i?0:s.nodeValue.length,o=s,m=!0;break}if(l[s.nodeName.toLowerCase()]&&(!(f=s)||!/^(TD|TH|CAPTION)$/.test(f.nodeName))){a=v.nodeIndex(s),o=s.parentNode,"IMG"!=s.nodeName||i||a++,m=!0;break}}while(s=i?r.next():r.prev())}}}g&&(3===o.nodeType&&0===a&&n(!0),1===o.nodeType&&(!(s=(s=o.childNodes[a])||o.childNodes[a-1])||"BR"!==s.nodeName||(d="A",(c=s).previousSibling&&c.previousSibling.nodeName==d)||t(s)||t(s,!0)||n(!0,s))),i&&!g&&3===o.nodeType&&a===o.nodeValue.length&&n(!1),m&&p["set"+(e?"Start":"End")](o,a)}}var m,g;return g=p.collapsed,e(!0),g||e(),m&&g&&p.collapse(!0),m}}var x=a.each,l=e.isContentEditableTrue,$=e.isContentEditableFalse,w=n.isCaretContainer;return i.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},i.getCaretRangeFromPoint=function(t,n,r){var i,e;if(r.caretPositionFromPoint)e=r.caretPositionFromPoint(t,n),(i=r.createRange()).setStart(e.offsetNode,e.offset),i.collapse(!0);else if(r.caretRangeFromPoint)i=r.caretRangeFromPoint(t,n);else if(r.body.createTextRange){i=r.body.createTextRange();try{i.moveToPoint(t,n),i.collapse(!0)}catch(e){i=function(e,n,t){var r,i,o;if(r=t.elementFromPoint(e,n),i=t.body.createTextRange(),r&&"HTML"!=r.tagName||(r=t.body),i.moveToElementText(r),0<(o=(o=a.toArray(i.getClientRects())).sort(function(e,t){return(e=Math.abs(Math.max(e.top-n,e.bottom-n)))-(t=Math.abs(Math.max(t.top-n,t.bottom-n)))})).length){n=(o[0].bottom+o[0].top)/2;try{return i.moveToPoint(e,n),i.collapse(!0),i}catch(e){}}return null}(t,n,r)}return function(e,t){var n=e&&e.parentElement?e.parentElement():null;return $(s(n,t,o))?null:e}(i,r.body)}return i},i.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},i.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},i}),e(S,[E,i,r],function(a,t,n){return function(o){var r,i=[];"onselectionchange"in o.getDoc()||o.on("NodeChange Click MouseUp KeyUp Focus",function(e){var t,n;n={startContainer:(t=o.selection.getRng()).startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset},"nodechange"!=e.type&&a.compareRanges(n,r)||o.fire("SelectionChange"),r=n}),o.on("contextmenu",function(){o.fire("SelectionChange")}),o.on("SelectionChange",function(){var e=o.selection.getStart(!0);!t.range&&o.selection.isCollapsed()||!function(e){var t,n;if((n=o.$(e).parentsUntil(o.getBody()).add(e)).length===i.length){for(t=n.length;0<=t&&n[t]===i[t];t--);if(-1===t)return i=n,!0}return i=n,!1}(e)&&o.dom.isChildOf(e,o.getBody())&&o.nodeChanged({selectionChange:!0})}),o.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==o.selection.getNode().nodeName?n.setEditorTimeout(o,function(){o.nodeChanged()}):o.nodeChanged())}),this.nodeChanged=function(e){var t,n,r,i=o.selection;o.initialized&&i&&!o.settings.disable_nodechange&&!o.readonly&&(r=o.getBody(),(t=i.getStart()||r).ownerDocument==o.getDoc()&&o.dom.isChildOf(t,r)||(t=r),"IMG"==t.nodeName&&i.isCollapsed()&&(t=t.parentNode),n=[],o.dom.getParent(t,function(e){return e===r||void n.push(e)}),(e=e||{}).element=t,e.parents=n,o.fire("NodeChange",e))}}}),e(_,[],function(){function o(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function a(e,t){this.name=e,1===(this.type=t)&&(this.attributes=[],this.attributes.map={})}var s=/^[ \t\r\n]*$/,i={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return a.prototype={replace:function(e){return e.parent&&e.remove(),this.insert(e,this),this.remove(),this},attr:function(e,t){var n,r;if("string"!=typeof e){for(r in e)this.attr(r,e[r]);return this}if(n=this.attributes){if(void 0===t)return n.map[e];if(null===t){if(e in n.map)for(delete n.map[e],r=n.length;r--;)if(n[r].name===e)return n=n.splice(r,1),this;return this}if(e in n.map){for(r=n.length;r--;)if(n[r].name===e){n[r].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,this}},clone:function(){var e,t,n,r,i,o=new a(this.name,this.type);if(n=this.attributes){for((i=[]).map={},e=0,t=n.length;e<t;e++)"id"!==(r=n[e]).name&&(i[i.length]={name:r.name,value:r.value},i.map[r.name]=r.value);o.attributes=i}return o.value=this.value,o.shortEnded=this.shortEnded,o},wrap:function(e){return this.parent.insert(e,this),e.append(this),this},unwrap:function(){var e,t;for(e=this.firstChild;e;)t=e.next,this.insert(e,this,!0),e=t;this.remove()},remove:function(){var e=this.parent,t=this.next,n=this.prev;return e&&(e.firstChild===this?(e.firstChild=t)&&(t.prev=null):n.next=t,e.lastChild===this?(e.lastChild=n)&&(n.next=null):t.prev=n,this.parent=this.next=this.prev=null),this},append:function(e){var t;return e.parent&&e.remove(),(t=this.lastChild)?((t.next=e).prev=t,this.lastChild=e):this.lastChild=this.firstChild=e,e.parent=this,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,(e.next=t).prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,(e.prev=t).next=e),e.parent=r,e},getAll:function(e){var t,n=[];for(t=this.firstChild;t;t=o(t,this))t.name===e&&n.push(t);return n},empty:function(){var e,t,n;if(this.firstChild){for(e=[],n=this.firstChild;n;n=o(n,this))e.push(n);for(t=e.length;t--;)(n=e[t]).parent=n.firstChild=n.lastChild=n.next=n.prev=null}return this.firstChild=this.lastChild=null,this},isEmpty:function(e,t){var n,r,i=this.firstChild;if(t=t||{},i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(e[i.name])return!1;for(n=i.attributes.length;n--;)if("name"===(r=i.attributes[n].name)||0===r.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!s.test(i.value))return!1;if(3===i.type&&i.parent&&t[i.parent.name]&&s.test(i.value))return!1}while(i=o(i,this));return!0},walk:function(e){return o(this,null,e)}},a.create=function(e,t){var n,r;if(n=new a(e,i[e]||1),t)for(r in t)n.attr(r,t[r]);return n},a}),e(k,[d],function(n){function k(e,t){return(e=n.trim(e))?e.split(t||" "):[]}function N(e,n){var r;return e&&(r={},"string"==typeof e&&(e={"*":e}),B(e,function(e,t){r[t]=r[t.toUpperCase()]="map"==n?R(e,/[, ]/):M(e,/[, ]/)})),r}var T={},A={},R=n.makeMap,B=n.each,D=n.extend,M=n.explode,O=n.inArray;return function(o){function e(e,t,n){var r=o[e];return r?r=R(r,/[, ]/,R(r.toUpperCase(),/[, ]/)):(r=T[e])||(r=R(t," ",R(t.toUpperCase()," ")),r=D(r,n),T[e]=r),r}function C(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function t(e){var t,n,r,i,o,a,s,l,u,c,d,f,h,p,m,g,v,y,b,x=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,$=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,w=/[*?+]/;if(e)for(e=k(e,","),E["@"]&&(g=E["@"].attributes,v=E["@"].attributesOrder),t=0,n=e.length;t<n;t++)if(o=x.exec(e[t])){if(p=o[1],u=o[2],m=o[3],l=o[5],a={attributes:f={},attributesOrder:h=[]},"#"===p&&(a.paddEmpty=!0),"-"===p&&(a.removeEmpty=!0),"!"===o[4]&&(a.removeEmptyAttrs=!0),g){for(y in g)f[y]=g[y];h.push.apply(h,v)}if(l)for(r=0,i=(l=k(l,"|")).length;r<i;r++)if(o=$.exec(l[r])){if(s={},d=o[1],c=o[2].replace(/::/g,":"),p=o[3],b=o[4],"!"===d&&(a.attributesRequired=a.attributesRequired||[],a.attributesRequired.push(c),s.required=!0),"-"===d){delete f[c],h.splice(O(h,c),1);continue}p&&("="===p&&(a.attributesDefault=a.attributesDefault||[],a.attributesDefault.push({name:c,value:b}),s.defaultValue=b),":"===p&&(a.attributesForced=a.attributesForced||[],a.attributesForced.push({name:c,value:b}),s.forcedValue=b),"<"===p&&(s.validValues=R(b,"?"))),w.test(c)?(a.attributePatterns=a.attributePatterns||[],s.pattern=C(c),a.attributePatterns.push(s)):(f[c]||h.push(c),f[c]=s)}g||"@"!=u||(g=f,v=h),m&&(a.outputName=u,E[m]=a),w.test(u)?(a.pattern=C(u),S.push(a)):E[u]=a}}function n(e){E={},S=[],t(e),B(u,function(e,t){$[t]=e.children})}function r(e){var a=/^(~)?(.+)$/;e&&(T.text_block_elements=T.block_elements=null,B(k(e,","),function(e){var t=a.exec(e),n="~"===t[1],r=n?"span":"div",i=t[2];if($[i]=$[r],w[i]=r,n||(m[i.toUpperCase()]={},m[i]={}),!E[i]){var o=E[r];delete(o=D({},o)).removeEmptyAttrs,delete o.removeEmpty,E[i]=o}B($,function(e,t){e[r]&&($[t]=e=D({},$[t]),e[i]=e[r])})}))}function i(e){var i=/^([+\-]?)(\w+)\[([^\]]+)\]$/;T[o.schema]=null,e&&B(k(e,","),function(e){var t,n,r=i.exec(e);r&&(n=r[1],t=n?$[r[2]]:$[r[2]]={"#comment":{}},t=$[r[2]],B(k(r[3],"|"),function(e){"-"===n?delete t[e]:t[e]={}}))})}function a(e){var t,n=E[e];if(n)return n;for(t=S.length;t--;)if((n=S[t]).pattern.test(e))return n}var s,l,u,c,d,f,h,p,m,g,v,y,b,x=this,E={},$={},S=[],w={},_={};u=function(e){function t(e,t,n){function r(e,t){var n,r,i={};for(n=0,r=e.length;n<r;n++)i[e[n]]=t||{};return i}var i,o,a;for(t=t||"","string"==typeof(n=n||[])&&(n=k(n)),i=(e=k(e)).length;i--;)a={attributes:r(o=k([s,t].join(" "))),attributesOrder:o,children:r(n,A)},u[e[i]]=a}function n(e,t){var n,r,i,o;for(n=(e=k(e)).length,t=k(t);n--;)for(r=u[e[n]],i=0,o=t.length;i<o;i++)r.attributes[t[i]]={},r.attributesOrder.push(t[i])}var s,r,i,o,a,l,u={};return T[e]?T[e]:(s="id accesskey class dir lang style tabindex title",r="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",i="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment","html4"!=e&&(s+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",r+=" article aside details dialog figure header footer hgroup section nav",i+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!=e&&(s+=" xml:lang",i=[i,l="acronym applet basefont big font strike tt"].join(" "),B(k(l),function(e){t(e,"",i)}),r=[r,a="center dir isindex noframes"].join(" "),o=[r,i].join(" "),B(k(a),function(e){t(e,"",o)})),o=o||[r,i].join(" "),t("html","manifest","head body"),t("head","","base command link meta noscript script style title"),t("title hr noscript br"),t("base","href target"),t("link","href rel media hreflang type sizes hreflang"),t("meta","name http-equiv content charset"),t("style","media type scoped"),t("script","src async defer type charset"),t("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",o),t("address dt dd div caption","",o),t("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",i),t("blockquote","cite",o),t("ol","reversed start type","li"),t("ul","","li"),t("li","value",o),t("dl","","dt dd"),t("a","href target rel media hreflang type",i),t("q","cite",i),t("ins del","cite datetime",o),t("img","src sizes srcset alt usemap ismap width height"),t("iframe","src name width height",o),t("embed","src type width height"),t("object","data type typemustmatch name usemap form width height",[o,"param"].join(" ")),t("param","name value"),t("map","name",[o,"area"].join(" ")),t("area","alt coords shape href target rel media hreflang type"),t("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),t("colgroup","span","col"),t("col","span"),t("tbody thead tfoot","","tr"),t("tr","","td th"),t("td","colspan rowspan headers",o),t("th","colspan rowspan headers scope abbr",o),t("form","accept-charset action autocomplete enctype method name novalidate target",o),t("fieldset","disabled form name",[o,"legend"].join(" ")),t("label","form for",i),t("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),t("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?o:i),t("select","disabled form multiple name required size","option optgroup"),t("optgroup","disabled label","option"),t("option","disabled label selected value"),t("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),t("menu","type label",[o,"li"].join(" ")),t("noscript","",o),"html4"!=e&&(t("wbr"),t("ruby","",[i,"rt rp"].join(" ")),t("figcaption","",o),t("mark rt rp summary bdi","",i),t("canvas","width height",o),t("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[o,"track source"].join(" ")),t("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[o,"track source"].join(" ")),t("picture","","img source"),t("source","src srcset type media sizes"),t("track","kind src srclang label default"),t("datalist","",[i,"option"].join(" ")),t("article section nav aside header footer","",o),t("hgroup","","h1 h2 h3 h4 h5 h6"),t("figure","",[o,"figcaption"].join(" ")),t("time","datetime",i),t("dialog","open",o),t("command","type label icon disabled checked radiogroup command"),t("output","for form name",i),t("progress","value max",i),t("meter","value min max low high optimum",i),t("details","open",[o,"summary"].join(" ")),t("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(n("script","language xml:space"),n("style","xml:space"),n("object","declare classid code codebase codetype archive standby align border hspace vspace"),n("embed","align name hspace vspace"),n("param","valuetype type"),n("a","charset name rev shape coords"),n("br","clear"),n("applet","codebase archive code object alt name width height align hspace vspace"),n("img","name longdesc align border hspace vspace"),n("iframe","longdesc frameborder marginwidth marginheight scrolling align"),n("font basefont","size color face"),n("input","usemap align"),n("select","onchange"),n("textarea"),n("h1 h2 h3 h4 h5 h6 div p legend caption","align"),n("ul","type compact"),n("li","type"),n("ol dl menu dir","compact"),n("pre","width xml:space"),n("hr","align noshade size width"),n("isindex","prompt"),n("table","summary width frame rules cellspacing cellpadding align bgcolor"),n("col","width align char charoff valign"),n("colgroup","width align char charoff valign"),n("thead","align char charoff valign"),n("tr","align char charoff valign bgcolor"),n("th","axis align char charoff valign nowrap bgcolor width height"),n("form","accept"),n("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),n("tfoot","align char charoff valign"),n("tbody","align char charoff valign"),n("area","nohref"),n("body","background bgcolor text link vlink alink")),"html4"!=e&&(n("input button select textarea","autofocus"),n("input textarea","placeholder"),n("a","download"),n("link script img","crossorigin"),n("iframe","sandbox seamless allowfullscreen")),B(k("a form meter progress dfn"),function(e){u[e]&&delete u[e].children[e]}),delete u.caption.children.table,delete u.script,T[e]=u)}((o=o||{}).schema),!1===o.verify_html&&(o.valid_elements="*[*]"),s=N(o.valid_styles),l=N(o.invalid_styles,"map"),p=N(o.valid_classes,"map"),c=e("whitespace_elements","pre script noscript style textarea video audio iframe object code"),d=e("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),f=e("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),h=e("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),g=e("non_empty_elements","td th iframe video audio object script pre code",f),v=e("move_caret_before_on_enter_elements","table",g),y=e("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),m=e("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",y),b=e("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),B((o.special||"script noscript style textarea").split(" "),function(e){_[e]=new RegExp("</"+e+"[^>]*>","gi")}),o.valid_elements?n(o.valid_elements):(B(u,function(e,t){E[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},$[t]=e.children}),"html5"!=o.schema&&B(k("strong/b em/i"),function(e){e=k(e,"/"),E[e[1]].outputName=e[0]}),B(k("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){E[e]&&(E[e].removeEmpty=!0)}),B(k("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){E[e].paddEmpty=!0}),B(k("span"),function(e){E[e].removeEmptyAttrs=!0})),r(o.custom_elements),i(o.valid_children),t(o.extended_valid_elements),i("+ol[ul|ol],+ul[ul|ol]"),B({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},function(e,t){E[t]&&(E[t].parentsRequired=k(e))}),o.invalid_elements&&B(M(o.invalid_elements),function(e){E[e]&&delete E[e]}),a("span")||t("span[!data-mce-type|*]"),x.children=$,x.getValidStyles=function(){return s},x.getInvalidStyles=function(){return l},x.getValidClasses=function(){return p},x.getBoolAttrs=function(){return h},x.getBlockElements=function(){return m},x.getTextBlockElements=function(){return y},x.getTextInlineElements=function(){return b},x.getShortEndedElements=function(){return f},x.getSelfClosingElements=function(){return d},x.getNonEmptyElements=function(){return g},x.getMoveCaretBeforeOnEnterElements=function(){return v},x.getWhiteSpaceElements=function(){return c},x.getSpecialElements=function(){return _},x.isValidChild=function(e,t){var n=$[e];return!(!n||!n[t])},x.isValid=function(e,t){var n,r,i=a(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},x.getElementRule=a,x.getCustomElements=function(){return w},x.addValidElements=t,x.setValidElements=n,x.addCustomElements=r,x.addValidChildren=i,x.elements=E}}),e(N,[k,g,d],function(e,U,z){function V(e,t,n){var r,i,o,a,s=1;for(a=e.getShortEndedElements(),(o=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex=r=n;i=o.exec(t);){if(r=o.lastIndex,"/"===i[1])s--;else if(!i[1]){if(i[2]in a)continue;s++}if(0===s)break}return r}function t(F,H){function t(){}var n=this;F=F||{},n.schema=H=H||new e,!1!==F.fix_self_closing&&(F.fix_self_closing=!0),r("comment cdata text start end pi doctype".split(" "),function(e){e&&(n[e]=F[e]||t)}),n.parse=function(e){function t(e){var t,n;for(t=D.length;t--&&D[t].name!==e;);if(0<=t){for(n=D.length-1;t<=n;n--)(e=D[n]).valid&&R.end(e.name);D.length=t}}function n(e,t,n,r,i){var o,a;if(n=(t=t.toLowerCase())in h?t:O(n||r||i||""),m&&!c&&0!==t.indexOf("data-")){if(!(o=x[t])&&$){for(a=$.length;a--&&!(o=$[a]).pattern.test(t););-1===a&&(o=null)}if(!o)return;if(o.validValues&&!(n in o.validValues))return}if(P[t]&&!F.allow_script_urls){var s=n.replace(/[\s\u0000-\u001F]+/g,"");try{s=decodeURIComponent(s)}catch(e){s=unescape(s)}if(L.test(s))return;if(!F.allow_html_data_urls&&I.test(s)&&!/^data:image\//i.test(s))return}l.map[t]=n,l.push({name:t,value:n})}var r,i,o,l,a,s,u,c,d,f,h,p,m,g,v,y,b,x,$,w,C,E,S,_,k,N,T,A,R=this,B=0,D=[],M=0,O=U.decode,P=z.makeMap("src,href,data,background,formaction,poster"),L=/((java|vb)script|mhtml):/i,I=/^data:/i;for(_=new RegExp("<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),k=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,f=H.getShortEndedElements(),S=F.self_closing_elements||H.getSelfClosingElements(),h=H.getBoolAttrs(),m=F.validate,d=F.remove_internals,A=F.fix_self_closing,N=H.getSpecialElements();r=_.exec(e);){if(B<r.index&&R.text(O(e.substr(B,r.index-B))),i=r[6])":"===(i=i.toLowerCase()).charAt(0)&&(i=i.substr(1)),t(i);else if(i=r[7]){if(":"===(i=i.toLowerCase()).charAt(0)&&(i=i.substr(1)),p=i in f,A&&S[i]&&0<D.length&&D[D.length-1].name===i&&t(i),!m||(g=H.getElementRule(i))){if(v=!0,m&&(x=g.attributes,$=g.attributePatterns),(b=r[8])?((c=-1!==b.indexOf("data-mce-type"))&&d&&(v=!1),(l=[]).map={},b.replace(k,n)):(l=[]).map={},m&&!c){if(w=g.attributesRequired,C=g.attributesDefault,E=g.attributesForced,g.removeEmptyAttrs&&!l.length&&(v=!1),E)for(a=E.length;a--;)u=(y=E[a]).name,"{$uid}"===(T=y.value)&&(T="mce_"+M++),l.map[u]=T,l.push({name:u,value:T});if(C)for(a=C.length;a--;)(u=(y=C[a]).name)in l.map||("{$uid}"===(T=y.value)&&(T="mce_"+M++),l.map[u]=T,l.push({name:u,value:T}));if(w){for(a=w.length;a--&&!(w[a]in l.map););-1===a&&(v=!1)}if(y=l.map["data-mce-bogus"]){if("all"===y){B=V(H,e,_.lastIndex),_.lastIndex=B;continue}v=!1}}v&&R.start(i,l,p)}else v=!1;if(o=N[i]){o.lastIndex=B=r.index+r[0].length,B=(r=o.exec(e))?(v&&(s=e.substr(B,r.index-B)),r.index+r[0].length):(s=e.substr(B),e.length),v&&(0<s.length&&R.text(s,!0),R.end(i)),_.lastIndex=B;continue}p||(b&&b.indexOf("/")==b.length-1?v&&R.end(i):D.push({name:i,valid:v}))}else(i=r[1])?(">"===i.charAt(0)&&(i=" "+i),F.allow_conditional_comments||"[if"!==i.substr(0,3).toLowerCase()||(i=" "+i),R.comment(i)):(i=r[2])?R.cdata(i):(i=r[3])?R.doctype(i):(i=r[4])&&R.pi(i,r[5]);B=r.index+r[0].length}for(B<e.length&&R.text(O(e.substr(B))),a=D.length-1;0<=a;a--)(i=D[a]).valid&&R.end(i.name)}}var r=z.each;return t.findEndTag=V,t}),e(T,[_,k,N,d],function(D,e,M,s){function O(e,t){e.padd_empty_with_br?t.empty().append(new D("br","1")).shortEnded=!0:t.empty().append(new D("#text","3")).value=" "}var P=s.makeMap,t=s.each,r=s.explode,L=s.extend;return function(_,k){var N=this,T={},A=[],R={},B={};(_=_||{}).validate=!("validate"in _)||_.validate,_.root_name=_.root_name||"body",N.schema=k=k||new e,N.filterNode=function(e){var t,n,r;n in T&&((r=R[n])?r.push(e):R[n]=[e]),t=A.length;for(;t--;)(n=A[t].name)in e.attributes.map&&((r=B[n])?r.push(e):B[n]=[e]);return e},N.addNodeFilter=function(e,n){t(r(e),function(e){var t=T[e];t||(T[e]=t=[]),t.push(n)})},N.addAttributeFilter=function(e,n){t(r(e),function(e){var t;for(t=0;t<A.length;t++)if(A[t].name===e)return void A[t].callbacks.push(n);A.push({name:e,callbacks:[n]})})},N.parse=function(e,t){function l(e,t){var n,r=new D(e,t);return e in T&&((n=R[e])?n.push(r):R[e]=[r]),r}function u(e){var t,n,r,i,o=k.getBlockElements();for(t=e.prev;t&&3===t.type;){if(0<(r=t.value.replace(y,"")).length)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}var n,i,c,r,o,a,s,d,f,h,p,m,g,v,y,b,x,$,w,C,E,S=[];if(t=t||{},R={},B={},m=L(P("script,style,head,html,body,title,meta,param"),k.getBlockElements()),C=k.getNonEmptyElements(),w=k.children,p=_.validate,E="forced_root_block"in t?t.forced_root_block:_.forced_root_block,$=k.getWhiteSpaceElements(),g=/^[ \t\r\n]+/,y=/[ \t\r\n]+$/,b=/[ \t\r\n]+/g,x=/^[ \t\r\n]+$/,n=new M({validate:p,allow_script_urls:_.allow_script_urls,allow_conditional_comments:_.allow_conditional_comments,self_closing_elements:function(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}(k.getSelfClosingElements()),cdata:function(e){c.append(l("#cdata",4)).value=e},text:function(e,t){var n;v||(e=e.replace(b," "),c.lastChild&&m[c.lastChild.name]&&(e=e.replace(g,""))),0!==e.length&&((n=l("#text",3)).raw=!!t,c.append(n).value=e)},comment:function(e){c.append(l("#comment",8)).value=e},pi:function(e,t){c.append(l(e,7)).value=t,u(c)},doctype:function(e){c.append(l("#doctype",10)).value=e,u(c)},start:function(e,t,n){var r,i,o,a,s;if(o=p?k.getElementRule(e):{}){for((r=l(o.outputName||e,1)).attributes=t,r.shortEnded=n,c.append(r),(s=w[c.name])&&w[r.name]&&!s[r.name]&&S.push(r),i=A.length;i--;)(a=A[i].name)in t.map&&((f=B[a])?f.push(r):B[a]=[r]);m[e]&&u(r),n||(c=r),!v&&$[e]&&(v=!0)}},end:function(e){var t,n,r,i,o;if(n=p?k.getElementRule(e):{}){if(m[e]&&!v){if((t=c.firstChild)&&3===t.type)if(0<(r=t.value.replace(g,"")).length)t.value=r,t=t.next;else for(i=t.next,t.remove(),t=i;t&&3===t.type;)r=t.value,i=t.next,0!==r.length&&!x.test(r)||(t.remove(),t=i),t=i;if((t=c.lastChild)&&3===t.type)if(0<(r=t.value.replace(y,"")).length)t.value=r,t=t.prev;else for(i=t.prev,t.remove(),t=i;t&&3===t.type;)r=t.value,i=t.prev,0!==r.length&&!x.test(r)||(t.remove(),t=i),t=i}if(v&&$[e]&&(v=!1),(n.removeEmpty||n.paddEmpty)&&c.isEmpty(C,$))if(n.paddEmpty)O(_,c);else if(!c.attributes.map.name&&!c.attributes.map.id)return o=c.parent,m[c.name]?c.empty().remove():c.unwrap(),void(c=o);c=c.parent}}},k),i=c=new D(t.context||_.root_name,11),n.parse(e),p&&S.length&&(t.context?t.invalid=!0:function(e){var t,n,r,i,o,a,s,l,u,c,d,f,h,p,m,g,v,y;for(f=P("tr,td,th,tbody,thead,tfoot,table"),c=k.getNonEmptyElements(),d=k.getWhiteSpaceElements(),h=k.getTextBlockElements(),p=k.getSpecialElements(),t=0;t<e.length;t++)if((n=e[t]).parent&&!n.fixed)if(h[n.name]&&"li"==n.parent.name){for(m=n.next;m&&h[m.name];)m.name="li",m.fixed=!0,n.parent.insert(m,n.parent),m=m.next;n.unwrap(n)}else{for(i=[n],r=n.parent;r&&!k.isValidChild(r.name,n.name)&&!f[r.name];r=r.parent)i.push(r);if(r&&1<i.length){for(i.reverse(),o=a=N.filterNode(i[0].clone()),u=0;u<i.length-1;u++){for(k.isValidChild(a.name,i[u].name)?(s=N.filterNode(i[u].clone()),a.append(s)):s=a,l=i[u].firstChild;l&&l!=i[u+1];)g=l.next,s.append(l),l=g;a=s}o.isEmpty(c,d)?r.insert(n,i[0],!0):(r.insert(o,i[0],!0),r.insert(n,o)),((r=i[0]).isEmpty(c,d)||(y="br",(v=r)&&v.firstChild===v.lastChild&&v.firstChild.name===y))&&r.empty().remove()}else if(n.parent){if("li"===n.name){if((m=n.prev)&&("ul"===m.name||"ul"===m.name)){m.append(n);continue}if((m=n.next)&&("ul"===m.name||"ul"===m.name)){m.insert(n,m.firstChild,!0);continue}n.wrap(N.filterNode(new D("ul",1)));continue}k.isValidChild(n.parent.name,"div")&&k.isValidChild("div",n.name)?n.wrap(N.filterNode(new D("div",1))):p[n.name]?n.empty().remove():n.unwrap()}}}(S)),E&&("body"==i.name||t.isRootContent)&&function(){function e(e){e&&((r=e.firstChild)&&3==r.type&&(r.value=r.value.replace(g,"")),(r=e.lastChild)&&3==r.type&&(r.value=r.value.replace(y,"")))}var t,n,r=i.firstChild;if(k.isValidChild(i.name,E.toLowerCase())){for(;r;)t=r.next,3==r.type||1==r.type&&"p"!==r.name&&!m[r.name]&&!r.attr("data-mce-type")?(n||((n=l(E,1)).attr(_.forced_root_block_attrs),i.insert(n,r)),n.append(r)):(e(n),n=null),r=t;e(n)}}(),!t.invalid){for(h in R){for(f=T[h],s=(r=R[h]).length;s--;)r[s].parent||r.splice(s,1);for(o=0,a=f.length;o<a;o++)f[o](r,h,t)}for(o=0,a=A.length;o<a;o++)if((f=A[o]).name in B){for(s=(r=B[f.name]).length;s--;)r[s].parent||r.splice(s,1);for(s=0,d=f.callbacks.length;s<d;s++)f.callbacks[s](r,f.name,t)}}return i},_.remove_trailing_brs&&N.addNodeFilter("br",function(e){var t,n,r,i,o,a,s,l,u=e.length,c=L({},k.getBlockElements()),d=k.getNonEmptyElements(),f=k.getNonEmptyElements();for(c.body=1,t=0;t<u;t++)if(r=(n=e[t]).parent,c[n.parent.name]&&n===r.lastChild){for(o=n.prev;o;){if("span"!==(a=o.name)||"bookmark"!==o.attr("data-mce-type")){if("br"!==a)break;if("br"===a){n=null;break}}o=o.prev}n&&(n.remove(),r.isEmpty(d,f)&&((s=k.getElementRule(r.name))&&(s.removeEmpty?r.remove():s.paddEmpty&&O(_,r))))}else{for(i=n;r&&r.firstChild===i&&r.lastChild===i&&!c[(i=r).name];)r=r.parent;i===r&&!0!==_.padd_empty_with_br&&((l=new D("#text",3)).value=" ",n.replace(l))}}),_.allow_unsafe_link_target||N.addAttributeFilter("href",function(e){function n(e){var t=new RegExp("("+a.replace(" ","|")+")","g");return(e=e&&s.trim(e.replace(t,"")))||null}function t(e,t){return t?function(e){return(e=n(e))?[e,a].join(" "):a}(e):n(e)}for(var r,i,o=e.length,a="noopener noreferrer";o--;)i=(r=e[o]).attr("rel"),"a"===r.name&&r.attr("rel",t(i,"_blank"==r.attr("target")))}),_.allow_html_in_named_anchor||N.addAttributeFilter("id,name",function(e){for(var t,n,r,i,o=e.length;o--;)if("a"===(i=e[o]).name&&i.firstChild&&!i.attr("href"))for(r=i.parent,t=i.lastChild;n=t.prev,r.insert(t,i),t=n;);}),_.fix_list_elements&&N.addNodeFilter("ul,ol",function(e){for(var t,n,r=e.length;r--;)if("ul"===(n=(t=e[r]).parent).name||"ol"===n.name)if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{var i=new D("li",1);i.attr("style","list-style-type: none"),t.wrap(i)}}),_.validate&&k.getValidClasses()&&N.addAttributeFilter("class",function(e){for(var t,n,r,i,o,a,s,l=e.length,u=k.getValidClasses();l--;){for(n=(t=e[l]).attr("class").split(" "),o="",r=0;r<n.length;r++)i=n[r],s=!1,(a=u["*"])&&a[i]&&(s=!0),a=u[t.name],!s&&a&&a[i]&&(s=!0),s&&(o&&(o+=" "),o+=i);o.length||(o=null),t.attr("class",o)}})}}),e(A,[g,d],function(t,e){var n=e.makeMap;return function(e){var s,l,u,c,d,f=[];return s=(e=e||{}).indent,l=n(e.indent_before||""),u=n(e.indent_after||""),c=t.getEncodeFunc(e.entity_encoding||"raw",e.entities),d="html"==e.element_format,{start:function(e,t,n){var r,i,o,a;if(s&&l[e]&&0<f.length&&(0<(a=f[f.length-1]).length&&"\n"!==a&&f.push("\n")),f.push("<",e),t)for(r=0,i=t.length;r<i;r++)o=t[r],f.push(" ",o.name,'="',c(o.value,!0),'"');f[f.length]=!n||d?">":" />",n&&s&&u[e]&&0<f.length&&(0<(a=f[f.length-1]).length&&"\n"!==a&&f.push("\n"))},end:function(e){var t;f.push("</",e,">"),s&&u[e]&&0<f.length&&(0<(t=f[f.length-1]).length&&"\n"!==t&&f.push("\n"))},text:function(e,t){0<e.length&&(f[f.length]=t?e:c(e))},cdata:function(e){f.push("<![CDATA[",e,"]]>")},comment:function(e){f.push("\x3c!--",e,"--\x3e")},pi:function(e,t){t?f.push("<?",e," ",c(t),"?>"):f.push("<?",e,"?>"),s&&f.push("\n")},doctype:function(e){f.push("<!DOCTYPE",e,">",s?"\n":"")},reset:function(){f.length=0},getContent:function(){return f.join("").replace(/\n$/,"")}}}}),e(R,[A,k],function(e,n){return function(t,p){var m=new e(t);(t=t||{}).validate=!("validate"in t)||t.validate,this.schema=p=p||new n,this.writer=m,this.serialize=function(e){function d(e){var t,n,r,i,o,a,s,l,u,c=f[e.type];if(c)c(e);else{if(t=e.name,n=e.shortEnded,r=e.attributes,h&&r&&1<r.length&&((a=[]).map={},u=p.getElementRule(e.name))){for(s=0,l=u.attributesOrder.length;s<l;s++)(i=u.attributesOrder[s])in r.map&&(o=r.map[i],a.map[i]=o,a.push({name:i,value:o}));for(s=0,l=r.length;s<l;s++)(i=r[s].name)in a.map||(o=r.map[i],a.map[i]=o,a.push({name:i,value:o}));r=a}if(m.start(e.name,r,n),!n){if(e=e.firstChild)for(;d(e),e=e.next;);m.end(t)}}}var f,h;return h=t.validate,f={3:function(e){m.text(e.value,e.raw)},8:function(e){m.comment(e.value)},7:function(e){m.pi(e.name,e.value)},10:function(e){m.doctype(e.value)},4:function(e){m.cdata(e.value)},11:function(e){if(e=e.firstChild)for(;d(e),e=e.next;);}},m.reset(),1!=e.type||t.inner?f[11](e):d(e),m.getContent()}}}),e(B,[y,T,N,g,R,_,k,i,d,w],function(e,t,p,r,m,n,i,g,o,v){var y=o.each,b=o.trim,a=e.DOM;return function(l,u){function c(e){var t=new RegExp(["<span[^>]+data-mce-bogus[^>]+>[​\ufeff]+<\\/span>","\\s?("+n.join("|")+')="[^"]+"'].join("|"),"gi");return v.trim(e.replace(t,""))}function e(e){var t,n,r,i,o,a=e,s=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,l=u.schema;for(a=c(a),o=l.getShortEndedElements();i=s.exec(a);)n=s.lastIndex,r=i[0].length,t=o[i[1]]?n:p.findEndTag(l,a,n),a=a.substring(0,n-r)+a.substring(t),s.lastIndex=n-r;return a}var d,f,h,n=["data-mce-selected"];return u&&(d=u.dom,f=u.schema),d=d||a,f=f||new i(l),l.entity_encoding=l.entity_encoding||"named",l.remove_trailing_brs=!("remove_trailing_brs"in l)||l.remove_trailing_brs,(h=new t(l,f)).addAttributeFilter("data-mce-tabindex",function(e,t){for(var n,r=e.length;r--;)(n=e[r]).attr("tabindex",n.attributes.map["data-mce-tabindex"]),n.attr(t,null)}),h.addAttributeFilter("src,href,style",function(e,t){for(var n,r,i=e.length,o="data-mce-"+t,a=l.url_converter,s=l.url_converter_scope;i--;)void 0!==(r=(n=e[i]).attributes.map[o])?(n.attr(t,0<r.length?r:null),n.attr(o,null)):(r=n.attributes.map[t],"style"===t?r=d.serializeStyle(d.parseStyle(r),n.name):a&&(r=a.call(s,r,t,n.name)),n.attr(t,0<r.length?r:null))}),h.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).attr("class"))&&(n=t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),t.attr("class",0<n.length?n:null))}),h.addAttributeFilter("data-mce-type",function(e,t,n){for(var r,i=e.length;i--;)"bookmark"!==(r=e[i]).attributes.map["data-mce-type"]||n.cleanup||r.remove()}),h.addNodeFilter("noscript",function(e){for(var t,n=e.length;n--;)(t=e[n].firstChild)&&(t.value=r.decode(t.value))}),h.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r,i,o,a=e.length;a--;)i=(r=e[a]).firstChild?r.firstChild.value:"","script"===t?((o=r.attr("type"))&&r.attr("type","mce-no/type"==o?null:o.replace(/^mce\-/,"")),0<i.length&&(r.firstChild.value="// <![CDATA[\n"+n(i)+"\n// ]]>")):0<i.length&&(r.firstChild.value="\x3c!--\n"+n(i)+"\n--\x3e")}),h.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)0===(t=e[n]).value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),h.addNodeFilter("xml:namespace,input",function(e,t){for(var n,r=e.length;r--;)7===(n=e[r]).type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),h.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:f,addNodeFilter:h.addNodeFilter,addAttributeFilter:h.addAttributeFilter,serialize:function(e,t){var n,r,i,o,a,s;return g.ie&&0<d.select("script,style,select,map").length?(a=e.innerHTML,e=e.cloneNode(!1),d.setHTML(e,a)):e=e.cloneNode(!0),(n=document.implementation).createHTMLDocument&&(r=n.createHTMLDocument(""),y("BODY"==e.nodeName?e.childNodes:[e],function(e){r.body.appendChild(r.importNode(e,!0))}),e="BODY"!=e.nodeName?r.body.firstChild:r.body,i=d.doc,d.doc=r),(t=t||{}).format=t.format||"html",t.selection&&(t.forced_root_block=""),t.no_events||(t.node=e,this.onPreProcess(t)),function(e){function t(e){return e&&"br"===e.name}var n,r;!t(n=e.lastChild)||t(r=n.prev)&&(n.remove(),r.remove())}(s=h.parse(b(t.getInner?e.innerHTML:d.getOuterHTML(e)),t)),o=new m(l,f),t.content=o.serialize(s),t.cleanup||(t.content=v.trim(t.content),t.content=t.content.replace(/\uFEFF/g,"")),t.no_events||this.onPostProcess(t),i&&(d.doc=i),t.node=null,t.content},addRules:function(e){f.addValidElements(e)},setRules:function(e){f.setValidElements(e)},onPreProcess:function(e){u&&u.fire("PreProcess",e)},onPostProcess:function(e){u&&u.fire("PostProcess",e)},addTempAttr:function(e){-1===o.inArray(n,e)&&(h.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),n.push(e))},trimHtml:c,getTrimmedContent:function(){return e(u.getBody().innerHTML)},trimContent:e}}}),e(D,[],function(){return function(h){function u(e,t){var n,r,i,o,a,s,l,u,c=0,d=-1;if((n=e.duplicate()).collapse(t),(u=n.parentElement()).ownerDocument===h.dom.doc){for(;"false"===u.contentEditable;)u=u.parentNode;if(!u.hasChildNodes())return{node:u,inside:1};for(r=(o=u.children).length-1;c<=r;)if(a=o[l=Math.floor((c+r)/2)],n.moveToElementText(a),0<(d=n.compareEndPoints(t?"StartToStart":"EndToEnd",e)))r=l-1;else{if(!(d<0))return{node:a};c=l+1}if(d<0)for(a?n.collapse(!1):(n.moveToElementText(u),n.collapse(!0),a=u,i=!0),s=0;0!==n.compareEndPoints(t?"StartToStart":"StartToEnd",e)&&0!==n.move("character",1)&&u==n.parentElement();)s++;else for(n.collapse(!0),s=0;0!==n.compareEndPoints(t?"StartToStart":"StartToEnd",e)&&0!==n.move("character",-1)&&u==n.parentElement();)s++;return{node:a,position:d,offset:s,inside:i}}}var c=this,p=h.dom;this.getBookmark=function(e){function n(e){var t,n,r,i,o=[];for(t=e.parentNode,n=p.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(i=(r=t.children).length;i--;)if(e===r[i]){o.push(i);break}t=(e=t).parentNode}return o}function t(e){var t;if(t=u(r,e))return{position:t.position,offset:t.offset,indexes:n(t.node),inside:t.inside}}var r=h.getRng(),i={};return 2===e&&(r.item?i.start={ctrl:!0,indexes:n(r.item(0))}:(i.start=t(!0),h.isCollapsed()||(i.end=t()))),i},this.moveToBookmark=function(o){function a(e){var t,n,r,i;for(t=p.getRoot(),n=e.length-1;0<=n;n--)i=t.children,(r=e[n])<=i.length-1&&(t=i[r]);return t}function e(e){var t,n,r,i=o[e?"start":"end"];i&&(t=0<i.position,(n=l.createTextRange()).moveToElementText(a(i.indexes)),void 0!==(r=i.offset)?(n.collapse(i.inside||t),n.moveStart("character",t?-r:r)):n.collapse(e),s.setEndPoint(e?"StartToStart":"EndToStart",n),e&&s.collapse(!0))}var s,l=p.doc.body;o.start&&(o.start.ctrl?(s=l.createControlRange()).addElement(a(o.start.indexes)):(s=l.createTextRange(),e(!0),e()),s.select())},this.addRange=function(e){function t(e){var t,n,r,i,o;r=p.create("a"),t=e?s:u,n=e?l:c,i=a.duplicate(),t!=d&&t!=d.documentElement||(t=f,n=0),3==t.nodeType?(t.parentNode.insertBefore(r,t),i.moveToElementText(r),i.moveStart("character",n),p.remove(r),a.setEndPoint(e?"StartToStart":"EndToEnd",i)):((o=t.childNodes).length?(n>=o.length?p.insertAfter(r,o[o.length-1]):t.insertBefore(r,o[n]),i.moveToElementText(r)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",r=t.firstChild,i.moveToElementText(r),i.collapse(!1)),a.setEndPoint(e?"StartToStart":"EndToEnd",i),p.remove(r))}var a,n,s,l,u,c,r,i,o,d=h.dom.doc,f=d.body;if(s=e.startContainer,l=e.startOffset,u=e.endContainer,c=e.endOffset,a=f.createTextRange(),s==u&&1==s.nodeType){if(l==c&&!s.hasChildNodes()){if(s.canHaveHTML)return(r=s.previousSibling)&&!r.hasChildNodes()&&p.isBlock(r)?r.innerHTML="&#xFEFF;":r=null,s.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",a.moveToElementText(s.lastChild),a.select(),p.doc.selection.clear(),s.innerHTML="",void(r&&(r.innerHTML=""));l=p.nodeIndex(s),s=s.parentNode}if(l==c-1)try{if(o=s.childNodes[l],(n=f.createControlRange()).addElement(o),n.select(),(i=h.getRng()).item&&o===i.item(0))return}catch(e){}}t(!0),t(),a.select()},this.getRangeAt=function(){function t(e){var t,n,r,i,o=u(s,e),a=0;if(t=o.node,n=o.offset,!o.inside||t.hasChildNodes())if(void 0!==n){if(o.position<0){if(!(r=o.inside?t.firstChild:t.nextSibling))return void l[e?"setStartAfter":"setEndAfter"](t);if(!n)return void(3==r.nodeType?l[e?"setStart":"setEnd"](r,0):l[e?"setStartBefore":"setEndBefore"](r));for(;r;){if(3==r.nodeType&&n<=(a+=(i=r.nodeValue).length)){t=r,a-=n,a=i.length-a;break}r=r.nextSibling}}else{if(!(r=t.previousSibling))return l[e?"setStartBefore":"setEndBefore"](t);if(!n)return void(3==t.nodeType?l[e?"setStart":"setEnd"](r,t.nodeValue.length):l[e?"setStartAfter":"setEndAfter"](r));for(;r;){if(3==r.nodeType&&n<=(a+=r.nodeValue.length)){t=r,a-=n;break}r=r.previousSibling}}l[e?"setStart":"setEnd"](t,a)}else l[e?"setStartBefore":"setEndAfter"](t);else l[e?"setStart":"setEnd"](t,0)}var n,r,i,o,a,s=h.getRng(),l=p.createRng();if((n=s.item?s.item(0):s.parentElement()).ownerDocument!=p.doc)return l;if(r=h.isCollapsed(),s.item)return l.setStart(n.parentNode,p.nodeIndex(n)),l.setEnd(l.startContainer,l.startOffset+1),l;try{t(!0),r||t()}catch(e){if(-2147024809!=e.number)throw e;a=c.getBookmark(2),(i=s.duplicate()).collapse(!0),n=i.parentElement(),r||((i=s.duplicate()).collapse(!1),(o=i.parentElement()).innerHTML=o.innerHTML),n.innerHTML=n.innerHTML,c.moveToBookmark(a),s=h.getRng(),t(!0),r||t()}return l}}}),e(M,[i],function(t){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(e){return t.mac?e.metaKey:e.ctrlKey&&!e.altKey}}}),e(O,[M,d,r,i,$],function(j,W,q,G,e){var X=e.isContentEditableFalse,Y=e.isContentEditableTrue;return function(i,u){function l(e){var t=u.settings.object_resizing;return!1!==t&&!G.iOS&&("string"!=typeof t&&(t="table,img,div"),"false"!==e.getAttribute("data-mce-resize")&&e!=u.getBody()&&u.dom.is(e,t))}function c(e){var t,n,r,i;t=e.screenX-E,n=e.screenY-S,B=t*w[2]+N,D=n*w[3]+T,B=B<5?5:B,D=D<5?5:D,("IMG"==y.nodeName&&!1!==u.settings.resize_img_proportional?!j.modifierPressed(e):j.modifierPressed(e)||"IMG"==y.nodeName&&w[2]*w[3]!=0)&&(U(t)>U(n)?(D=z(B*A),B=z(D/A)):(B=z(D/A),D=z(B*A))),P.setStyles(b,{width:B,height:D}),r=0<(r=w.startPos.x+t)?r:0,i=0<(i=w.startPos.y+n)?i:0,P.setStyles(x,{left:r,top:i,display:"block"}),x.innerHTML=B+" &times; "+D,w[2]<0&&b.clientWidth<=B&&P.setStyle(b,"left",_+(N-B)),w[3]<0&&b.clientHeight<=D&&P.setStyle(b,"top",k+(T-D)),(t=V.scrollWidth-M)+(n=V.scrollHeight-O)!==0&&P.setStyles(x,{left:r-t,top:i-n}),R||(u.fire("ObjectResizeStart",{target:y,width:N,height:T}),R=!0)}function d(){function e(e,t){t&&(y.style[e]||!u.schema.isValid(y.nodeName.toLowerCase(),e)?P.setStyle(y,e,t):P.setAttrib(y,e,t))}R=!1,e("width",B),e("height",D),P.unbind(I,"mousemove",c),P.unbind(I,"mouseup",d),F!=I&&(P.unbind(F,"mousemove",c),P.unbind(F,"mouseup",d)),P.remove(b),P.remove(x),H&&"TABLE"!=y.nodeName||f(y),u.fire("ObjectResized",{target:y,width:B,height:D}),P.setAttrib(y,"style",P.getAttrib(y,"style")),u.nodeChanged()}function f(e,i,o){var t,a,s,n,r;h(),m(),t=P.getPos(e,V),_=t.x,k=t.y,r=e.getBoundingClientRect(),a=r.width||r.right-r.left,s=r.height||r.bottom-r.top,y!=e&&(p(),y=e,B=D=0),n=u.fire("ObjectSelected",{target:e}),l(e)&&!n.isDefaultPrevented()?L($,function(t,e){function n(e){E=e.screenX,S=e.screenY,N=y.clientWidth,T=y.clientHeight,A=T/N,(w=t).startPos={x:a*t[0]+_,y:s*t[1]+k},M=V.scrollWidth,O=V.scrollHeight,b=y.cloneNode(!0),P.addClass(b,"mce-clonedresizable"),P.setAttrib(b,"data-mce-bogus","all"),b.contentEditable=!1,b.unSelectabe=!0,P.setStyles(b,{left:_,top:k,margin:0}),b.removeAttribute("data-mce-selected"),V.appendChild(b),P.bind(I,"mousemove",c),P.bind(I,"mouseup",d),F!=I&&(P.bind(F,"mousemove",c),P.bind(F,"mouseup",d)),x=P.add(V,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},N+" &times; "+T)}var r;return i?void(e==i&&n(o)):((r=P.get("mceResizeHandle"+e))&&P.remove(r),r=P.add(V,"div",{id:"mceResizeHandle"+e,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+e+"-resize; margin:0; padding:0"}),G.ie&&(r.contentEditable=!1),P.bind(r,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),n(e)}),t.elm=r,void P.setStyles(r,{left:a*t[0]+_-r.offsetWidth/2,top:s*t[1]+k-r.offsetHeight/2}))}):h(),y.setAttribute("data-mce-selected","1")}function h(){var e,t;for(e in m(),y&&y.removeAttribute("data-mce-selected"),$)(t=P.get("mceResizeHandle"+e))&&(P.unbind(t),P.remove(t))}function n(e){function t(e,t){if(e)do{if(e===t)return!0}while(e=e.parentNode)}var n,r;if(!R&&!u.removed)return L(P.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),t(r=P.$(r).closest(H?"table":"table,img,hr")[0],V)&&(g(),t(n=i.getStart(!0),r)&&t(i.getEnd(!0),r)&&(!H||r!=n&&"IMG"!==n.nodeName))?void f(r):void h()}function r(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function e(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function o(e){var t,n,r,i,o,a,s,l=e.srcElement;for(n in t=l.getBoundingClientRect(),a=C.clientX-t.left,s=C.clientY-t.top,$)if(r=$[n],i=l.offsetWidth*r[0],o=l.offsetHeight*r[1],U(i-a)<8&&U(o-s)<8){w=r;break}R=!0,u.fire("ObjectResizeStart",{target:y,width:y.clientWidth,height:y.clientHeight}),u.getDoc().selection.empty(),f(l,n,C)}function a(e){return X(function(e,t){for(;t&&t!=e;){if(Y(t)||X(t))return t;t=t.parentNode}return null}(u.getBody(),e))}function s(e){var t=e.srcElement;if(a(t))!function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}(e);else if(t!=y){if(u.fire("ObjectSelected",{target:t}),p(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(h(),r(y=t,"resizestart",o))}}function p(){e(y,"resizestart",o)}function m(){for(var e in $){var t=$[e];t.elm&&(P.unbind(t.elm),delete t.elm)}}function g(){try{u.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function v(e){var t;if(H){t=I.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(e){}}}var y,b,x,$,w,C,E,S,_,k,N,T,A,R,B,D,M,O,P=u.dom,L=W.each,I=u.getDoc(),F=document,H=G.ie&&G.ie<11,U=Math.abs,z=Math.round,V=u.getBody();$={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var t=".mce-content-body";return u.contentStyles.push(t+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+t+" .mce-resizehandle:hover {background: #000}"+t+" img[data-mce-selected],"+t+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+t+" .mce-clonedresizable {position: absolute;"+(G.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+t+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),u.on("init",function(){H?(u.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(h(),v(e.target))}),r(V,"controlselect",s),u.on("mousedown",function(e){C=e})):(g(),11<=G.ie&&(u.on("mousedown click",function(e){var t=e.target,n=t.nodeName;R||!/^(TABLE|IMG|HR)$/.test(n)||a(t)||(u.selection.select(t,"TABLE"==n),"mousedown"==e.type&&u.nodeChanged())}),u.dom.bind(V,"mscontrolselect",function(e){function t(e){q.setEditorTimeout(u,function(){u.selection.select(e)})}return a(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var t=q.throttle(function(e){u.composing||n(e)});u.on("nodechange ResizeEditor ResizeWindow drop",t),u.on("keyup compositionend",function(e){y&&"TABLE"==y.nodeName&&t(e)}),u.on("hide blur",h)}),u.on("remove",m),{isResizable:l,showResizeRect:f,hideResizeRect:h,updateResizeRect:n,controlSelect:v,destroy:function(){y=b=null,H&&(p(),e(V,"controlselect",s))}}}}),e(P,[],function(){var r=[].slice;return{constant:function(e){return function(){return e}},negate:function(t){return function(e){return!t(e)}},and:function(){var n=r.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0}},or:function(){var n=r.call(arguments);return function(e){for(var t=0;t<n.length;t++)if(n[t](e))return!0;return!1}},curry:function t(e){var n=r.call(arguments);return n.length-1>=e.length?e.apply(this,n.slice(1)):function(){var e=n.concat([].slice.call(arguments));return t.apply(this,e)}},compose:function(t,n){return function(e){return t(n(e))}},noop:function(){}}}),e(L,[$,c,C],function(e,t,n){function r(e){return!f(e)&&(l(e)?!u(e.parentNode):c(e)||s(e)||d(e)||a(e))}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(a(e))return!1;if(o(e))return!0}return!0}var o=e.isContentEditableTrue,a=e.isContentEditableFalse,s=e.isBr,l=e.isText,u=e.matchNodeNames("script style textarea"),c=e.matchNodeNames("img input textarea hr iframe video audio object"),d=e.matchNodeNames("table"),f=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:function(e){return c(e)||function(e){return!!a(e)&&!0!==t.reduce(e.getElementsByTagName("*"),function(e,t){return e||o(t)},!1)}(e)},isEditableCaretCandidate:function(e,t){return r(e)&&i(e,t)}}}),e(I,[],function(){function n(e){return e?{left:t(e.left),top:t(e.top),bottom:t(e.bottom),right:t(e.right),width:t(e.width),height:t(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function r(e,t,n){return 0<=e&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottom<t.top||!(e.top>t.bottom)&&r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom||!(e.bottom<t.top)&&r(t.bottom-e.top,e,t)}function a(e,t){return e.left<t.left}function s(e,t){return e.right>t.right}var t=Math.round;return{clone:n,collapse:function(e,t){return e=n(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e},isEqual:function(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right},isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:function(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0},containsXY:function(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}}}),e(F,[],function(){var t=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯ﾞ-ﾟ]");return{isExtendingChar:function(e){return"string"==typeof e&&768<=e.charCodeAt(0)&&t.test(e)}}}),e(H,[P,$,y,E,L,I,F],function(i,e,t,n,r,l,u){function c(e){return"createRange"in e?e.createRange():t.DOM.createRng()}function o(e){return e&&/[\r\n\t ]/.test(e)}function d(e){var t,n=e.startContainer,r=e.startOffset;return!!(o(e.toString())&&v(n.parentNode)&&(o((t=n.data)[r-1])||o(t[r+1])))}function a(e){function r(e){var t,n;return t=0<(n=e.getClientRects()).length?l.clone(n[0]):l.clone(e.getBoundingClientRect()),b(e)&&0===t.left?function(e){var t,n=e.ownerDocument,r=c(n),i=n.createTextNode(" "),o=e.parentNode;return o.insertBefore(i,e),r.setStart(i,0),r.setEnd(i,1),t=l.clone(r.getBoundingClientRect()),o.removeChild(i),t}(e):t}function i(e,t){return(e=l.collapse(e,t)).width=1,e.right=e.left+1,e}function o(e){0!==e.height&&(0<s.length&&l.isEqual(e,s[s.length-1])||s.push(e))}function t(e,t){var n=c(e.ownerDocument);if(t<e.data.length){if(u.isExtendingChar(e.data[t]))return s;if(u.isExtendingChar(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!d(n)))return o(i(r(n),!1)),s}0<t&&(n.setStart(e,t-1),n.setEnd(e,t),d(n)||o(i(r(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),d(n)||o(i(r(n),!0)))}var n,a,s=[];if(y(e.container()))return t(e.container(),e.offset()),s;if(f(e.container()))if(e.isAtEnd())a=$(e.container(),e.offset()),y(a)&&t(a,a.data.length),g(a)&&!b(a)&&o(i(r(a),!1));else{if(a=$(e.container(),e.offset()),y(a)&&t(a,0),g(a)&&e.isAtEnd())return o(i(r(a),!1)),s;n=$(e.container(),e.offset()-1),!g(n)||b(n)||!p(n)&&!p(a)&&g(a)||o(i(r(n),!1)),g(a)&&o(i(r(a),!0))}return s}function s(t,n,e){function r(){return e=e||a(new s(t,n))}return{container:i.constant(t),offset:i.constant(n),toRange:function(){var e;return(e=c(t.ownerDocument)).setStart(t,n),e.setEnd(t,n),e},getClientRects:r,isVisible:function(){return 0<r().length},isAtStart:function(){return y(t),0===n},isAtEnd:function(){return y(t)?n>=t.data.length:n>=t.childNodes.length},isEqual:function(e){return e&&t===e.container()&&n===e.offset()},getNode:function(e){return $(t,e?n-1:n)}}}var f=e.isElement,h=r.isCaretCandidate,p=e.matchStyleValues("display","block table"),m=e.matchStyleValues("float","left right"),g=i.and(f,h,i.negate(m)),v=i.negate(e.matchStyleValues("white-space","pre pre-line pre-wrap")),y=e.isText,b=e.isBr,x=t.nodeIndex,$=n.getNode;return s.fromRangeStart=function(e){return new s(e.startContainer,e.startOffset)},s.fromRangeEnd=function(e){return new s(e.endContainer,e.endOffset)},s.after=function(e){return new s(e.parentNode,x(e)+1)},s.before=function(e){return new s(e.parentNode,x(e))},s}),e(U,[$,y,P,c,H],function(l,e,u,c,o){function a(e){return e?c.reduce(e.childNodes,function(e,t){return s(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function i(t){return function(e){return t===e}}function t(e){var r,t,n;return r=a(function e(t){var n=t.parentNode;return s(n)?e(n):n}(e)),t=c.findIndex(r,i(e),e),r=r.slice(0,t+1),n=c.reduce(r,function(e,t,n){return f(t)&&f(r[n-1])&&e++,e},0),r=c.filter(r,l.matchNodeNames(e.nodeName)),(t=c.findIndex(r,i(e),e))-n}function d(e){return(f(e)?"text()":e.nodeName.toLowerCase())+"["+t(e)+"]"}var f=l.isText,s=l.isBogus,h=e.nodeIndex;return{create:function(e,t){var n,r,i,o,a,s=[];return n=t.container(),r=t.offset(),f(n)?i=function(e,t){for(;(e=e.previousSibling)&&f(e);)t+=e.data.length;return t}(n,r):(r>=(o=n.childNodes).length?(i="after",r=o.length-1):i="before",n=o[r]),s.push(d(n)),a=function(e,t,n){var r=[];for(t=t.parentNode;!(t==e||n&&n(t));t=t.parentNode)r.push(t);return r}(e,n),a=c.filter(a,u.negate(l.isBogus)),(s=s.concat(c.map(a,function(e){return d(e)}))).reverse().join("/")+","+i},resolve:function(e,t){var n,r,i;return t?(t=(n=t.split(","))[0].split("/"),i=1<n.length?n[1]:"before",(r=c.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),function(e,t,n){var r=a(e);return r=c.filter(r,function(e,t){return!f(e)||!f(r[t-1])}),(r=c.filter(r,l.matchNodeNames(t)))[n]}(e,t[1],parseInt(t[2],10))):null},e))?f(r)?function(e,t){for(var n,r=e,i=0;f(r);){if(n=r.data.length,i<=t&&t<=i+n){e=r,t-=i;break}if(!f(r.nextSibling)){e=r,t=n;break}i+=n,r=r.nextSibling}return t>e.data.length&&(t=e.data.length),new o(e,t)}(r,parseInt(i,10)):(i="after"===i?h(r)+1:h(r),new o(r.parentNode,i)):null):null}}}),e(z,[i,d,C,U,H,$,E],function(h,x,$,w,C,E,S){function e(y){var b=y.dom;this.getBookmark=function(e,l){function t(e,t){var n=0;return x.each(b.select(e),function(e){if("all"!==e.getAttribute("data-mce-bogus"))return e!=t&&void n++}),n}function n(o){function e(e){var t,n,r,i=e?"start":"end";t=o[i+"Container"],n=o[i+"Offset"],1!=t.nodeType||"TR"!=t.nodeName||(t=(r=t.childNodes)[Math.min(e?n:n-1,r.length-1)])&&(n=e?0:t.childNodes.length,o["set"+(e?"Start":"End")](t,n))}return e(!0),e(),o}var r,i,o,a,s,u,c,d,f,h,p,m="&#xFEFF;";if(2==e)return s=(u=y.getNode())?u.nodeName:null,r=y.getRng(),_(u)||"IMG"==s?{name:s,index:t(s,u)}:y.tridentSel?y.tridentSel.getBookmark(e):(u=v((p=r).startContainer,p.startOffset)||v(p.endContainer,p.endOffset))?{name:s=u.tagName,index:t(s,u)}:(d=r,f=b.getRoot(),(h={}).start=g(d,!0),y.isCollapsed()||(h.end=g(d)),h);function g(e,t){var n,r,i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],a=[],s=0;if(3==i.nodeType){if(l)for(n=i.previousSibling;n&&3==n.nodeType;n=n.previousSibling)o+=n.nodeValue.length;a.push(o)}else o>=(r=i.childNodes).length&&r.length&&(s=1,o=Math.max(0,r.length-1)),a.push(b.nodeIndex(r[o],l)+s);for(;i&&i!=f;i=i.parentNode)a.push(b.nodeIndex(i,l));return a}function v(e,t){var n;if(E.isElement(e)&&(e=S.getNode(e,t),_(e)))return e;if($.isCaretContainer(e)){if(E.isText(e)&&$.isCaretContainerBlock(e)&&(e=e.parentNode),n=e.previousSibling,_(n))return n;if(n=e.nextSibling,_(n))return n}}if(3==e)return r=y.getRng(),{start:w.create(b.getRoot(),C.fromRangeStart(r)),end:w.create(b.getRoot(),C.fromRangeEnd(r))};if(e)return{rng:y.getRng()};if(r=y.getRng(),o=b.uniqueId(),a=y.isCollapsed(),c="overflow:hidden;line-height:0px",r.duplicate||r.item){if(r.item)return{name:s=(u=r.item(0)).nodeName,index:t(s,u)};i=r.duplicate();try{r.collapse(),r.pasteHTML('<span data-mce-type="bookmark" id="'+o+'_start" style="'+c+'">'+m+"</span>"),a||(i.collapse(!1),r.moveToElementText(i.parentElement()),0===r.compareEndPoints("StartToEnd",i)&&i.move("character",-1),i.pasteHTML('<span data-mce-type="bookmark" id="'+o+'_end" style="'+c+'">'+m+"</span>"))}catch(e){return null}}else{if("IMG"==(s=(u=y.getNode()).nodeName))return{name:s,index:t(s,u)};i=n(r.cloneRange()),a||(i.collapse(!1),i.insertNode(b.create("span",{"data-mce-type":"bookmark",id:o+"_end",style:c},m))),(r=n(r)).collapse(!0),r.insertNode(b.create("span",{"data-mce-type":"bookmark",id:o+"_start",style:c},m))}return y.moveToBookmark({id:o,keep:1}),{id:o}},this.moveToBookmark=function(s){function e(e){var t,n,r,i,o=s[e?"start":"end"];if(o){for(r=o[0],n=l,t=o.length-1;1<=t;t--){if(i=n.childNodes,o[t]>i.length-1)return;n=i[o[t]]}3===n.nodeType&&(r=Math.min(o[0],n.nodeValue.length)),1===n.nodeType&&(r=Math.min(o[0],n.childNodes.length)),e?a.setStart(n,r):a.setEnd(n,r)}return!0}function t(e){var t,n,r,i,o=b.get(s.id+"_"+e),a=s.keep;if(o&&(t=o.parentNode,"start"==e?(n=a?(t=o.firstChild,1):b.nodeIndex(o),u=c=t,d=f=n):(n=a?(t=o.firstChild,1):b.nodeIndex(o),c=t,f=n),!a)){for(i=o.previousSibling,r=o.nextSibling,x.each(x.grep(o.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});o=b.get(s.id+"_"+e);)b.remove(o,1);i&&r&&i.nodeType==r.nodeType&&3==i.nodeType&&!h.opera&&(n=i.nodeValue.length,i.appendData(r.nodeValue),b.remove(r),"start"==e?(u=c=i,d=f=n):(c=i,f=n))}}function n(e){return!b.isBlock(e)||e.innerHTML||h.ie||(e.innerHTML='<br data-mce-bogus="1" />'),e}var a,l,u,c,d,f,r,i;if(s)if(x.isArray(s.start)){if(a=b.createRng(),l=b.getRoot(),y.tridentSel)return y.tridentSel.moveToBookmark(s);e(!0)&&e()&&y.setRng(a)}else"string"==typeof s.start?y.setRng((r=b.createRng(),i=w.resolve(b.getRoot(),s.start),r.setStart(i.container(),i.offset()),i=w.resolve(b.getRoot(),s.end),r.setEnd(i.container(),i.offset()),r)):s.id?(t("start"),t("end"),u&&((a=b.createRng()).setStart(n(u),d),a.setEnd(n(c),f),y.setRng(a))):s.name?y.select(b.select(s.name)[s.index]):s.rng&&y.setRng(s.rng)}}var _=E.isContentEditableFalse;return e.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},e}),e(V,[p,D,O,E,z,$,i,d,H],function(s,o,a,n,l,d,u,e,t){function r(e,t,n,r){var i=this;i.dom=e,i.win=t,i.serializer=n,i.editor=r,i.bookmarkManager=new l(i),i.controlSelection=new a(i,r),i.win.getSelection||(i.tridentSel=new o(i))}var c=e.each,f=e.trim,h=u.ie;return r.prototype={setCursorLocation:function(e,t){var n=this.dom.createRng();e?(n.setStart(e,t),n.setEnd(e,t),this.setRng(n),this.collapse(!1)):(this._moveEndPoint(n,this.editor.getBody(),!0),this.setRng(n))},getContent:function(e){var t,n,r,i=this.getRng(),o=this.dom.create("body"),a=this.getSel();return t=n="",(e=e||{}).get=!0,e.format=e.format||"html",e.selection=!0,this.editor.fire("BeforeGetContent",e),"text"==e.format?this.isCollapsed()?"":i.text||(a.toString?a.toString():""):(i.cloneContents?(r=i.cloneContents())&&o.appendChild(r):i.item!==ye||i.htmlText!==ye?(o.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText),o.removeChild(o.firstChild)):o.innerHTML=i.toString(),/^\s/.test(o.innerHTML)&&(t=" "),/\s+$/.test(o.innerHTML)&&(n=" "),e.getInner=!0,e.content=this.isCollapsed()?"":t+this.serializer.serialize(o,e)+n,this.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n,r,i,o=this,a=o.getRng(),s=o.win.document;if((t=t||{format:"html"}).set=!0,t.selection=!0,t.content=e,t.no_events||o.editor.fire("BeforeSetContent",t),e=t.content,a.insertNode){e+='<span id="__caret">_</span>',a.startContainer==s&&a.endContainer==s?s.body.innerHTML=e:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=e:a.createContextualFragment?a.insertNode(a.createContextualFragment(e)):(r=s.createDocumentFragment(),i=s.createElement("div"),r.appendChild(i),i.outerHTML=e,a.insertNode(r))),n=o.dom.get("__caret"),(a=s.createRange()).setStartBefore(n),a.setEndBefore(n),o.setRng(a),o.dom.remove("__caret");try{o.setRng(a)}catch(e){}}else a.item&&(s.execCommand("Delete",!1,null),a=o.getRng()),/^\s+/.test(e)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+e),o.dom.remove("__mce_tmp")):a.pasteHTML(e);t.no_events||o.editor.fire("SetContent",t)},getStart:function(e){var t,n,r,i,o=this.getRng();if(o.duplicate||o.item){if(o.item)return o.item(0);for((r=o.duplicate()).collapse(1),(t=r.parentElement()).ownerDocument!==this.dom.doc&&(t=this.dom.getRoot()),n=i=o.parentElement();i=i.parentNode;)if(i==t){t=n;break}return t}return 1==(t=o.startContainer).nodeType&&t.hasChildNodes()&&(e&&o.collapsed||(t=t.childNodes[Math.min(t.childNodes.length-1,o.startOffset)])),t&&3==t.nodeType?t.parentNode:t},getEnd:function(e){var t,n,r=this.getRng();return r.duplicate||r.item?r.item?r.item(0):((r=r.duplicate()).collapse(0),(t=r.parentElement()).ownerDocument!==this.dom.doc&&(t=this.dom.getRoot()),t&&"BODY"==t.nodeName&&t.lastChild||t):(t=r.endContainer,n=r.endOffset,1==t.nodeType&&t.hasChildNodes()&&(e&&r.collapsed||(t=t.childNodes[0<n?n-1:n])),t&&3==t.nodeType?t.parentNode:t)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n,r=this.dom,i=r.createRng();if(this.lastFocusBookmark=null,e){if(!t&&this.controlSelection.controlSelect(e))return;n=r.nodeIndex(e),i.setStart(e.parentNode,n),i.setEnd(e.parentNode,n+1),t&&(this._moveEndPoint(i,e,!0),this._moveEndPoint(i,e)),this.setRng(i)}return e},isCollapsed:function(){var e=this.getRng(),t=this.getSel();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},collapse:function(e){var t,n=this.getRng();n.item&&(t=n.item(0),(n=this.win.document.body.createTextRange()).moveToElementText(t)),n.collapse(!!e),this.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(e){return-1}}var n,r,i,o,a,s,l=this;if(!l.win)return null;if(null==(o=l.win.document))return null;if(!e&&l.lastFocusBookmark){var u=l.lastFocusBookmark;return u.startContainer?((r=o.createRange()).setStart(u.startContainer,u.startOffset),r.setEnd(u.endContainer,u.endOffset)):r=u,r}if(e&&l.tridentSel)return l.tridentSel.getRangeAt(0);try{(n=l.getSel())&&(r=0<n.rangeCount?n.getRangeAt(0):n.createRange?n.createRange():o.createRange())}catch(e){}if((s=l.editor.fire("GetSelectionRange",{range:r})).range!==r)return s.range;if(h&&r&&r.setStart&&o.selection){try{a=o.selection.createRange()}catch(e){}a&&a.item&&(i=a.item(0),(r=o.createRange()).setStartBefore(i),r.setEndAfter(i))}return(r=r||(o.createRange?o.createRange():o.body.createTextRange())).setStart&&9===r.startContainer.nodeType&&r.collapsed&&(i=l.dom.getRoot(),r.setStart(i,0),r.setEnd(i,0)),l.selectedRange&&l.explicitRange&&(0===t(r.START_TO_START,r,l.selectedRange)&&0===t(r.END_TO_END,r,l.selectedRange)?r=l.explicitRange:(l.selectedRange=null,l.explicitRange=null)),r},setRng:function(e,t){var n,r;if(e)if(e.select){this.explicitRange=null;try{e.select()}catch(e){}}else if(this.tridentSel){if(e.cloneRange)try{this.tridentSel.addRange(e)}catch(e){}}else{if(n=this.getSel(),e=this.editor.fire("SetSelectionRange",{range:e}).range,n){this.explicitRange=e;try{n.removeAllRanges(),n.addRange(e)}catch(e){}!1===t&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),this.selectedRange=0<n.rangeCount?n.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!n.setBaseAndExtent||u.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&((r=e.startContainer.childNodes[e.startOffset])&&"IMG"==r.tagName&&(n.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),n.anchorNode===e.startContainer&&n.focusNode===e.endContainer||n.setBaseAndExtent(r,0,r,1))),this.editor.fire("AfterSetSelectionRange",{range:e})}},setNode:function(e){return this.setContent(this.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t,n,r,i,o,a=this.getRng(),s=this.dom.getRoot();return a?(n=a.startContainer,r=a.endContainer,i=a.startOffset,o=a.endOffset,a.setStart?(t=a.commonAncestorContainer,!a.collapsed&&(n==r&&o-i<2&&n.hasChildNodes()&&(t=n.childNodes[i]),3===n.nodeType&&3===r.nodeType&&(n=n.length===i?e(n.nextSibling,!0):n.parentNode,r=0===o?e(r.previousSibling,!1):r.parentNode,n&&n===r))?n:t&&3==t.nodeType?t.parentNode:t):((t=a.item?a.item(0):a.parentElement()).ownerDocument!==this.win.document&&(t=s),t)):s},getSelectedBlocks:function(e,t){var n,r,i=this.dom,o=[];if(r=i.getRoot(),e=i.getParent(e||this.getStart(),i.isBlock),t=i.getParent(t||this.getEnd(),i.isBlock),e&&e!=r&&o.push(e),e&&t&&e!=t)for(var a=new s(n=e,r);(n=a.next())&&n!=t;)i.isBlock(n)&&o.push(n);return t&&e!=t&&t!=r&&o.push(t),o},isForward:function(){var e,t,n=this.dom,r=this.getSel();return!(r&&r.anchorNode&&r.focusNode)||((e=n.createRng()).setStart(r.anchorNode,r.anchorOffset),e.collapse(!0),(t=n.createRng()).setStart(r.focusNode,r.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0)},normalize:function(){var e=this.getRng();return u.range&&new n(this.dom).normalize(e)&&this.setRng(e,this.isForward()),e},selectorChanged:function(e,t){var a,s=this;return s.selectorChangedData||(s.selectorChangedData={},a={},s.editor.on("NodeChange",function(e){var n=e.element,r=s.dom,i=r.getParents(n,null,r.getRoot()),o={};c(s.selectorChangedData,function(e,n){c(i,function(t){if(r.is(t,n))return a[n]||(c(e,function(e){e(!0,{node:t,selector:n,parents:i})}),a[n]=e),o[n]=e,!1})}),c(a,function(e,t){o[t]||(delete a[t],c(e,function(e){e(!1,{node:n,selector:t,parents:i})}))})})),s.selectorChangedData[e]||(s.selectorChangedData[e]=[]),s.selectorChangedData[e].push(t),s},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o,a,s=this.dom,l=s.getRoot(),u=0;if(d.isElement(e)){if(!1===t&&(u=e.offsetHeight),"BODY"!=l.nodeName){var c=this.getScrollContainer();if(c)return r=n(e).y-n(c).y+u,a=c.clientHeight,void((r<(o=c.scrollTop)||o+a<r+25)&&(c.scrollTop=r<o?r:r-a+25))}i=s.getViewPort(this.editor.getWin()),r=s.getPos(e).y+u,o=i.y,a=i.h,(r<i.y||o+a<r+25)&&this.editor.getWin().scrollTo(0,r<o?r:r-a+25)}},placeCaretAt:function(e,t){this.setRng(n.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(e,t,n){var r=t,i=new s(t,r),o=this.dom.schema.getNonEmptyElements();do{if(3==t.nodeType&&0!==f(t.nodeValue).length)return void(n?e.setStart(t,0):e.setEnd(t,t.nodeValue.length));if(o[t.nodeName]&&!/^(TD|TH)$/.test(t.nodeName))return void(n?e.setStartBefore(t):"BR"==t.nodeName?e.setEndBefore(t):e.setEndAfter(t));if(u.ie&&u.ie<11&&this.dom.isBlock(t)&&this.dom.isEmpty(t))return void(n?e.setStart(t,0):e.setEnd(t,0))}while(t=n?i.next():i.prev());"BODY"==r.nodeName&&(n?e.setStart(r,0):e.setEnd(r,r.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?t.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},r}),e(j,[z,d],function(o,e){var a=e.each;return function(i){this.compare=function(e,t){function n(n){var r={};return a(i.getAttribs(n),function(e){var t=e.nodeName.toLowerCase();0!==t.indexOf("_")&&"style"!==t&&0!==t.indexOf("data-")&&(r[t]=i.getAttrib(n,t))}),r}function r(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(void 0===(n=t[r]))return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return!(e.nodeName!=t.nodeName||!r(n(e),n(t))||!r(i.parseStyle(i.getAttrib(e,"style")),i.parseStyle(i.getAttrib(t,"style")))||o.isBookmarkNode(e)||o.isBookmarkNode(t))}}}),e(W,[y,d,k],function(e,d,o){function c(e,t){function u(e){var t;return r="string"==typeof e?{name:e,classes:[],attrs:{}}:e,function(e,t){t.classes.length&&p.addClass(e,t.classes.join(" ")),p.setAttribs(e,t.attrs)}(t=p.create(r.name),r),t}var n,r,i,c=t&&t.schema||new o({});return e&&e.length?(n=u(r=e[0]),(i=p.create("div")).appendChild(function e(n,t,r){var i,o,a,s=t.length&&t[0],l=s&&s.name;if(a=function(e,t){var n="string"!=typeof e?e.nodeName.toLowerCase():e,r=c.getElementRule(n).parentsRequired;return!(!r||!r.length)&&(t&&-1!==d.inArray(r,t)?t:r[0])}(n,l))l==a?(o=t[0],t=t.slice(1)):o=a;else if(s)o=t[0],t=t.slice(1);else if(!r)return n;return o&&(i=u(o)).appendChild(n),r&&(i||(i=p.create("div")).appendChild(n),d.each(r,function(e){var t=u(e);i.insertBefore(t,n)})),e(i,t,o&&o.siblings)}(n,e.slice(1),r.siblings)),i):""}function r(e){var t,a={classes:[],attrs:{}};return"*"!==(e=a.selector=d.trim(e))&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,function(e,t,n,r,i){switch(t){case"#":a.attrs.id=n;break;case".":a.classes.push(n);break;case":":-1!==d.inArray("checked disabled enabled read-only required".split(" "),n)&&(a.attrs[n]=n)}if("["==r){var o=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);o&&(a.attrs[o[1]]=o[2])}return""})),a.name=t||"div",a}function f(e){return e&&"string"==typeof e?(e=(e=e.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),d.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),function(e){var t=d.map(e.split(/(?:~\+|~|\+)/),r),n=t.pop();return t.length&&(n.siblings=t),n}).reverse()):[]}var h=d.each,p=e.DOM;return{getCssText:function(n,e){function r(e){return e.replace(/%(\w+)/g,"")}var t,i,o,a,s,l,u="";if(!1===(l=n.settings.preview_styles))return"";if("string"!=typeof l&&(l="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof e){if(!(e=n.formatter.get(e)))return;e=e[0]}return"preview"in e&&!1===(l=e.preview)?"":(t=e.block||e.inline||"span",i=(a=f(e.selector)).length?(a[0].name||(a[0].name=t),t=e.selector,c(a,n)):c([t],n),o=p.select(t,i)[0]||i.firstChild,h(e.styles,function(e,t){(e=r(e))&&p.setStyle(o,t,e)}),h(e.attributes,function(e,t){(e=r(e))&&p.setAttrib(o,t,e)}),h(e.classes,function(e){e=r(e),p.hasClass(o,e)||p.addClass(o,e)}),n.fire("PreviewFormats"),p.setStyles(i,{position:"absolute",left:-65535}),n.getBody().appendChild(i),s=p.getStyle(n.getBody(),"fontSize",!0),s=/px$/.test(s)?parseInt(s,10):0,h(l.split(" "),function(e){var t=p.getStyle(o,e,!0);if(!("background-color"==e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=p.getStyle(n.getBody(),e,!0),"#ffffff"==p.toHex(t).toLowerCase())||"color"==e&&"#000000"==p.toHex(t).toLowerCase())){if("font-size"==e&&/em|%$/.test(t)){if(0===s)return;t=(t=parseFloat(t,10)/(/%$/.test(t)?100:1))*s+"px"}"border"==e&&t&&(u+="padding:0 2px;"),u+=e+":"+t+";"}}),n.fire("AfterPreviewFormats"),p.remove(i),u)},parseSelector:f,selectorToHtml:function(e,t){return c(f(e),t)}}}),e(q,[c,$,f],function(i,o,a){var e,t,n={},s=i.filter,l=i.each;return t=function(e){var t,n,r=e.selection.getRng();t=o.matchNodeNames("pre"),r.collapsed||(n=e.selection.getSelectedBlocks(),l(s(s(n,t),function(e){return t(e.previousSibling)&&-1!=i.indexOf(n,e.previousSibling)}),function(e){!function(e,t){a(t).remove(),a(e).append("<br><br>").append(t.childNodes)}(e.previousSibling,e)}))},n[e="pre"]||(n[e]=[]),n[e].push(t),{postProcess:function(e,t){l(n[e],function(e){e(t)})}}}),e(G,[p,E,z,j,P,d,W,q],function(te,e,i,h,ne,re,o,ie){return function(b){function x(e){return e.nodeType&&(e=e.nodeName),!!b.schema.getTextBlockElements()[e.toLowerCase()]}function p(e){return/^(TH|TD)$/.test(e.nodeName)}function g(e,t){return U.getParents(e,t,U.getRoot())}function $(e){return 1===e.nodeType&&"_mce_caret"===e.id}function w(e){return e?r[e]:r}function n(e,t){e&&("string"!=typeof e?Z(e,function(e,t){n(t,e)}):(t=t.length?t:[t],Z(t,function(e){e.deep===F&&(e.deep=!e.selector),e.split===F&&(e.split=!e.selector||e.inline),e.remove===F&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),r[e]=t))}function a(e,t){var n=w(t);if(n)for(var r=0;r<n.length;r++)if(!1===n[r].inherit&&U.is(e,n[r].selector))return!0;return!1}function m(e){var t;return b.dom.getParent(e,function(e){return(t=b.dom.getStyle(e,"text-decoration"))&&"none"!==t}),t}function l(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=m(e.parentNode),b.dom.getStyle(e,"color")&&t?b.dom.setStyle(e,"text-decoration",t):b.dom.getStyle(e,"text-decoration")===t&&b.dom.setStyle(e,"text-decoration",null))}function C(h,p,o){function m(n,e){if(e=e||y,n){if(e.onformat&&e.onformat(n,e,p,o),Z(e.styles,function(e,t){U.setStyle(n,t,c(e,p))}),e.styles){var t=U.getAttrib(n,"style");t&&n.setAttribute("data-mce-style",t)}Z(e.attributes,function(e,t){U.setAttrib(n,t,c(e,p))}),Z(e.classes,function(e){e=c(e,p),U.hasClass(n,e)||U.addClass(n,e)})}}function g(e,t){var n=!1;return!!y.selector&&(Z(e,function(e){if(!("collapsed"in e&&e.collapsed!==r))return U.is(t,e.selector)&&!$(t)?(m(t,e),!(n=!0)):void 0}),n)}function e(e,t,l){var u,c,d=[],f=!0;u=y.inline||y.block,m(c=U.create(u)),V.walk(e,function(e){var s;Z(e,function e(t){var n,r,i,o;if(o=f,n=t.nodeName.toLowerCase(),r=t.parentNode.nodeName.toLowerCase(),1===t.nodeType&&K(t)&&(o=f,f="true"===K(t),i=!0),_(n,"br"))return s=0,void(y.block&&U.remove(t));if(y.wrapper&&E(t,h,p))s=0;else{if(f&&!i&&y.block&&!y.wrapper&&x(n)&&j(r,u))return m(t=U.rename(t,u)),d.push(t),void(s=0);if(y.selector){var a=g(v,t);if(!y.inline||a)return void(s=0)}!f||i||!j(u,n)||!j(r,u)||!l&&3===t.nodeType&&1===t.nodeValue.length&&65279===t.nodeValue.charCodeAt(0)||$(t)||y.inline&&W(t)?(s=0,Z(Q(t.childNodes),e),i&&(f=o),s=0):(s||(s=U.clone(c,X),t.parentNode.insertBefore(s,t),d.push(s)),s.appendChild(t))}})}),!0===y.links&&Z(d,function(e){!function e(t){"A"===t.nodeName&&m(t,y),Z(Q(t.childNodes),e)}(e)}),Z(d,function(n){function r(e){var t=0;return Z(e.childNodes,function(e){A(e)||J(e)||t++}),t}function i(e){var t=!1;return Z(e.childNodes,function(e){if(k(e))return t=e,!1}),t}var e,t,o,a;if(e=r(n),!(1<d.length)&&W(n)||0!==e){if(y.inline||y.wrapper){if(y.exact||1!==e||((o=i(t=n))&&!J(o)&&S(o,y)&&(m(a=U.clone(o,X)),U.replace(a,t,Y),U.remove(o,1)),n=a||t),Z(v,function(t){Z(U.select(t.inline,n),function(e){J(e)||D(t,p,e,t.exact?e:null)})}),E(n.parentNode,h,p)&&D(y,p,n)&&(n=0),y.merge_with_parents&&U.getParent(n.parentNode,function(e){if(E(e,h,p))return D(y,p,n)&&(n=0),Y}),!W(n)&&!T(n,"fontSize")){var s=function(e,t){do{if(1!==r(e))break;if(!(e=i(e)))break;if(t(e))return e}while(e);return null}(n,N("fontSize"));s&&C("fontsize",{value:T(s,"fontSize")},n)}n&&!1!==y.merge_siblings&&(n=O(n=O(M(n),n),M(n,Y)))}}else U.remove(n,1)})}var t,n,v=w(h),y=v[0],r=!o&&z.isCollapsed();if("false"!==K(z.getNode())){if(y){if(o)o.nodeType?g(v,o)||((n=U.createRng()).setStartBefore(o),n.setEndAfter(o),e(B(n,v),0,!0)):e(o,0,!0);else if(r&&y.inline&&!U.select("td[data-mce-selected],th[data-mce-selected]").length)L("apply",h,p);else{var i=b.selection.getNode();d||!v[0].defaultBlock||U.getParent(i,U.isBlock)||C(v[0].defaultBlock),b.selection.setRng(function(){var e=b.selection.getRng(),t=e.startContainer,n=e.endContainer;if(t!=n&&0===e.endOffset){var r=function(e,t){var n=new te(t);for(o=n.prev2();o;o=n.prev2()){if(3==o.nodeType&&0<o.data.length)return o;if(1<o.childNodes.length||o==e||"BR"==o.tagName)return o}}(t,n),i=3==r.nodeType?r.data.length:r.childNodes.length;e.setEnd(r,i)}return e}()),t=z.getBookmark(),e(B(z.getRng(Y),v)),y.styles&&((y.styles.color||y.styles.textDecoration)&&(ee(i,l,"childNodes"),l(i)),y.styles.backgroundColor&&function t(e,n,r){Z(e.childNodes,function(e){k(e)&&(n(e)&&r(e),e.hasChildNodes()&&t(e,n,r))})}(i,N("fontSize"),function(e,t){return ne.curry(function(e,t,n){U.setStyle(n,e,t)},e,t)}("backgroundColor",c(y.styles.backgroundColor,p)))),z.moveToBookmark(t),I(z.getRng(Y)),b.nodeChanged()}ie.postProcess(h,b)}}else{o=z.getNode();for(var a=0,s=v.length;a<s;a++)if(v[a].ceFalseOverride&&U.is(o,v[a].selector))return void m(o,v[a])}}function v(r,c,e,i){function o(e){return function(e,t,n,r){var i,o,a,s,l,u;if(e){for(u=e.parentNode,i=t.parentNode;i&&i!=u;i=i.parentNode){for(o=U.clone(i,X),l=0;l<d.length;l++)if(D(d[l],c,o,o)){o=0;break}o&&(a&&o.appendChild(a),s=s||o,a=o)}!r||f.mixed&&W(e)||(t=U.split(e,t)),a&&(n.parentNode.insertBefore(a,n),s.appendChild(n))}return t}(function(e){var n;return Z(g(e.parentNode).reverse(),function(e){var t;n||"_start"==e.id||"_end"==e.id||(t=E(e,r,c,i))&&!1!==t.split&&(n=e)}),n}(e),e,e,!0)}function a(e){var t=U.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return J(n)&&(n=n[e?"firstChild":"lastChild"]),3==n.nodeType&&0===n.data.length&&(n=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),U.remove(t,!0),n}function t(e){var t,n,r=e.commonAncestorContainer;if(e=B(e,d,Y),f.split){if((t=P(e,Y))!=(n=P(e))){if(/^(TR|TH|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TR"==t.nodeName?t.firstChild.firstChild||t:t.firstChild||t),r&&/^T(HEAD|BODY|FOOT|R)$/.test(r.nodeName)&&p(n)&&n.firstChild&&(n=n.firstChild||n),U.isChildOf(t,n)&&!W(n)&&!p(t)&&!p(n))return o(t=R(t,"span",{id:"_start","data-mce-type":"bookmark"})),void a(Y);t=R(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=R(n,"span",{id:"_end","data-mce-type":"bookmark"}),o(t),o(n),t=a(Y),n=a()}else t=n=o(t);e.startContainer=t.parentNode?t.parentNode:t,e.startOffset=q(t),e.endContainer=n.parentNode?n.parentNode:n,e.endOffset=q(n)+1}V.walk(e,function(e){Z(e,function(e){(function e(t){var n,r,i,o,a;if(1===t.nodeType&&K(t)&&(o=l,l="true"===K(t),a=!0),n=Q(t.childNodes),l&&!a)for(r=0,i=d.length;r<i&&!D(d[r],c,t,t);r++);if(f.deep&&n.length){for(r=0,i=n.length;r<i;r++)e(n[r]);a&&(l=o)}})(e),1===e.nodeType&&"underline"===b.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===m(e.parentNode)&&D({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var n,s,d=w(r),f=d[0],l=!0;if(e)e.nodeType?((s=U.createRng()).setStartBefore(e),s.setEndAfter(e),t(s)):t(e);else if("false"!==K(z.getNode()))z.isCollapsed()&&f.inline&&!U.select("td[data-mce-selected],th[data-mce-selected]").length?L("remove",r,c,i):(n=z.getBookmark(),t(z.getRng(Y)),z.moveToBookmark(n),f.inline&&y(r,c,z.getStart())&&I(z.getRng(!0)),b.nodeChanged());else{e=z.getNode();for(var u=0,h=d.length;u<h&&(!d[u].ceFalseOverride||!D(d[u],c,e,e));u++);}}function E(e,t,s,l){function n(e,t,n){var r,i,o,a=t[n];if(t.onmatch)return t.onmatch(e,t,n);if(a)if(a.length===F){for(r in a)if(a.hasOwnProperty(r)){if(i="attributes"===n?U.getAttrib(e,r):T(e,r),l&&!i&&!t.exact)return;if((!l||t.exact)&&!_(i,u(c(a[r],s),r)))return}}else for(o=0;o<a.length;o++)if("attributes"===n?U.getAttrib(e,a[o]):T(e,a[o]))return t;return t}var r,i,o,a=w(t);if(a&&e)for(i=0;i<a.length;i++)if(S(e,r=a[i])&&n(e,r,"attributes")&&n(e,r,"styles")){if(o=r.classes)for(i=0;i<o.length;i++)if(!U.hasClass(e,o[i]))return;return r}}function y(n,r,e){function t(e){var t=U.getRoot();return e!==t&&E(e=U.getParent(e,function(e){return!!a(e,n)||e.parentNode===t||!!E(e,n,r,!0)}),n,r)}var i;return e?t(e):t(e=z.getNode())?Y:(i=z.getStart())!=e&&t(i)?Y:X}function S(e,t){return _(e,t.inline)?Y:_(e,t.block)?Y:t.selector?1==e.nodeType&&U.is(e,t.selector):void 0}function _(e,t){return e=""+((e=e||"").nodeName||e),t=""+((t=t||"").nodeName||t),e.toLowerCase()==t.toLowerCase()}function k(e){return 1==e.nodeType&&!J(e)&&!A(e)&&!$(e)}function N(e){return ne.curry(function(e,t){return!(!t||!T(t,e))},e)}function T(e,t){return u(U.getStyle(e,t),t)}function u(e,t){return"color"!=t&&"backgroundColor"!=t||(e=U.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function c(e,n){return"string"!=typeof e?e=e(n):n&&(e=e.replace(/%(\w+)/g,function(e,t){return n[t]||e})),e}function A(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function R(e,t,n){var r=U.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function B(a,s,l){function e(e){var t,n,r,i,o,a;if(t=n=e?f:p,i=e?"previousSibling":"nextSibling",o=U.getRoot(),3==t.nodeType&&!A(t)&&(e?0<h:m<t.nodeValue.length))return t;for(;;){if(!s[0].block_expand&&W(n))return n;for(r=n[i];r;r=r[i])if(!J(r)&&!A(r)&&("BR"!=(a=r).nodeName||!a.getAttribute("data-mce-bogus")||a.nextSibling))return n;if(n==o||n.parentNode==o){t=n;break}n=n.parentNode}return t}function t(e,t){for(t===F&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)(e=e.childNodes[t])&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function n(e){for(var t=e;t;){if(1===t.nodeType&&K(t))return"false"===K(t)?t:e;t=t.parentNode}return e}function r(e,t,o){function n(e,t){var n,r,i=e.nodeValue;return void 0===t&&(t=o?i.length:0),o?(n=i.lastIndexOf(" ",t),-1===(n=(r=i.lastIndexOf(" ",t))<n?n:r)||l||n++):(n=i.indexOf(" ",t),r=i.indexOf(" ",t),n=-1!==n&&(-1===r||n<r)?n:r),n}var r,i,a,s;if(3===e.nodeType){if(-1!==(a=n(e,t)))return{container:e,offset:a};s=e}for(r=new te(e,U.getParent(e,W)||b.getBody());i=r[o?"prev":"next"]();)if(3===i.nodeType){if(-1!==(a=n(s=i)))return{container:i,offset:a}}else if(W(i))break;if(s)return{container:s,offset:t=o?0:s.length}}function i(e,t){var n,r,i,o;for(3==e.nodeType&&0===e.nodeValue.length&&e[t]&&(e=e[t]),n=g(e),r=0;r<n.length;r++)for(i=0;i<s.length;i++)if(!("collapsed"in(o=s[i])&&o.collapsed!==a.collapsed)&&U.is(n[r],o.selector))return n[r];return e}function o(e,t){var n,r=U.getRoot();if(s[0].wrapper||(n=U.getParent(e,s[0].block,r)),(n=n||U.getParent(3==e.nodeType?e.parentNode:e,function(e){return e!=r&&x(e)}))&&s[0].wrapper&&(n=g(n,"ul,ol").reverse()[0]||n),!n)for(n=e;n[t]&&!W(n[t])&&!_(n=n[t],"br"););return n||e}var u,c,d,f=a.startContainer,h=a.startOffset,p=a.endContainer,m=a.endOffset;if(1==f.nodeType&&f.hasChildNodes()&&(u=f.childNodes.length-1,3==(f=f.childNodes[u<h?u:h]).nodeType&&(h=0)),1==p.nodeType&&p.hasChildNodes()&&(u=p.childNodes.length-1,3==(p=p.childNodes[u<m?u:m-1]).nodeType&&(m=p.nodeValue.length)),f=n(f),p=n(p),(J(f.parentNode)||J(f))&&(3==(f=(f=J(f)?f:f.parentNode).nextSibling||f).nodeType&&(h=0)),(J(p.parentNode)||J(p))&&(3==(p=(p=J(p)?p:p.parentNode).previousSibling||p).nodeType&&(m=p.length)),s[0].inline&&(a.collapsed&&((d=r(f,h,!0))&&(f=d.container,h=d.offset),(d=r(p,m))&&(p=d.container,m=d.offset)),(c=t(p,m)).node)){for(;c.node&&0===c.offset&&c.node.previousSibling;)c=t(c.node.previousSibling);c.node&&0<c.offset&&3===c.node.nodeType&&" "===c.node.nodeValue.charAt(c.offset-1)&&1<c.offset&&(p=c.node).splitText(c.offset-1)}return(s[0].inline||s[0].block_expand)&&(s[0].inline&&3==f.nodeType&&0!==h||(f=e(!0)),s[0].inline&&3==p.nodeType&&m!==p.nodeValue.length||(p=e())),s[0].selector&&s[0].expand!==X&&!s[0].inline&&(f=i(f,"previousSibling"),p=i(p,"nextSibling")),(s[0].block||s[0].selector)&&(f=o(f,"previousSibling"),p=o(p,"nextSibling"),s[0].block&&(W(f)||(f=e(!0)),W(p)||(p=e()))),1==f.nodeType&&(h=q(f),f=f.parentNode),1==p.nodeType&&(m=q(p)+1,p=p.parentNode),{startContainer:f,startOffset:h,endContainer:p,endOffset:m}}function D(n,r,i,o){var e,t,a;if(!S(i,n)&&!function(e,t){return t.links&&"A"==e.tagName}(i,n))return X;if("all"!=n.remove)for(Z(n.styles,function(e,t){e=u(c(e,r),t),"number"==typeof t&&(t=e,o=0),!n.remove_similar&&o&&!_(T(o,t),e)||U.setStyle(i,t,""),a=1}),a&&""===U.getAttrib(i,"style")&&(i.removeAttribute("style"),i.removeAttribute("data-mce-style")),Z(n.attributes,function(e,t){var n;if(e=c(e,r),"number"==typeof t&&(t=e,o=0),!o||_(U.getAttrib(o,t),e)){if("class"==t&&((e=U.getAttrib(i,t))&&(n="",Z(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(n+=(n?" ":"")+e)}),n)))return void U.setAttrib(i,t,n);"class"==t&&i.removeAttribute("className"),f.test(t)&&i.removeAttribute("data-mce-"+t),i.removeAttribute(t)}}),Z(n.classes,function(e){e=c(e,r),o&&!U.hasClass(o,e)||U.removeClass(i,e)}),t=U.getAttribs(i),e=0;e<t.length;e++){var s=t[e].nodeName;if(0!==s.indexOf("_")&&0!==s.indexOf("data-"))return X}return"none"!=n.remove?(function(e,t){function n(e,t,n){return!(e=M(e,t,n))||"BR"==e.nodeName||W(e)}var r,i=e.parentNode;t.block&&(d?i==U.getRoot()&&(t.list_block&&_(e,t.list_block)||Z(Q(e.childNodes),function(e){j(d,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=R(e,d),U.setAttribs(r,b.settings.forced_root_block_attrs)):r=0})):W(e)&&!W(i)&&(n(e,X)||n(e.firstChild,Y,1)||e.insertBefore(U.create("br"),e.firstChild),n(e,Y)||n(e.lastChild,X,1)||e.appendChild(U.create("br")))),t.selector&&t.inline&&!_(t.inline,e)||U.remove(e,1)}(i,n),Y):void 0}function M(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!A(e))return e}function O(t,e){function n(e,t){for(r=e;r;r=r[t]){if(3==r.nodeType&&0!==r.nodeValue.length)return e;if(1==r.nodeType&&!J(r))return r}return e}var r,i,o=new h(U);if(t&&e&&(t=n(t,"previousSibling"),e=n(e,"nextSibling"),o.compare(t,e))){for(r=t.nextSibling;r&&r!=e;)r=(i=r).nextSibling,t.appendChild(i);return U.remove(e),Z(Q(e.childNodes),function(e){t.appendChild(e)}),t}return e}function P(e,t){var n,r,i;return n=e[t?"startContainer":"endContainer"],r=e[t?"startOffset":"endOffset"],1==n.nodeType&&(i=n.childNodes.length-1,!t&&r&&r--,n=n.childNodes[i<r?i:r]),3===n.nodeType&&t&&r>=n.nodeValue.length&&(n=new te(n,b.getBody()).next()||n),3!==n.nodeType||t||0!==r||(n=new te(n,b.getBody()).prev()||n),n}function L(e,d,f,h){function p(e){var t=U.create("span",{id:a,"data-mce-bogus":!0,style:r?"color:red":""});return e&&t.appendChild(b.getDoc().createTextNode(G)),t}function i(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==G||1<e.childNodes.length)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function s(e){for(;e;){if(e.id===a)return e;e=e.parentNode}}function l(e){var t;if(e)for(e=(t=new te(e,e)).current();e;e=t.next())if(3===e.nodeType)return e}function o(e,t){var n,r;if(e)r=z.getRng(!0),i(e)?(!1!==t&&(r.setStartBefore(e),r.setEndBefore(e)),U.remove(e)):((n=l(e)).nodeValue.charAt(0)===G&&(n.deleteData(0,1),r.startContainer==n&&0<r.startOffset&&r.setStart(n,r.startOffset-1),r.endContainer==n&&0<r.endOffset&&r.setEnd(n,r.endOffset-1)),U.remove(e,1)),z.setRng(r);else if(!(e=s(z.getStart())))for(;e=U.get(a);)o(e,!1)}function n(){var e;(e=s(z.getStart()))&&!U.isEmpty(e)&&ee(e,function(e){1!=e.nodeType||e.id===a||U.isEmpty(e)||U.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var a="_mce_caret",r=b.settings.caret_debug;b._hasCaretEvents||(H=function(){var e,t=[];if(i(s(z.getStart()),t))for(e=t.length;e--;)U.setAttrib(t[e],"data-mce-bogus","1")},t=function(e){var t=e.keyCode;o(),8==t&&z.isCollapsed()&&z.getStart().innerHTML==G&&o(s(z.getStart())),37!=t&&39!=t||o(s(z.getStart())),n()},b.on("SetContent",function(e){e.selection&&n()}),b._hasCaretEvents=!0),"apply"==e?function(){var e,t,n,r,i,o;r=(e=z.getRng(!0)).startOffset,o=e.startContainer.nodeValue,(t=s(z.getStart()))&&(n=l(t));var a=/[^\s\u00a0\u00ad\u200b\ufeff]/;o&&0<r&&r<o.length&&a.test(o.charAt(r))&&a.test(o.charAt(r-1))?(i=z.getBookmark(),e.collapse(!0),e=B(e,w(d)),e=V.split(e),C(d,f,e),z.moveToBookmark(i)):(t&&n.nodeValue===G||(n=(t=p(!0)).firstChild,e.insertNode(t),r=1),C(d,f,t),z.setCursorLocation(n,r))}():function(){var e,t,n,r,i,o,a,s,l=z.getRng(!0),u=[];for(e=l.startContainer,t=l.startOffset,3==(i=e).nodeType&&(t!=e.nodeValue.length&&(r=!0),i=i.parentNode);i;){if(E(i,d,f,h)){o=i;break}i.nextSibling&&(r=!0),u.push(i),i=i.parentNode}if(o)if(r)n=z.getBookmark(),l.collapse(!0),l=B(l,w(d),!0),l=V.split(l),v(d,f,l),z.moveToBookmark(n);else{for(i=s=p(),a=u.length-1;0<=a;a--)i.appendChild(U.clone(u[a],!1)),i=i.firstChild;i.appendChild(U.doc.createTextNode(G)),i=i.firstChild;var c=U.getParent(o,x);c&&U.isEmpty(c)?o.parentNode.replaceChild(s,o):U.insertAfter(s,o),z.setCursorLocation(i,1),U.isEmpty(o)&&U.remove(o)}}()}function I(e){var t,n,r,i,o,a=e.startContainer,s=e.startOffset;if((e.startContainer!=e.endContainer||!function(e){return e&&/^(IMG)$/.test(e.nodeName)}(e.startContainer.childNodes[e.startOffset]))&&(3==a.nodeType&&s>=a.nodeValue.length&&(s=q(a),a=a.parentNode,t=!0),1==a.nodeType))for(a=(i=a.childNodes)[Math.min(s,i.length-1)],n=new te(a,U.getParent(a,U.isBlock)),(s>i.length-1||t)&&n.next(),r=n.current();r;r=n.next())if(3==r.nodeType&&!A(r))return o=U.create("a",{"data-mce-bogus":"all"},G),r.parentNode.insertBefore(o,r),e.setStart(r,0),z.setRng(e),void U.remove(o)}var s,F,t,H,r={},U=b.dom,z=b.selection,V=new e(U),j=b.schema.isValidChild,W=U.isBlock,d=b.settings.forced_root_block,q=U.nodeIndex,G="\ufeff",f=/^(src|href|style)$/,X=!1,Y=!0,K=U.getContentEditable,J=i.isBookmarkNode,Z=re.each,Q=re.grep,ee=re.walk;(0,re.extend)(this,{get:w,register:n,unregister:function(e){return e&&r[e]&&delete r[e],r},apply:C,remove:v,toggle:function(e,t,n){var r=w(e);!y(e,t,n)||"toggle"in r[0]&&!r[0].toggle?C(e,t,n):v(e,t,n)},match:y,matchAll:function(r,i){var e,o=[],a={};return e=z.getStart(),U.getParent(e,function(e){var t,n;for(t=0;t<r.length;t++)n=r[t],!a[n]&&E(e,n,i)&&(a[n]=!0,o.push(n))},U.getRoot()),o},matchNode:E,canApply:function(e){var t,n,r,i,o=w(e);if(o)for(t=g(z.getStart()),r=o.length-1;0<=r;r--){if(!(i=o[r].selector)||o[r].defaultBlock)return Y;for(n=t.length-1;0<=n;n--)if(U.is(t[n],i))return Y}return X},formatChanged:function(e,t,n){var o;return s||(s={},o={},b.on("NodeChange",function(n){var r=g(n.element),i={};r=re.grep(r,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),Z(s,function(e,n){Z(r,function(t){return E(t,n,{},e.similar)?(o[n]||(Z(e,function(e){e(!0,{node:t,format:n,parents:r})}),o[n]=e),i[n]=e,!1):!a(t,n)&&void 0})}),Z(o,function(e,t){i[t]||(delete o[t],Z(e,function(e){e(!1,{node:n.element,format:t,parents:r})}))})})),Z(e.split(","),function(e){s[e]||(s[e]=[],s[e].similar=n),s[e].push(t)}),this},getCssText:function(e){return o.getCssText(b,e)}}),n({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(n,e,t){Z(t,function(e,t){U.setAttrib(n,t,e)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),Z("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){n(e,{block:e,remove:"all"})}),n(b.settings.formats),function(){b.addShortcut("meta+b","bold_desc","Bold"),b.addShortcut("meta+i","italic_desc","Italic"),b.addShortcut("meta+u","underline_desc","Underline");for(var e=1;e<=6;e++)b.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);b.addShortcut("access+7","",["FormatBlock",!1,"p"]),b.addShortcut("access+8","",["FormatBlock",!1,"div"]),b.addShortcut("access+9","",["FormatBlock",!1,"address"])}(),b.on("BeforeGetContent",function(e){H&&"raw"!=e.format&&H()}),b.on("mouseup keydown",function(e){t&&t(e)})}}),e(X,[],function(){return{KEEP:0,DELETE:2,INSERT:1,diff:function(p,m){function g(e,t,n,r){for(var i=e;i-t<r&&i<n&&p[i]===m[i-t];)++i;return function(e,t,n){return{start:e,end:t,diag:n}}(e,i,t)}var e=p.length+m.length+2,v=new Array(e),y=new Array(e),u=function(e,t,n,r,i){var o=c(e,t,n,r);if(null===o||o.start===t&&o.diag===t-r||o.end===e&&o.diag===e-n)for(var a=e,s=n;a<t||s<r;)a<t&&s<r&&p[a]===m[s]?(i.push([0,p[a]]),++a,++s):r-n<t-e?(i.push([2,p[a]]),++a):(i.push([1,m[s]]),++s);else{u(e,o.start,n,o.start-o.diag,i);for(var l=o.start;l<o.end;++l)i.push([0,p[l]]);u(o.end,t,o.end-o.diag,r,i)}},c=function(e,t,n,r){var i=t-e,o=r-n;if(0==i||0==o)return null;var a=i-o,s=o+i,l=(s%2==0?s:1+s)/2;v[1+l]=e,y[1+l]=t+1;for(var u=0;u<=l;++u){for(var c=-u;c<=u;c+=2){var d=c+l;c===-u||c!=u&&v[d-1]<v[d+1]?v[d]=v[d+1]:v[d]=v[d-1]+1;for(var f=v[d],h=f-e+n-c;f<t&&h<r&&p[f]===m[h];)v[d]=++f,++h;if(a%2!=0&&a-u<=c&&c<=a+u&&y[d-a]<=v[d])return g(y[d-a],c+e-n,t,r)}for(c=a-u;c<=a+u;c+=2){for(d=c+l-a,c===a-u||c!=a+u&&y[d+1]<=y[d-1]?y[d]=y[d+1]-1:y[d]=y[d-1],h=(f=y[d]-1)-e+n-c;e<=f&&n<=h&&p[f]===m[h];)y[d]=f--,h--;if(a%2==0&&-u<=c&&c<=u&&y[d]<=v[d+a])return g(y[d],c+e-n,t,r)}}},t=[];return u(0,p.length,0,m.length,t),t}}}),e(Y,[c,g,X],function(r,t,i){function o(e){return 1===e.nodeType?e.outerHTML:3===e.nodeType?t.encodeRaw(e.data,!1):8===e.nodeType?"\x3c!--"+e.data+"--\x3e":""}function a(e,t,n){var r=function(e){var t,n,r;for(r=document.createElement("div"),t=document.createDocumentFragment(),e&&(r.innerHTML=e);n=r.firstChild;)t.appendChild(n);return t}(t);if(e.hasChildNodes()&&n<e.childNodes.length){var i=e.childNodes[n];i.parentNode.insertBefore(r,i)}else e.appendChild(r)}return{read:function(e){return r.map(e.childNodes,o)},write:function(e,t){var n=r.map(t.childNodes,o);return function(e,t){var n=0;r.each(e,function(e){e[0]===i.KEEP?n++:e[0]===i.INSERT?(a(t,e[1],n),n++):e[0]===i.DELETE&&function(e,t){if(e.hasChildNodes()&&t<e.childNodes.length){var n=e.childNodes[t];n.parentNode.removeChild(n)}}(t,n)})}(i.diff(n,e),t),t}}}),e(K,[c,Y],function(i,o){function a(e){return{type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}}function s(e){return{type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}}function n(e){return"fragmented"===e.type?e.fragments.join(""):e.content}return{createFragmentedLevel:a,createCompleteLevel:s,createFromEditor:function(t){var e,n,r;return e=o.read(t.getBody()),function(e){return-1!==e.indexOf("</iframe>")}(n=(r=i.map(e,function(e){return t.serializer.trimContent(e)})).join(""))?a(r):s(n)},applyToEditor:function(e,t,n){"fragmented"===t.type?o.write(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(n?t.beforeBookmark:t.bookmark)},isEq:function(e,t){return n(e)===n(t)}}}),e(J,[M,d,K],function(e,h,p){return function(s){function l(e){s.setDirty(e)}function r(e){o.typing=!1,o.add({},e)}function n(){o.typing&&(o.typing=!1,o.add())}var u,i,o=this,c=0,d=[],f=0;return s.on("init",function(){o.add()}),s.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&(n(),o.beforeChange())}),s.on("ExecCommand",function(e){var t=e.command;"Undo"!==t&&"Redo"!==t&&"mceRepaint"!==t&&r(e)}),s.on("ObjectResizeStart Cut",function(){o.beforeChange()}),s.on("SaveContent ObjectResized blur",r),s.on("DragEnd",r),s.on("KeyUp",function(e){var t=e.keyCode;e.isDefaultPrevented()||((33<=t&&t<=36||37<=t&&t<=40||45===t||e.ctrlKey)&&(r(),s.nodeChanged()),46!==t&&8!==t||s.nodeChanged(),i&&o.typing&&(s.isDirty()||(l(d[0]&&!p.isEq(p.createFromEditor(s),d[0])),s.isDirty()&&s.fire("change",{level:d[0],lastLevel:null})),s.fire("TypingUndo"),i=!1,s.nodeChanged()))}),s.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(33<=t&&t<=36||37<=t&&t<=40||45===t)return void(o.typing&&r(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(t<16||20<t)||224===t||91===t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),i=!0)}}),s.on("MouseDown",function(e){o.typing&&r(e)}),s.addShortcut("meta+z","","Undo"),s.addShortcut("meta+y,meta+shift+z","","Redo"),s.on("AddUndo Undo Redo ClearUndos",function(e){e.isDefaultPrevented()||s.nodeChanged()}),o={data:d,typing:!1,beforeChange:function(){f||(u=s.selection.getBookmark(2,!0))},add:function(e,t){var n,r,i,o=s.settings;if(i=p.createFromEditor(s),e=e||{},e=h.extend(e,i),f||s.removed)return null;if(r=d[c],s.fire("BeforeAddUndo",{level:e,lastLevel:r,originalEvent:t}).isDefaultPrevented())return null;if(r&&p.isEq(r,e))return null;if(d[c]&&(d[c].beforeBookmark=u),o.custom_undo_redo_levels&&d.length>o.custom_undo_redo_levels){for(n=0;n<d.length-1;n++)d[n]=d[n+1];d.length--,c=d.length}e.bookmark=s.selection.getBookmark(2,!0),c<d.length-1&&(d.length=c+1),d.push(e),c=d.length-1;var a={level:e,lastLevel:r,originalEvent:t};return s.fire("AddUndo",a),0<c&&(l(!0),s.fire("change",a)),e},undo:function(){var e;return o.typing&&(o.add(),o.typing=!1),0<c&&(e=d[--c],p.applyToEditor(s,e,!0),l(!0),s.fire("undo",{level:e})),e},redo:function(){var e;return c<d.length-1&&(e=d[++c],p.applyToEditor(s,e,!1),l(!0),s.fire("redo",{level:e})),e},clear:function(){d=[],c=0,o.typing=!1,o.data=d,s.fire("ClearUndos")},hasUndo:function(){return 0<c||o.typing&&d[0]&&!p.isEq(p.createFromEditor(s),d[0])},hasRedo:function(){return c<d.length-1&&!o.typing},transact:function(e){n(),o.beforeChange();try{f++,e()}finally{f--}return o.add()},extra:function(e,t){var n,r;o.transact(e)&&(r=d[c].bookmark,n=d[c-1],p.applyToEditor(s,n,!0),o.transact(t)&&(d[c-1].beforeBookmark=r))}}}}),e(Z,[p,E,C,i],function(O,P,L,I){var F=I.ie&&I.ie<11;return function(k){var N=k.dom,T=k.selection,A=k.settings,R=k.undoManager,B=k.schema,D=B.getNonEmptyElements(),M=B.getMoveCaretBeforeOnEnterElements();k.on("keydown",function(e){13==e.keyCode&&!1!==function(e){function u(e){return e&&N.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==N.getContentEditable(e)}function r(e){var t;N.isBlock(e)&&(t=T.getRng(),e.appendChild(N.create("span",null," ")),T.select(e),e.lastChild.outerHTML="",T.setRng(t))}function i(e){var t,n,r,i,o=e;if(e){if(I.ie&&I.ie<9&&m&&m.firstChild&&m.firstChild==m.lastChild&&"BR"==m.firstChild.tagName&&N.remove(m.firstChild),/^(LI|DT|DD)$/.test(e.nodeName)){var a=function(e){for(;e;){if(1==e.nodeType||3==e.nodeType&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}}(e.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&e.insertBefore(N.doc.createTextNode(" "),e.firstChild)}if(r=N.createRng(),I.ie||e.normalize(),e.hasChildNodes()){for(t=new O(e,e);n=t.current();){if(3==n.nodeType){r.setStart(n,0),r.setEnd(n,0);break}if(M[n.nodeName.toLowerCase()]){r.setStartBefore(n),r.setEndBefore(n);break}o=n,n=t.next()}n||(r.setStart(o,0),r.setEnd(o,0))}else"BR"==e.nodeName?e.nextSibling&&N.isBlock(e.nextSibling)?((!g||g<9)&&(i=N.create("br"),e.parentNode.insertBefore(i,e)),r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)):(r.setStart(e,0),r.setEnd(e,0));T.setRng(r),N.remove(i),T.scrollIntoView(e)}}function c(e){var t=A.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&N.setAttribs(e,A.forced_root_block_attrs)}function t(e){e.innerHTML=F?"":'<br data-mce-bogus="1">'}function o(e){var t,n,r,i=h,o=B.getTextInlineElements();if(e||"TABLE"==$?c(t=N.create(e||C)):t=m.cloneNode(!1),r=t,!1!==A.keep_styles)do{if(o[i.nodeName]){if("_mce_caret"==i.id)continue;n=i.cloneNode(!1),N.setAttrib(n,"id",""),t.hasChildNodes()?n.appendChild(t.firstChild):r=n,t.appendChild(n)}}while((i=i.parentNode)&&i!=f);return F||(r.innerHTML='<br data-mce-bogus="1">'),t}function n(e){var t,n,r;if(3==h.nodeType&&(e?0<p:p<h.nodeValue.length))return!1;if(h.parentNode==m&&E&&!e)return!0;if(e&&1==h.nodeType&&h==m.firstChild)return!0;if("TABLE"===h.nodeName||h.previousSibling&&"TABLE"==h.previousSibling.nodeName)return E&&!e||!E&&e;for(t=new O(h,m),3==h.nodeType&&(e&&0===p?t.prev():e||p!=h.nodeValue.length||t.next());n=t.current();){if(1===n.nodeType){if(!n.getAttribute("data-mce-bogus")&&(r=n.nodeName.toLowerCase(),D[r]&&"br"!==r))return!1}else if(3===n.nodeType&&!/^[ \t\r\n]*$/.test(n.nodeValue))return!1;e?t.prev():t.next()}return!0}function a(){k.execCommand("InsertLineBreak",!1,e)}function s(){y=/^(H[1-6]|PRE|FIGURE)$/.test($)&&"HGROUP"!=w?o(C):o(),A.end_container_on_empty_block&&u(x)&&N.isEmpty(m)?y=N.split(x,m):N.insertAfter(y,m),i(y)}var d,l,f,h,p,m,g,v,y,b,x,$,w,C,E,S,_;if(d=T.getRng(!0),!e.isDefaultPrevented()){if(!d.collapsed)return void k.execCommand("Delete");if(new P(N).normalize(d),h=d.startContainer,p=d.startOffset,C=(C=(A.force_p_newlines?"p":"")||A.forced_root_block)?C.toUpperCase():"",g=N.doc.documentMode,v=e.shiftKey,1==h.nodeType&&h.hasChildNodes()&&(E=p>h.childNodes.length-1,h=h.childNodes[Math.min(p,h.childNodes.length-1)]||h,p=E&&3==h.nodeType?h.nodeValue.length:0),f=function(e){var t,n,r=N.getRoot();for(t=e;t!==r&&"false"!==N.getContentEditable(t);)"true"===N.getContentEditable(t)&&(n=t),t=t.parentNode;return t!==r?n:r}(h)){if(R.beforeChange(),!N.isBlock(f)&&f!=N.getRoot())return void(C&&!v||a());if((C&&!v||!C&&v)&&(h=function(e,t){var n,r,i,o,a,s,l=C||"P";if(!(r=N.getParent(e,N.isBlock))||!u(r)){if(s=(r=r||f)==k.getBody()||function(e){return e&&/^(TD|TH|CAPTION)$/.test(e.nodeName)}(r)?r.nodeName.toLowerCase():r.parentNode.nodeName.toLowerCase(),!r.hasChildNodes())return c(n=N.create(l)),r.appendChild(n),d.setStart(n,0),d.setEnd(n,0),n;for(o=e;o.parentNode!=r;)o=o.parentNode;for(;o&&!N.isBlock(o);)o=(i=o).previousSibling;if(i&&B.isValidChild(s,l.toLowerCase())){for(c(n=N.create(l)),i.parentNode.insertBefore(n,i),o=i;o&&!N.isBlock(o);)a=o.nextSibling,n.appendChild(o),o=a;d.setStart(e,t),d.setEnd(e,t)}}return e}(h,p)),m=N.getParent(h,N.isBlock),x=m?N.getParent(m.parentNode,N.isBlock):null,$=m?m.nodeName.toUpperCase():"","LI"!=(w=x?x.nodeName.toUpperCase():"")||e.ctrlKey||(m=x,$=w),k.undoManager.typing&&(k.undoManager.typing=!1,k.undoManager.add()),/^(LI|DT|DD)$/.test($)){if(!C&&v)return void a();if(N.isEmpty(m))return void function(){function e(e){for(var t=x[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===m}function t(){var e=x.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:x}if(x!=k.getBody()){var n=x.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(C="LI"),y=C?o(C):N.create("BR"),e(!0)&&e()?"LI"==n?N.insertAfter(y,t()):N.replace(y,x):e(!0)?"LI"==n?(N.insertAfter(y,t()),y.appendChild(N.doc.createTextNode(" ")),y.appendChild(x)):x.parentNode.insertBefore(y,x):e()?(N.insertAfter(y,t()),r(y)):(x=t(),(l=d.cloneRange()).setStartAfter(m),l.setEndAfter(x),b=l.extractContents(),"LI"==C&&"LI"==b.firstChild.nodeName?(y=b.firstChild,N.insertAfter(b,x)):(N.insertAfter(b,x),N.insertAfter(y,x))),N.remove(m),i(y),R.add()}}()}if("PRE"==$&&!1!==A.br_in_pre){if(!v)return void a()}else if(!C&&!v&&"LI"!=$||C&&v)return void a();C&&m===k.getBody()||(C=C||"P",L.isCaretContainerBlock(m)?(y=L.showCaretContainerBlock(m),N.isEmpty(m)&&t(m),i(y)):n()?s():n(!0)?(r(y=m.parentNode.insertBefore(o(),m)),i(m)):((l=d.cloneRange()).setEndAfter(m),function(e){for(;3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;);}(b=l.extractContents()),y=b.firstChild,N.insertAfter(b,m),function(e){var t,n=e,r=[];if(n){for(;n=n.firstChild;){if(N.isBlock(n))return;1!=n.nodeType||D[n.nodeName.toLowerCase()]||r.push(n)}for(t=r.length;t--;)!(n=r[t]).hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?N.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&N.remove(n)}}(y),S=m,F||(S.normalize(),(_=S.lastChild)&&!/^(left|right)$/gi.test(N.getStyle(_,"float",!0))||N.add(S,"br")),N.isEmpty(m)&&t(m),y.normalize(),N.isEmpty(y)?(N.remove(y),s()):i(y)),N.setAttrib(y,"id",""),k.fire("NewBlock",{newBlock:y}),R.typing=!1,R.add())}}}(e)&&e.preventDefault()})}}),e(Q,[],function(){return function(p){var m=p.settings,g=p.dom,v=p.selection,y=p.schema,b=y.getBlockElements();m.forced_root_block&&p.on("NodeChange",function(){var e,t,n,r,i,o,a,s,l,u,c,d,f=v.getStart(),h=p.getBody();if(d=m.forced_root_block,f&&1===f.nodeType&&d){for(;f&&f!=h;){if(b[f.nodeName])return;f=f.parentNode}if((e=v.getRng()).setStart){t=e.startContainer,n=e.startOffset,r=e.endContainer,i=e.endOffset;try{l=p.getDoc().activeElement===h}catch(e){}}else e.item&&(f=e.item(0),(e=p.getDoc().body.createTextRange()).moveToElementText(f)),l=e.parentElement().ownerDocument===p.getDoc(),(u=e.duplicate()).collapse(!0),n=-1*u.move("character",-16777215),u.collapsed||((u=e.duplicate()).collapse(!1),i=-1*u.move("character",-16777215)-n);for(f=h.firstChild,c=h.nodeName.toLowerCase();f;)if((3===f.nodeType||1==f.nodeType&&!b[f.nodeName])&&y.isValidChild(c,d.toLowerCase())){if(3===f.nodeType&&0===f.nodeValue.length){f=(a=f).nextSibling,g.remove(a);continue}o||(o=g.create(d,p.settings.forced_root_block_attrs),f.parentNode.insertBefore(o,f),s=!0),f=(a=f).nextSibling,o.appendChild(a)}else o=null,f=f.nextSibling;if(s&&l){if(e.setStart)e.setStart(t,n),e.setEnd(r,i),v.setRng(e);else try{(e=p.getDoc().body.createTextRange()).moveToElementText(h),e.collapse(!0),e.moveStart("character",n),0<i&&e.moveEnd("character",i),e.select()}catch(e){}p.nodeChanged()}}})}}),e(ee,[P,p,$,H,C,L],function(e,a,u,t,c,n){function s(e){return 0<e}function l(e){return e<0}function d(e,t){for(var n;n=e(t);)if(!y(n))return n;return null}function r(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(p(e))return e;return t}function f(e,t){for(;e&&e!=t;){if(g(e))return e;e=e.parentNode}return null}function i(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function h(e,t,n){var r,i,o,a;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],v(r)&&(r=r[i]),m(r)){if(a=n,f(r,o=t)==f(a,o))return r;break}if($(r))break;n=n.parentNode}return null}function o(e,t){return m(function(e,t){var n,r;return t?(n=t.container(),r=t.offset(),x(n)?n.childNodes[r+e]:null):null}(e,t))}var p=u.isContentEditableTrue,m=u.isContentEditableFalse,g=u.matchStyleValues("display","block table table-cell table-caption"),v=c.isCaretContainer,y=c.isCaretContainerBlock,b=e.curry,x=u.isElement,$=n.isCaretCandidate,w=b(i,!0),C=b(i,!1);return{isForwards:s,isBackwards:l,findNode:function(e,t,n,r,i){var o=new a(e,r);if(l(t)){if((m(e)||y(e))&&n(e=d(o.prev,!0)))return e;for(;e=d(o.prev,i);)if(n(e))return e}if(s(t)){if((m(e)||y(e))&&n(e=d(o.next,!0)))return e;for(;e=d(o.next,i);)if(n(e))return e}return null},getEditingHost:r,getParentBlock:f,isInSameBlock:function(e,t,n){return f(e.container(),n)==f(t.container(),n)},isInSameEditingHost:function(e,t,n){return r(e.container(),n)==r(t.container(),n)},isBeforeContentEditableFalse:b(o,0),isAfterContentEditableFalse:b(o,-1),normalizeRange:function(e,t,n){var r,i,o,a,s=b(h,!0,t),l=b(h,!1,t);if(i=n.startContainer,o=n.startOffset,c.isCaretContainerBlock(i)){if(x(i)||(i=i.parentNode),"before"==(a=i.getAttribute("data-mce-caret"))&&(r=i.nextSibling,m(r)))return w(r);if("after"==a&&(r=i.previousSibling,m(r)))return C(r)}if(!n.collapsed)return n;if(u.isText(i)){if(v(i)){if(1===e){if(r=l(i))return w(r);if(r=s(i))return C(r)}if(-1===e){if(r=s(i))return C(r);if(r=l(i))return w(r)}return n}if(c.endsWithCaretContainer(i)&&o>=i.data.length-1)return 1===e&&(r=l(i))?w(r):n;if(c.startsWithCaretContainer(i)&&o<=1)return-1===e&&(r=s(i))?C(r):n;if(o===i.data.length)return(r=l(i))?w(r):n;if(0===o)return(r=s(i))?C(r):n}return n}}}),e(te,[$,L,H,ee,c,P],function(c,e,d,f,h,p){function m(e,t){return e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null}function g(e,t){if($(e)){if(C(t.previousSibling)&&!b(t.previousSibling))return d.before(t);if(b(t))return d(t,0)}if(w(e)){if(C(t.nextSibling)&&!b(t.nextSibling))return d.after(t);if(b(t))return d(t,t.data.length)}return w(e)?n(t)?d.before(t):d.after(t):d.before(t)}function v(e,t,n){var r,i,o,a,s,l,u;if(!x(n)||!t)return null;if(r=(u=t).container(),i=u.offset(),b(r)){if(w(e)&&0<i)return d(r,--i);if($(e)&&i<r.length)return d(r,++i);o=r}else{if(w(e)&&0<i&&(a=m(r,i-1),C(a)))return!E(a)&&(s=f.findNode(a,e,S,a))?b(s)?d(s,s.data.length):d.after(s):b(a)?d(a,a.data.length):d.before(a);if($(e)&&i<r.childNodes.length&&(a=m(r,i),C(a)))return function(e,t){var n;return!!c.isBr(e)&&(!!(n=v(1,d.after(e),t))&&!f.isInSameBlock(d.before(e),d.before(n),t))}(a,n)?v(e,d.after(a),n):!E(a)&&(s=f.findNode(a,e,S,a))?b(s)?d(s,0):d.before(s):b(a)?d(a,0):d.after(a);o=u.getNode()}return($(e)&&u.isAtEnd()||w(e)&&u.isAtStart())&&(o=f.findNode(o,e,p.constant(!0),n,!0),S(o))?g(e,o):(a=f.findNode(o,e,S,n),!(l=h.last(h.filter(function(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}(r,n),y)))||a&&l.contains(a)?a?g(e,a):null:u=$(e)?d.after(l):d.before(l))}var y=c.isContentEditableFalse,b=c.isText,x=c.isElement,n=c.isBr,$=f.isForwards,w=f.isBackwards,C=e.isCaretCandidate,E=e.isAtomic,S=e.isEditableCaretCandidate;return function(t){return{next:function(e){return v(1,e,t)},prev:function(e){return v(-1,e,t)}}}}),e(ne,[d,te,H],function(u,c,d){function f(e){return u.grep(e.childNodes,function(e){return"LI"===e.nodeName})}function h(e){return 0<e.length&&function(e){return!e.firstChild}(e[e.length-1])?e.slice(0,-1):e}function p(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null}function m(e,t){var n=d.after(e),r=new c(t).prev(n);return r?r.toRange():null}function g(t,e,n){var r=t.parentNode;return u.each(e,function(e){r.insertBefore(e,t)}),function(e,t){var n=d.before(e),r=new c(t).next(n);return r?r.toRange():null}(t,n)}return{isListFragment:function(e){var t=e.firstChild,n=e.lastChild;return t&&"meta"===t.name&&(t=t.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),!(!t||t!==n||"ul"!==t.name&&"ol"!==t.name)},insertAtCaret:function(e,i,o,t){function n(e){var t=d.fromRangeStart(o),n=new c(i.getRoot()),r=1===e?n.prev(t):n.next(t);return!r||p(i,r.getNode())!==a}var r=function(e,t,n){var r=t.serialize(n);return function(e){var t=e.firstChild,n=e.lastChild;return t&&"META"===t.nodeName&&t.parentNode.removeChild(t),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),e}(e.createFragment(r))}(i,e,t),a=p(i,o.startContainer),s=h(f(r.firstChild)),l=i.getRoot();return n(1)?g(a,s,l):n(2)?function(e,t,n,r){return r.insertAfter(t.reverse(),e),m(t[0],n)}(a,s,l,i):function(t,e,n,r){var i=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]}(t,r),o=t.parentNode;return o.insertBefore(i[0],t),u.each(e,function(e){o.insertBefore(e,t)}),o.insertBefore(i[1],t),o.removeChild(t),m(e[e.length-1],n)}(a,s,l,o)},isParentBlockLi:function(e,t){return!!p(e,t)},trimListItems:h,listItems:f}}),e(re,[i,d,R,te,H,j,$,ne],function(R,B,D,M,O,P,e,L){var I=e.matchNodeNames("td th");return{insertAtCaret:function(e,t){var n=function(e){var t;return"string"!=typeof e?(t=B.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:t}):{content:e,details:{}}}(t);!function(i,e,t){var n,r,o,a,s,l,u,c,d,f,h,p,m,g,v,y,b=i.schema.getTextInlineElements(),x=i.selection,$=i.dom;function w(e){return v[e]&&3==v[e].nodeType}/^ | $/.test(e)&&(m=e,g=x.getRng(!0),v=g.startContainer,y=g.startOffset,3==v.nodeType&&(0<y?m=m.replace(/^&nbsp;/," "):w("previousSibling")||(m=m.replace(/^ /,"&nbsp;")),y<v.length?m=m.replace(/&nbsp;(<br>|)$/," "):w("nextSibling")||(m=m.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e=m),n=i.parser,p=t.merge,r=new D({validate:i.settings.validate},i.schema),h='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>',l={content:e,format:"html",selection:!0},i.fire("BeforeSetContent",l),-1==(e=l.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,h);var C,E,S,_,k=(c=x.getRng()).startContainer||(c.parentElement?c.parentElement():null),N=i.getBody();k===N&&x.isCollapsed()&&$.isBlock(N.firstChild)&&((_=N.firstChild)&&!i.schema.getShortEndedElements()[_.nodeName])&&$.isEmpty(N.firstChild)&&((c=$.createRng()).setStart(N.firstChild,0),c.setEnd(N.firstChild,0),x.setRng(c)),x.isCollapsed()||(i.selection.setRng(i.selection.getRng()),i.getDoc().execCommand("Delete",!1,null),E=(C=x.getRng(!0)).startContainer,S=C.startOffset,3==E.nodeType&&C.collapsed&&(" "===E.data[S]?(E.deleteData(S,1),/[\u00a0| ]$/.test(e)||(e+=" ")):" "===E.data[S-1]&&(E.deleteData(S-1,1),/[\u00a0| ]$/.test(e)||(e=" "+e))));var T,A={context:(o=x.getNode()).nodeName.toLowerCase(),data:t.data};if(s=n.parse(e,A),!0===t.paste&&L.isListFragment(s)&&L.isParentBlockLi($,o))return c=L.insertAtCaret(r,$,i.selection.getRng(!0),s),i.selection.setRng(c),i.fire("SetContent",l);if(function(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}(s),"mce_marker"==(d=s.lastChild).attr("id"))for(d=(u=d).prev;d;d=d.walk(!0))if(3==d.type||!$.isBlock(d.name)){i.schema.isValidChild(d.parent.name,"span")&&d.parent.insert(u,d,"br"===d.name);break}if(i._selectionOverrides.showBlockCaretContainer(o),A.invalid){for(x.setContent(h),o=x.getNode(),a=i.getBody(),9==o.nodeType?o=d=a:d=o;d!==a;)d=(o=d).parentNode;e=o==a?a.innerHTML:$.getOuterHTML(o),e=r.serialize(n.parse(e.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return r.serialize(s)}))),o==a?$.setHTML(a,e):$.setOuterHTML(o,e)}else e=r.serialize(s),function(e,t,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(e.dom.createFragment(t),n);else{var r=n.firstChild,i=n.lastChild;!r||r===i&&"BR"===r.nodeName?e.dom.setHTML(n,t):e.selection.setContent(t)}}(i,e,o);(function(){if(p){var n=i.getBody(),r=new P($);B.each($.select("*[data-mce-fragment]"),function(e){for(var t=e.parentNode;t&&t!=n;t=t.parentNode)b[e.nodeName.toLowerCase()]&&r.compare(t,e)&&$.remove(e,!0)})}})(),function(e){var t,n,r;if(e){if(x.scrollIntoView(e),t=function(e){for(var t=i.getBody();e&&e!==t;e=e.parentNode)if("false"===i.dom.getContentEditable(e))return e;return null}(e))return $.remove(e),x.select(t);c=$.createRng(),(d=e.previousSibling)&&3==d.nodeType?(c.setStart(d,d.nodeValue.length),R.ie||(f=e.nextSibling)&&3==f.nodeType&&(d.appendData(f.data),f.parentNode.removeChild(f))):(c.setStartBefore(e),c.setEndBefore(e)),n=$.getParent(e,$.isBlock),$.remove(e),n&&$.isEmpty(n)&&(i.$(n).empty(),c.setStart(n,0),c.setEnd(n,0),I(n)||function(e){return!!e.getAttribute("data-mce-fragment")}(n)||!(r=function(e){var t=O.fromRangeStart(e);if(t=new M(i.getBody()).next(t))return t.toRange()}(c))?$.add(n,$.create("br",{"data-mce-bogus":"1"})):(c=r,$.remove(n))),x.setRng(c)}}($.get("mce_marker")),T=i.getBody(),B.each(T.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")}),i.fire("SetContent",l),i.addVisual()}(e,n.content,n.details)}}}),e(ie,[i,d,E,p,re,$],function(d,e,x,$,f,h){var p=e.each,m=e.extend,g=e.map,w=e.inArray,C=e.explode,E=d.ie&&d.ie<11;return function(v){function t(e){var t;if(!v.quirks.isHidden()){if(e=e.toLowerCase(),t=u.state[e])return t(e);try{return v.getDoc().queryCommandState(e)}catch(e){}return!1}}function e(e,n){n=n||"exec",p(e,function(t,e){p(e.toLowerCase().split(","),function(e){u[n][e]=t})})}function a(e,t,n){return t===ye&&(t=!1),n===ye&&(n=null),v.getDoc().execCommand(e,t,n)}function n(e){return l.match(e)}function o(e,t){l.toggle(e,t?{value:t}:ye),v.nodeChanged()}function i(e){r=b.getBookmark(e)}function s(){b.moveToBookmark(r)}var y,b,l,r,u={state:{},exec:{},value:{}},c=v.settings;v.on("PreInit",function(){y=v.dom,b=v.selection,c=v.settings,l=v.formatter}),m(this,{execCommand:function(t,n,r,e){var i,o,a=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||e&&e.skip_focus||v.focus(),(e=v.fire("BeforeExecCommand",{command:t,ui:n,value:r})).isDefaultPrevented())return!1;if(o=t.toLowerCase(),i=u.exec[o])return i(o,n,r),v.fire("ExecCommand",{command:t,ui:n,value:r}),!0;if(p(v.plugins,function(e){if(e.execCommand&&e.execCommand(t,n,r))return v.fire("ExecCommand",{command:t,ui:n,value:r}),!(a=!0)}),a)return a;if(v.theme&&v.theme.execCommand&&v.theme.execCommand(t,n,r))return v.fire("ExecCommand",{command:t,ui:n,value:r}),!0;try{a=v.getDoc().execCommand(t,n,r)}catch(e){}return!!a&&(v.fire("ExecCommand",{command:t,ui:n,value:r}),!0)},queryCommandState:t,queryCommandValue:function(e){var t;if(!v.quirks.isHidden()){if(e=e.toLowerCase(),t=u.value[e])return t(e);try{return v.getDoc().queryCommandValue(e)}catch(e){}}},queryCommandSupported:function(e){if(e=e.toLowerCase(),u.exec[e])return!0;try{return v.getDoc().queryCommandSupported(e)}catch(e){}return!1},addCommands:e,addCommand:function(e,i,o){e=e.toLowerCase(),u.exec[e]=function(e,t,n,r){return i.call(o||v,t,n,r)}},addQueryStateHandler:function(e,t,n){e=e.toLowerCase(),u.state[e]=function(){return t.call(n||v)}},addQueryValueHandler:function(e,t,n){e=e.toLowerCase(),u.value[e]=function(){return t.call(n||v)}},hasCustomCommand:function(e){return e=e.toLowerCase(),!!u.exec[e]}}),e({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){v.undoManager.add()},"Cut,Copy,Paste":function(e){var t,n=v.getDoc();try{a(e)}catch(e){t=!0}if("paste"!==e||n.queryCommandEnabled(e)||(t=!0),t||!n.queryCommandSupported(e)){var r=v.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");d.mac&&(r=r.replace(/Ctrl\+/g,"⌘+")),v.notificationManager.open({text:r,type:"error"})}},unlink:function(){if(b.isCollapsed()){var e=v.dom.getParent(v.selection.getStart(),"a");e&&v.dom.remove(e,!0)}else l.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),p("left,center,right,justify".split(","),function(e){t!=e&&l.remove("align"+e)}),"none"!=t&&o("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;a(e),(t=y.getParent(b.getNode(),"ol,ul"))&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(i(),y.split(n,t),s()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){o(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){o(e,n)},FontSize:function(e,t,n){var r,i;1<=n&&n<=7&&(i=C(c.font_size_style_values),n=(r=C(c.font_size_classes))?r[n-1]||n:i[n-1]||n),o(e,n)},RemoveFormat:function(e){l.remove(e)},mceBlockQuote:function(){o("blockquote")},FormatBlock:function(e,t,n){return o(n||"p")},mceCleanup:function(){var e=b.getBookmark();v.setContent(v.getContent({cleanup:!0}),{cleanup:!0}),b.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||b.getNode();r!=v.getBody()&&(i(),v.dom.remove(r,!0),s())},mceSelectNodeDepth:function(e,t,n){var r=0;y.getParent(b.getNode(),function(e){if(1==e.nodeType&&r++==n)return b.select(e),!1},v.getBody())},mceSelectNode:function(e,t,n){b.select(n)},mceInsertContent:function(e,t,n){f.insertAtCaret(v,n)},mceInsertRawHTML:function(e,t,n){b.setContent("tiny_mce_marker"),v.setContent(v.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){o(n)},mceSetContent:function(e,t,n){v.setContent(n)},"Indent,Outdent":function(n){var r,i,o;r=c.indentation,i=/[a-z%]+$/i.exec(r),r=parseInt(r,10),t("InsertUnorderedList")||t("InsertOrderedList")?a(n):(c.forced_root_block||y.getParent(b.getNode(),y.isBlock)||l.apply("div"),p(b.getSelectedBlocks(),function(e){if("false"!==y.getContentEditable(e)&&"LI"!==e.nodeName){var t=v.getParam("indent_use_margin",!1)?"margin":"padding";t="TABLE"===e.nodeName?"margin":t,t+="rtl"==y.getStyle(e,"direction",!0)?"Right":"Left","outdent"==n?(o=Math.max(0,parseInt(e.style[t]||0,10)-r),y.setStyle(e,t,o?o+i:"")):(o=parseInt(e.style[t]||0,10)+r+i,y.setStyle(e,t,o))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){v.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){v.hasVisual=!v.hasVisual,v.addVisual()},mceReplaceContent:function(e,t,n){v.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,b.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=y.getParent(b.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||l.remove("link"),n.href&&l.apply("link",n,r)},selectAll:function(){var e,t=y.getRoot();if(b.getRng().setStart){var n=y.getParent(b.getStart(),h.isContentEditableTrue);n&&((e=y.createRng()).selectNodeContents(n),b.setRng(e))}else(e=b.getRng()).item||(e.moveToElementText(t),e.select())},delete:function(){a("Delete");var e=v.getBody();y.isEmpty(e)&&(v.setContent(""),e.firstChild&&y.isBlock(e.firstChild)?v.selection.setCursorLocation(e.firstChild,0):v.selection.setCursorLocation(e,0))},mceNewDocument:function(){v.setContent("")},InsertLineBreak:function(e,t,n){var r,i,o,a=n,s=b.getRng(!0);new x(y).normalize(s);var l=s.startOffset,u=s.startContainer;if(1==u.nodeType&&u.hasChildNodes()){var c=l>u.childNodes.length-1;u=u.childNodes[Math.min(l,u.childNodes.length-1)]||u,l=c&&3==u.nodeType?u.nodeValue.length:0}var d=y.getParent(u,y.isBlock),f=d?d.nodeName.toUpperCase():"",h=d?y.getParent(d.parentNode,y.isBlock):null,p=h?h.nodeName.toUpperCase():"",m=a&&a.ctrlKey;"LI"!=p||m||(d=h,f=p),u&&3==u.nodeType&&l>=u.nodeValue.length&&(E||function(){for(var e,t=new $(u,d),n=v.schema.getNonEmptyElements();e=t.next();)if(n[e.nodeName.toLowerCase()]||0<e.length)return!0}()||(r=y.create("br"),s.insertNode(r),s.setStartAfter(r),s.setEndAfter(r),i=!0)),r=y.create("br"),s.insertNode(r);var g=y.doc.documentMode;return E&&"PRE"==f&&(!g||g<8)&&r.parentNode.insertBefore(y.doc.createTextNode("\r"),r),o=y.create("span",{},"&nbsp;"),r.parentNode.insertBefore(o,r),b.scrollIntoView(o),y.remove(o),i?(s.setStartBefore(r),s.setEndBefore(r)):(s.setStartAfter(r),s.setEndAfter(r)),b.setRng(s),v.undoManager.add(),!0}}),e({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=b.isCollapsed()?[y.getParent(b.getNode(),y.isBlock)]:b.getSelectedBlocks(),r=g(n,function(e){return!!l.matchNode(e,t)});return-1!==w(r,!0)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return n(e)},mceBlockQuote:function(){return n("blockquote")},Outdent:function(){var e;if(c.inline_styles){if((e=y.getParent(b.getStart(),y.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0;if((e=y.getParent(b.getEnd(),y.isBlock))&&0<parseInt(e.style.paddingLeft,10))return!0}return t("InsertUnorderedList")||t("InsertOrderedList")||!c.inline_styles&&!!y.getParent(b.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=y.getParent(b.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),e({"FontSize,FontName":function(e){var t,n=0;return(t=y.getParent(b.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),e({Undo:function(){v.undoManager.undo()},Redo:function(){v.undoManager.redo()}})}}),e(oe,[d],function(e){function a(r,e){var t,n,i=this;if(r=l(r),t=(e=i.settings=e||{}).base_uri,/^([\w\-]+):([^\/]{2})/i.test(r)||/^\s*#/.test(r))i.source=r;else{var o=0===r.indexOf("//");0!==r.indexOf("/")||o||(r=(t&&t.protocol||"http")+"://mce_host"+r),/^[\w\-]*:?\/\//.test(r)||(n=e.base_uri?e.base_uri.path:new a(location.href).directory,r=""===e.base_uri.protocol?"//mce_host"+i.toAbsPath(n,r):(r=/([^#?]*)([#?]?.*)/.exec(r),(t&&t.protocol||"http")+"://mce_host"+i.toAbsPath(n,r[1])+r[2])),r=r.replace(/@@/g,"(mce_at)"),r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(r),s(u,function(e,t){var n=r[t];n=n&&n.replace(/\(mce_at\)/g,"@@"),i[e]=n}),t&&(i.protocol||(i.protocol=t.protocol),i.userInfo||(i.userInfo=t.userInfo),i.port||"mce_host"!==i.host||(i.port=t.port),i.host&&"mce_host"!==i.host||(i.host=t.host),i.source=""),o&&(i.protocol="")}}var s=e.each,l=e.trim,u="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),n={ftp:21,http:80,https:443,mailto:25};return a.prototype={setPath:function(e){e=/^(.*?)\/?(\w+)?$/.exec(e),this.path=e[0],this.directory=e[1],this.file=e[2],this.source="",this.getURI()},toRelative:function(e){var t;if("./"===e)return e;if("mce_host"!=(e=new a(e,{base_uri:this})).host&&this.host!=e.host&&e.host||this.port!=e.port||this.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var n=this.getURI(),r=e.getURI();return n==r||"/"==n.charAt(n.length-1)&&n.substr(0,n.length-1)==r?n:(t=this.toRelPath(this.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return(e=new a(e,{base_uri:this})).getURI(t&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=n[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r,i,o=0,a="";if(e=(e=e.substring(0,e.lastIndexOf("/"))).split("/"),n=t.split("/"),e.length>=n.length)for(r=0,i=e.length;r<i;r++)if(r>=n.length||e[r]!=n[r]){o=r+1;break}if(e.length<n.length)for(r=0,i=n.length;r<i;r++)if(r>=e.length||e[r]!=n[r]){o=r+1;break}if(1===o)return t;for(r=0,i=e.length-(o-1);r<i;r++)a+="../";for(r=o-1,i=n.length;r<i;r++)a+=r!=o-1?"/"+n[r]:n[r];return a},toAbsPath:function(e,t){var n,r,i,o=0,a=[];for(r=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),s(e,function(e){e&&a.push(e)}),e=a,n=t.length-1,a=[];0<=n;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?0<o?o--:a.push(t[n]):o++);return 0!==(i=(n=e.length-o)<=0?a.reverse().join("/"):e.slice(0,n).join("/")+"/"+a.reverse().join("/")).indexOf("/")&&(i="/"+i),r&&i.lastIndexOf("/")!==i.length-1&&(i+=r),i},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},a.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}},a.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},a}),e(ae,[d],function(e){function t(){}var l,u,c=e.each,d=e.extend;return t.extend=l=function(n){function r(){var e,t,n;if(!u&&(this.init&&this.init.apply(this,arguments),t=this.Mixins))for(e=t.length;e--;)(n=t[e]).init&&n.init.apply(this,arguments)}function t(){return this}function e(n,r){return function(){var e,t=this._super;return this._super=s[n],e=r.apply(this,arguments),this._super=t,e}}var i,o,a,s=this.prototype;for(o in u=!0,i=new this,u=!1,n.Mixins&&(c(n.Mixins,function(e){for(var t in e)"init"!==t&&(n[t]=e[t])}),s.Mixins&&(n.Mixins=s.Mixins.concat(n.Mixins))),n.Methods&&c(n.Methods.split(","),function(e){n[e]=t}),n.Properties&&c(n.Properties.split(","),function(e){var t="_"+e;n[e]=function(e){return void 0!==e?(this[t]=e,this):this[t]}}),n.Statics&&c(n.Statics,function(e,t){r[t]=e}),n.Defaults&&s.Defaults&&(n.Defaults=d({},s.Defaults,n.Defaults)),n)"function"==typeof(a=n[o])&&s[o]?i[o]=e(o,a):i[o]=a;return r.prototype=i,(r.constructor=r).extend=l,r},t}),e(se,[d],function(p){function e(a){function s(){return!1}function l(){return!0}function r(e,t,n,r){var i,o,a;if(!1===t&&(t=s),t)for(t={func:t},r&&p.extend(t,r),a=(o=e.toLowerCase().split(" ")).length;a--;)e=o[a],(i=h[e])||(i=h[e]=[],d(e,!0)),n?i.unshift(t):i.push(t);return f}function u(e,t){var n,r,i,o,a;if(e)for(n=(o=e.toLowerCase().split(" ")).length;n--;){if(e=o[n],r=h[e],!e){for(i in h)d(i,!1),delete h[i];return f}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),h[e]=r);else r.length=0;r.length||(d(e,!1),delete h[e])}}else{for(e in h)d(e,!1);h={}}return f}var c,d,f=this,h={};c=(a=a||{}).scope||f,d=a.toggleEvent||s,f.fire=function(e,t){var n,r,i,o;if(e=e.toLowerCase(),(t=t||{}).type=e,t.target||(t.target=c),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=l},t.stopPropagation=function(){t.isPropagationStopped=l},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=l},t.isDefaultPrevented=s,t.isPropagationStopped=s,t.isImmediatePropagationStopped=s),a.beforeFire&&a.beforeFire(t),n=h[e])for(r=0,i=n.length;r<i;r++){if((o=n[r]).once&&u(e,o.func),t.isImmediatePropagationStopped())return t.stopPropagation(),t;if(!1===o.func.call(c,t))return t.preventDefault(),t}return t},f.on=r,f.off=u,f.once=function(e,t,n){return r(e,t,n,{once:!0})},f.has=function(e){return e=e.toLowerCase(),!(!h[e]||0===h[e].length)}}var t=p.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return e.isNative=function(e){return!!t[e.toLowerCase()]},e}),e(le,[],function(){function e(e){this.create=e.create}return e.create=function(i,o){return new e({create:function(t,n){function e(e){t.set(n,e.value)}var r;return t.on("change:"+n,function(e){i.set(o,e.value)}),i.on("change:"+o,e),(r=t._bindings)||(r=t._bindings=[],t.on("destroy",function(){for(var e=r.length;e--;)r[e]()})),r.push(function(){i.off("change:"+o,e)}),i.get(o)}})},e}),e(ue,[se],function(r){function i(n){return n._eventDispatcher||(n._eventDispatcher=new r({scope:n,toggleEvent:function(e,t){r.isNative(e)&&n.toggleNativeEvent&&n.toggleNativeEvent(e,t)}})),n._eventDispatcher}return{fire:function(e,t,n){if(this.removed&&"remove"!==e)return t;if(t=i(this).fire(e,t,n),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},on:function(e,t,n){return i(this).on(e,t,n)},off:function(e,t){return i(this).off(e,t)},once:function(e,t){return i(this).once(e,t)},hasEventListeners:function(e){return i(this).has(e)}}}),e(ce,[le,ue,ae,d],function(o,e,t,a){function s(e){return 0<e.nodeType}return t.extend({Mixins:[e],init:function(e){var t,n;for(t in e=e||{})(n=e[t])instanceof o&&(e[t]=n.create(this,t));this.data=e},set:function(e,t){var n,r,i=this.data[e];if(t instanceof o&&(t=t.create(this,e)),"object"!=typeof e)return function e(t,n){var r,i;if(t===n)return!0;if(null===t||null===n)return t===n;if("object"!=typeof t||"object"!=typeof n)return t===n;if(a.isArray(n)){if(t.length!==n.length)return!1;for(r=t.length;r--;)if(!e(t[r],n[r]))return!1}if(s(t)||s(n))return t===n;for(r in i={},n){if(!e(t[r],n[r]))return!1;i[r]=!0}for(r in t)if(!i[r]&&!e(t[r],n[r]))return!1;return!0}(i,t)||(this.data[e]=t,r={target:this,name:e,value:t,oldValue:i},this.fire("change:"+e,r),this.fire("change",r)),this;for(n in e)this.set(n,e[n]);return this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(e){return o.create(this,e)},destroy:function(){this.fire("destroy")}})}),e(de,[ae],function(e){var i,l=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,u=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,c=/^\s*|\s*$/g,o=e.extend({init:function(e){function a(e,t,n){function r(e){e&&t.push(e)}var i;return r(function(t){if(t)return t=t.toLowerCase(),function(e){return"*"===t||e.type===t}}((i=l.exec(e.replace(c,"")))[1])),r(function(t){if(t)return function(e){return e._name===t}}(i[2])),r(function(n){if(n)return n=n.split("."),function(e){for(var t=n.length;t--;)if(!e.classes.contains(n[t]))return!1;return!0}}(i[3])),r(function(n,r,i){if(n)return function(e){var t=e[n]?e[n]():"";return r?"="===r?t===i:"*="===r?0<=t.indexOf(i):"~="===r?0<=(" "+t+" ").indexOf(" "+i+" "):"!="===r?t!=i:"^="===r?0===t.indexOf(i):"$="===r&&t.substr(t.length-i.length)===i:!!i}}(i[4],i[5],i[6])),r(function(r){var t;if(r)return(r=/(?:not\((.+)\))|(.+)/i.exec(r))[1]?(t=s(r[1],[]),function(e){return!o(e,t)}):(r=r[2],function(e,t,n){return"first"===r?0===t:"last"===r?t===n-1:"even"===r?t%2==0:"odd"===r?t%2==1:!!e[r]&&e[r]()})}(i[7])),t.pseudo=!!i[7],t.direct=n,t}function s(e,t){var n,r,i,o=[];do{if(u.exec(""),(r=u.exec(e))&&(e=r[3],o.push(r[1]),r[2])){n=r[3];break}}while(r);for(n&&s(n,t),e=[],i=0;i<o.length;i++)">"!=o[i]&&e.push(a(o[i],[],">"===o[i-1]));return t.push(e),t}var o=this.match;this._selectors=s(e,[])},match:function(e,t){var n,r,i,o,a,s,l,u,c,d,f,h,p;for(n=0,r=(t=t||this._selectors).length;n<r;n++){for(p=e,h=0,i=(o=(a=t[n]).length)-1;0<=i;i--)for(u=a[i];p;){if(u.pseudo)for(c=d=(f=p.parent().items()).length;c--&&f[c]!==p;);for(s=0,l=u.length;s<l;s++)if(!u[s](p,c,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function u(e,t,n){var r,i,o,a,s,l=t[n];for(r=0,i=e.length;r<i;r++){for(s=e[r],o=0,a=l.length;o<a;o++)if(!l[o](s,r,i)){o=a+1;break}if(o===a)n==t.length-1?c.push(s):s.items&&u(s.items(),t,n+1);else if(l.direct)return;s.items&&u(s.items(),t,n)}}var t,n,c=[],r=this._selectors;if(e.items){for(t=0,n=r.length;t<n;t++)u(e.items(),r[t],0);1<n&&(c=function(e){for(var t,n=[],r=e.length;r--;)(t=e[r]).__checked||(n.push(t),t.__checked=1);for(r=n.length;r--;)delete n[r].__checked;return n}(c))}return new(i=i||o.Collection)(c)}});return o}),e(fe,[d,de,ae],function(r,a,e){var s,i,t=Array.prototype.push,n=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(e){return r.isArray(e)?t.apply(this,e):e instanceof s?this.add(e.toArray()):t.call(this,e),this},set:function(e){var t,n=this.length;for(this.length=0,this.add(e),t=this.length;t<n;t++)delete this[t];return this},filter:function(t){var e,n,r,i,o=[];for(i="string"==typeof t?(t=new a(t),function(e){return t.match(e)}):t,e=0,n=this.length;e<n;e++)i(r=this[e])&&o.push(r);return new s(o)},slice:function(){return new s(n.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(e){return r.each(this,e),this},toArray:function(){return r.toArray(this)},indexOf:function(e){for(var t=this.length;t--&&this[t]!==e;);return t},reverse:function(){return new s(r.toArray(this).reverse())},hasClass:function(e){return!!this[0]&&this[0].classes.contains(e)},prop:function(t,n){var e;return void 0!==n?(this.each(function(e){e[t]&&e[t](n)}),this):(e=this[0])&&e[t]?e[t]():void 0},exec:function(t){var n=r.toArray(arguments).slice(1);return this.each(function(e){e[t]&&e[t].apply(e,n)}),this},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(t){return this.each(function(e){e.classes.add(t)})},removeClass:function(t){return this.each(function(e){e.classes.remove(t)})}},r.each("fire on off show hide append prepend before after reflow".split(" "),function(n){i[n]=function(){var t=r.toArray(arguments);return this.each(function(e){n in e&&e[n].apply(e,t)}),this}}),r.each("text name disabled active selected checked visible parent value data".split(" "),function(t){i[t]=function(e){return this.prop(t,e)}}),s=e.extend(i),a.Collection=s}),e(he,[i,d,y],function(e,i,o){var t=0,n={id:function(){return"mceu_"+t++},create:function(e,t,n){var r=document.createElement(e);return o.DOM.setAttribs(r,t),"string"==typeof n?r.innerHTML=n:i.each(n,function(e){e.nodeType&&r.appendChild(e)}),r},createFragment:function(e){return o.DOM.createFragment(e)},getWindowSize:function(){return o.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,t){return o.DOM.getPos(e,t||n.getContainer())},getContainer:function(){return e.container?e.container:document.body},getViewPort:function(e){return o.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,t){return o.DOM.addClass(e,t)},removeClass:function(e,t){return o.DOM.removeClass(e,t)},hasClass:function(e,t){return o.DOM.hasClass(e,t)},toggleClass:function(e,t,n){return o.DOM.toggleClass(e,t,n)},css:function(e,t,n){return o.DOM.setStyle(e,t,n)},getRuntimeStyle:function(e,t){return o.DOM.getStyle(e,t,!0)},on:function(e,t,n,r){return o.DOM.bind(e,t,n,r)},off:function(e,t,n){return o.DOM.unbind(e,t,n)},fire:function(e,t,n){return o.DOM.fire(e,t,n)},innerHtml:function(e,t){o.DOM.setHTML(e,t)}};return n}),e(pe,[],function(){return{parseBox:function(e){var t;if(e)return"number"==typeof e?{top:e=e||0,left:e,bottom:e,right:e}:(1===(t=(e=e.split(" ")).length)?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],10)||0,right:parseInt(e[1],10)||0,bottom:parseInt(e[2],10)||0,left:parseInt(e[3],10)||0})},measureBox:function(n,e){function t(e){var t=parseFloat(function(e){var t=document.defaultView;return t?(e=e.replace(/[A-Z]/g,function(e){return"-"+e}),t.getComputedStyle(n,null).getPropertyValue(e)):n.currentStyle[e]}(e),10);return isNaN(t)?0:t}return{top:t(e+"TopWidth"),right:t(e+"RightWidth"),bottom:t(e+"BottomWidth"),left:t(e+"LeftWidth")}}}}),e(me,[d],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t<this.cls.length&&this.cls[t]!==e;t++);this.cls.splice(t,1),delete this.cls._map[e],this._change()}return this},toggle:function(e,t){var n=this.contains(e);return n!==t&&(n?this.remove(e):this.add(e),this._change()),this},contains:function(e){return!!this.cls._map[e]},_change:function(){delete this.clsValue,this.onchange.call(this)}}),n.prototype.toString=function(){var e;if(this.clsValue)return this.clsValue;e="";for(var t=0;t<this.cls.length;t++)0<t&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),e(ge,[r],function(n){var r,i={};return{add:function(e){var t=e.parent();if(t){if(!t._layout||t._layout.isNative())return;i[t._id]||(i[t._id]=t),r||(r=!0,n.requestAnimationFrame(function(){var e,t;for(e in r=!1,i)(t=i[e]).state.get("rendered")&&t.reflow();i={}},document.body))}},remove:function(e){i[e._id]&&delete i[e._id]}}}),e(ve,[ae,d,se,ce,fe,he,f,pe,me,ge],function(e,o,r,a,i,v,f,y,s,u){function l(n){return n._eventDispatcher||(n._eventDispatcher=new r({scope:n,toggleEvent:function(e,t){t&&r.isNative(e)&&(n._nativeEvents||(n._nativeEvents={}),n._nativeEvents[e]=!0,n.state.get("rendered")&&c(n))}})),n._eventDispatcher}function c(s){function e(e){var t=s.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=l._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),l._lastHoverCtrl=null)}function n(e){var t,n,r,i=s.getParentCtrl(e.target),o=l._lastHoverCtrl,a=0;if(i!==o){if((n=(l._lastHoverCtrl=i).parents().toArray().reverse()).push(i),o){for((r=o.parents().toArray().reverse()).push(o),a=0;a<r.length&&n[a]===r[a];a++);for(t=r.length-1;a<=t;t--)(o=r[t]).fire("mouseleave",{target:o.getEl()})}for(t=a;t<n.length;t++)(i=n[t]).fire("mouseenter",{target:i.getEl()})}}function r(e){e.preventDefault(),"mousewheel"==e.type?(e.deltaY=-.025*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-.025*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=s.fire("wheel",e)}var i,o,a,l,u,c;if(u=s._nativeEvents){for((a=s.parents().toArray()).unshift(s),i=0,o=a.length;!l&&i<o;i++)l=a[i]._eventsRoot;for(l=l||(a[a.length-1]||s),s._eventsRoot=l,o=i,i=0;i<o;i++)a[i]._eventsRoot=l;var d=l._delegates;for(c in d=d||(l._delegates={}),u){if(!u)return!1;"wheel"!==c||p?("mouseenter"===c||"mouseleave"===c?l._hasMouseEnter||(f(l.getEl()).on("mouseleave",t).on("mouseover",n),l._hasMouseEnter=1):d[c]||(f(l.getEl()).on(c,e),d[c]=!0),u[c]=!1):h?f(s.getEl()).on("mousewheel",r):f(s.getEl()).on("DOMMouseScroll",r)}}}var d,h="onmousewheel"in document,p=!1,m=0,n={Statics:{classPrefix:"mce-"},isRtl:function(){return d.rtl},classPrefix:"mce-",init:function(t){function e(e){var t;for(e=e.split(" "),t=0;t<e.length;t++)i.classes.add(e[t])}var n,r,i=this;i.settings=t=o.extend({},i.Defaults,t),i._id=t.id||"mceu_"+m++,i._aria={role:t.role},i._elmCache={},i.$=f,i.state=new a({visible:!0,active:!1,disabled:!1,value:""}),i.data=new a(t.data),i.classes=new s(function(){i.state.get("rendered")&&(i.getEl().className=this.toString())}),i.classes.prefix=i.classPrefix,(n=t.classes)&&(!i.Defaults||(r=i.Defaults.classes)&&n!=r&&e(r),e(n)),o.each("title text name visible disabled active value".split(" "),function(e){e in t&&i[e](t[e])}),i.on("click",function(){if(i.disabled())return!1}),i.settings=t,i.borderBox=y.parseBox(t.border),i.paddingBox=y.parseBox(t.padding),i.marginBox=y.parseBox(t.margin),t.hidden&&i.hide()},Properties:"parent,name",getContainerElm:function(){return v.getContainer()},getParentCtrl:function(e){for(var t,n=this.getRoot().controlIdLookup;e&&n&&!(t=n[e.id]);)e=e.parentNode;return t},initLayoutRect:function(){var e,t,n,r,i,o,a,s,l,u,c=this,d=c.settings,f=c.getEl();e=c.borderBox=c.borderBox||y.measureBox(f,"border"),c.paddingBox=c.paddingBox||y.measureBox(f,"padding"),c.marginBox=c.marginBox||y.measureBox(f,"margin"),u=v.getSize(f),s=d.minWidth,l=d.minHeight,i=s||u.width,o=l||u.height,n=d.width,r=d.height,a=void 0!==(a=d.autoResize)?a:!n&&!r,n=n||i,r=r||o;var h=e.left+e.right,p=e.top+e.bottom,m=d.maxWidth||65535,g=d.maxHeight||65535;return c._layoutRect=t={x:d.x||0,y:d.y||0,w:n,h:r,deltaW:h,deltaH:p,contentW:n-h,contentH:r-p,innerW:n-h,innerH:r-p,startMinWidth:s||0,startMinHeight:l||0,minW:Math.min(i,m),minH:Math.min(o,g),maxW:m,maxH:g,autoResize:a,scrollW:0},c._lastLayoutRect={},t},layoutRect:function(e){var t,n,r,i,o,a,s=this._layoutRect;return s=s||this.initLayoutRect(),e?(r=s.deltaW,i=s.deltaH,e.x!==o&&(s.x=e.x),e.y!==o&&(s.y=e.y),e.minW!==o&&(s.minW=e.minW),e.minH!==o&&(s.minH=e.minH),(n=e.w)!==o&&(n=(n=n<s.minW?s.minW:n)>s.maxW?s.maxW:n,s.w=n,s.innerW=n-r),(n=e.h)!==o&&(n=(n=n<s.minH?s.minH:n)>s.maxH?s.maxH:n,s.h=n,s.innerH=n-i),(n=e.innerW)!==o&&(n=(n=n<s.minW-r?s.minW-r:n)>s.maxW-r?s.maxW-r:n,s.innerW=n,s.w=n+r),(n=e.innerH)!==o&&(n=(n=n<s.minH-i?s.minH-i:n)>s.maxH-i?s.maxH-i:n,s.innerH=n,s.h=n+i),e.contentW!==o&&(s.contentW=e.contentW),e.contentH!==o&&(s.contentH=e.contentH),(t=this._lastLayoutRect).x===s.x&&t.y===s.y&&t.w===s.w&&t.h===s.h||((a=d.repaintControls)&&a.map&&!a.map[this._id]&&(a.push(this),a.map[this._id]=!0),t.x=s.x,t.y=s.y,t.w=s.w,t.h=s.h),this):s},repaint:function(){var e,t,n,r,i,o,a,s,l,u,c=this;l=document.createRange?function(e){return e}:Math.round,e=c.getEl().style,r=c._layoutRect,s=c._lastRepaintRect||{},o=(i=c.borderBox).left+i.right,a=i.top+i.bottom,r.x!==s.x&&(e.left=l(r.x)+"px",s.x=r.x),r.y!==s.y&&(e.top=l(r.y)+"px",s.y=r.y),r.w!==s.w&&(u=l(r.w-o),e.width=(0<=u?u:0)+"px",s.w=r.w),r.h!==s.h&&(u=l(r.h-a),e.height=(0<=u?u:0)+"px",s.h=r.h),c._hasBody&&r.innerW!==s.innerW&&(u=l(r.innerW),(n=c.getEl("body"))&&((t=n.style).width=(0<=u?u:0)+"px"),s.innerW=r.innerW),c._hasBody&&r.innerH!==s.innerH&&(u=l(r.innerH),(n=n||c.getEl("body"))&&((t=t||n.style).height=(0<=u?u:0)+"px"),s.innerH=r.innerH),c._lastRepaintRect=s,c.fire("repaint",{},!1)},updateLayoutRect:function(){this.parent()._lastRect=null,v.css(this.getEl(),{width:"",height:""}),this._layoutRect=this._lastRepaintRect=this._lastLayoutRect=null,this.initLayoutRect()},on:function(e,t){var n,r,i,o=this;return l(o).on(e,"string"!=typeof(n=t)?n:function(e){return r||o.parentsAndSelf().each(function(e){var t=e.settings.callbacks;if(t&&(r=t[n]))return i=e,!1}),r?r.call(i,e):(e.action=n,void this.fire("execute",e))}),o},off:function(e,t){return l(this).off(e,t),this},fire:function(e,t,n){if((t=t||{}).control||(t.control=this),t=l(this).fire(e,t),!1!==n&&this.parent)for(var r=this.parent();r&&!t.isPropagationStopped();)r.fire(e,t,!1),r=r.parent();return t},hasEventListeners:function(e){return l(this).has(e)},parents:function(e){var t,n=new i;for(t=this.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=f("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this.getEl(this.ariaTarget);return void 0===t?this._aria[e]:(this._aria[e]=t,this.state.get("rendered")&&n.setAttribute("role"==e?e:"aria-"+e,t),this)},encode:function(e,t){return!1!==t&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return d.translate?d.translate(e):e},before:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this),!0),this},after:function(e){var t=this.parent();return t&&t.insert(e,t.items().indexOf(this)),this},remove:function(){var t,e,n=this,r=n.getEl(),i=n.parent();if(n.items){var o=n.items().toArray();for(e=o.length;e--;)o[e].remove()}i&&i.items&&(t=[],i.items().each(function(e){e!==n&&t.push(e)}),i.items().set(t),i._lastRect=null),n._eventsRoot&&n._eventsRoot==n&&f(r).off();var a=n.getRoot().controlIdLookup;return a&&delete a[n._id],r&&r.parentNode&&r.parentNode.removeChild(r),n.state.set("rendered",!1),n.state.destroy(),n.fire("remove"),n},renderBefore:function(e){return f(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return f(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'"></div>'},postRender:function(){var e,t,n,r,i,o=this,a=o.settings;for(r in o.$el=f(o.getEl()),o.state.set("rendered",!0),a)0===r.indexOf("on")&&o.on(r.substr(2),a[r]);if(o._eventsRoot){for(n=o.parent();!i&&n;n=n.parent())i=n._eventsRoot;if(i)for(r in i._nativeEvents)o._nativeEvents[r]=!0}c(o),!a.style||(e=o.getEl())&&(e.setAttribute("style",a.style),e.style.cssText=a.style),o.settings.border&&(t=o.borderBox,o.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left}));var s=o.getRoot();for(var l in s.controlIdLookup||(s.controlIdLookup={}),(s.controlIdLookup[o._id]=o)._aria)o.aria(l,o._aria[l]);!1===o.state.get("visible")&&(o.getEl().style.display="none"),o.bindStates(),o.state.on("change:visible",function(e){var t,n=e.value;o.state.get("rendered")&&(o.getEl().style.display=!1===n?"none":"",o.getEl().getBoundingClientRect()),(t=o.parent())&&(t._lastRect=null),o.fire(n?"show":"hide"),u.add(o)}),o.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){var t,n,r,i,o,a,s=this.getEl(),l=s.parentNode,u=function(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}(s,l);return t=u.x,n=u.y,r=s.offsetWidth,i=s.offsetHeight,o=l.clientWidth,a=l.clientHeight,"end"==e?(t-=o-r,n-=a-i):"center"==e&&(t-=o/2-r/2,n-=a/2-i/2),l.scrollLeft=t,l.scrollTop=n,this},getRoot:function(){for(var e,t=this,n=[];t;){if(t.rootControl){e=t.rootControl;break}n.push(t),t=(e=t).parent()}e=e||this;for(var r=n.length;r--;)n[r].rootControl=e;return e},reflow:function(){u.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return o.each("text title visible disabled active value".split(" "),function(t){n[t]=function(e){return 0===arguments.length?this.state.get(t):(void 0!==e&&this.state.set(t,e),this)}}),d=e.extend(n)}),e(be,[],function(){var o,a={};return{add:function(e,t){a[e.toLowerCase()]=t},has:function(e){return!!a[e.toLowerCase()]},create:function(e,t){var n,r,i;if(!o){for(r in i=tinymce.ui)a[r.toLowerCase()]=i[r];o=!0}if("string"==typeof e?(t=t||{}).type=e:e=(t=e).type,e=e.toLowerCase(),!(n=a[e]))throw new Error("Could not find control by type: "+e);return(n=new n(t)).type=e,n}}}),e(xe,[],function(){return function(e){function n(e){return e&&1===e.nodeType}function i(e){return n(e=e||v)?e.getAttribute("role"):null}function r(e){for(var t,n=e||v;n=n.parentNode;)if(t=i(n))return t}function o(e){var t=v;if(n(t))return t.getAttribute("aria-"+e)}function a(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function s(e){var r=[];return function e(t){if(1==t.nodeType&&"none"!=t.style.display&&!t.disabled){!function(e){return!(!a(e)||e.hidden)||!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(i(e))}(t)||r.push(t);for(var n=0;n<t.childNodes.length;n++)e(t.childNodes[n])}}(e||t.getEl()),r}function l(e){var t,n;(n=(e=e||y).parents().toArray()).unshift(e);for(var r=0;r<n.length&&!(t=n[r]).settings.ariaRoot;r++);return t}function u(e,t){return e<0?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function c(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i<t.length;i++)t[i]===v&&(n=i);n+=e,r.lastAriaIndex=u(n,t)}function d(){"tablist"==r()?c(-1,s(v.parentNode)):y.parent().submenu?m():c(-1)}function f(){var e=i(),t=r();"tablist"==t?c(1,s(v.parentNode)):"menuitem"==e&&"menu"==t&&o("haspopup")?g():c(1)}function h(){c(-1)}function p(){var e=i(),t=r();"menuitem"==e&&"menubar"==t?g():"button"==e&&o("haspopup")?g({key:"down"}):c(1)}function m(){y.fire("cancel")}function g(e){e=e||{},y.fire("click",{target:v,aria:e})}var v,y,t=e.root;try{v=document.activeElement}catch(e){v=document.body}return y=t.getParentCtrl(v),t.on("keydown",function(e){function t(e,t){a(v)||"slider"!==i(v)&&!1!==t(e)&&e.preventDefault()}if(!e.isDefaultPrevented())switch(e.keyCode){case 37:t(e,d);break;case 39:t(e,f);break;case 38:t(e,h);break;case 40:t(e,p);break;case 27:m();break;case 14:case 13:case 32:t(e,g);break;case 9:!1!==function(e){if("tablist"==r()){var t=s(y.getEl("body"))[0];t&&t.focus()}else c(e.shiftKey?-1:1)}(e)&&e.preventDefault()}}),t.on("focusin",function(e){v=e.target,y=e.control}),{focusFirst:function(e){var t=l(e),n=s(t.getEl());t.settings.ariaRemember&&"lastAriaIndex"in t?u(t.lastAriaIndex,n):u(0,n)}}}}),e($e,[ve,fe,de,be,xe,d,f,me,ge],function(i,n,t,o,r,a,s,l,u){var c={};return i.extend({init:function(e){var t=this;t._super(e),(e=t.settings).fixed&&t.state.set("fixed",!0),t._items=new n,t.isRtl()&&t.classes.add("rtl"),t.bodyClasses=new l(function(){t.state.get("rendered")&&(t.getEl("body").className=this.toString())}),t.bodyClasses.prefix=t.classPrefix,t.classes.add("container"),t.bodyClasses.add("container-body"),e.containerCls&&t.classes.add(e.containerCls),t._layout=o.create((e.layout||"")+"layout"),t.settings.items?t.add(t.settings.items):t.add(t.render()),t._hasBody=!0},items:function(){return this._items},find:function(e){return(e=c[e]=c[e]||new t(e)).find(this)},add:function(e){return this.items().add(this.create(e)).parent(this),this},focus:function(e){var t,n,r;return e&&(n=this.keyboardNav||this.parents().eq(-1)[0].keyboardNav)?void n.focusFirst(this):(r=this.find("*"),this.statusbar&&r.add(this.statusbar.items()),r.each(function(e){return e.settings.autofocus?(t=null,!1):void(e.canFocus&&(t=t||e))}),t&&t.focus(),this)},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}0<=i&&((n=t.getEl())&&n.parentNode.removeChild(n),(n=e.getEl())&&n.parentNode.removeChild(n)),t.parent(this)},create:function(e){var t,n=this,r=[];return a.isArray(e)||(e=[e]),a.each(e,function(e){e&&(e instanceof i||("string"==typeof e&&(e={type:e}),t=a.extend({},n.settings.defaults,e),e.type=t.type=t.type||e.type||n.settings.defaultType||(t.defaults?t.defaults.type:null),e=o.create(t)),r.push(e))}),r},renderNew:function(){var r=this;return r.items().each(function(e,t){var n;e.parent(r),e.state.get("rendered")||((n=r.getEl("body")).hasChildNodes()&&t<=n.childNodes.length-1?s(n.childNodes[t]).before(e.renderHtml()):s(n).append(e.renderHtml()),e.postRender(),u.add(e))}),r._layout.applyClasses(r.items().filter(":visible")),r._lastRect=null,r},append:function(e){return this.add(e).renderNew()},prepend:function(e){return this.items().set(this.create(e).concat(this.items().toArray())),this.renderNew()},insert:function(e,t,n){var r,i,o;return e=this.create(e),r=this.items(),!n&&t<r.length-1&&(t+=1),0<=t&&t<r.length&&(i=r.slice(0,t).toArray(),o=r.slice(t).toArray(),r.set(i.concat(e,o))),this.renderNew()},fromJSON:function(e){for(var t in e)this.find("#"+t).value(e[t]);return this},toJSON:function(){var r={};return this.find("*").each(function(e){var t=e.name(),n=e.value();t&&void 0!==n&&(r[t]=n)}),r},renderHtml:function(){var e=this._layout,t=this.settings.role;return this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"'+(t?' role="'+this.settings.role+'"':"")+'><div id="'+this._id+'-body" class="'+this.bodyClasses+'">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t.state.set("rendered",!0),t.settings.style&&t.$el.css(t.settings.style),t.settings.border&&(e=t.borderBox,t.$el.css({"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=new r({root:t})),t},initLayoutRect:function(){var e=this._super();return this._layout.recalc(this),e},recalc:function(){var e=this._layoutRect,t=this._lastRect;if(!t||t.w!=e.w||t.h!=e.h)return this._layout.recalc(this),e=this.layoutRect(),this._lastRect={x:e.x,y:e.y,w:e.w,h:e.h},!0},reflow:function(){var e;if(u.remove(this),this.visible()){for(i.repaintControls=[],i.repaintControls.map={},this.recalc(),e=i.repaintControls.length;e--;)i.repaintControls[e].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),i.repaintControls=[]}return this}})}),e(we,[f],function(h){function p(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n<t.length;n++)e[t[n]]=e.changedTouches[0][t[n]]}return function(e,i){function o(){return f.getElementById(i.handle||e)}var a,s,t,l,u,c,d,f=i.document||document;i=i||{},t=function(e){var t,n,r=function(e){var t,n,r,i,o,a,s,l=Math.max;return t=e.documentElement,n=e.body,r=l(t.scrollWidth,n.scrollWidth),i=l(t.clientWidth,n.clientWidth),o=l(t.offsetWidth,n.offsetWidth),a=l(t.scrollHeight,n.scrollHeight),s=l(t.clientHeight,n.clientHeight),{width:r<o?i:r,height:a<l(t.offsetHeight,n.offsetHeight)?s:a}}(f);p(e),e.preventDefault(),s=e.button,t=o(),c=e.screenX,d=e.screenY,n=window.getComputedStyle?window.getComputedStyle(t,null).getPropertyValue("cursor"):t.runtimeStyle.cursor,a=h("<div></div>").css({position:"absolute",top:0,left:0,width:r.width,height:r.height,zIndex:2147483647,opacity:1e-4,cursor:n}).appendTo(f.body),h(f).on("mousemove touchmove",u).on("mouseup touchend",l),i.start(e)},u=function(e){return p(e),e.button!==s?l(e):(e.deltaX=e.screenX-c,e.deltaY=e.screenY-d,e.preventDefault(),void i.drag(e))},l=function(e){p(e),h(f).off("mousemove touchmove",u).off("mouseup touchend",l),a.remove(),i.stop&&i.stop(e)},this.destroy=function(){h(o()).off()},h(o()).on("mousedown touchstart",t)}}),e(Ce,[f,we],function(y,r){return{init:function(){this.on("repaint",this.renderScroll)},renderScroll:function(){function n(){function e(e,t,n,r,i,o){var a,s,l,u,c,d,f,h;if(s=g.getEl("scroll"+e)){if(f=t.toLowerCase(),h=n.toLowerCase(),y(g.getEl("absend")).css(f,g.layoutRect()[r]-1),!i)return void y(s).css("display","none");y(s).css("display","block"),a=g.getEl("body"),l=g.getEl("scroll"+e+"t"),u=a["client"+n]-2*v,c=(u-=p&&m?s["client"+o]:0)/a["scroll"+n],(d={})[f]=a["offset"+t]+v,d[h]=u,y(s).css(d),(d={})[f]=a["scroll"+t]*c,d[h]=u*c,y(l).css(d)}}var p,m,t;t=g.getEl("body"),p=t.scrollWidth>t.clientWidth,m=t.scrollHeight>t.clientHeight,e("h","Left","Width","contentW",p,"Height"),e("v","Top","Height","contentH",m,"Width")}var g=this,v=2;function e(a,s,l,u,c){var d,e=g._id+"-scroll"+a,t=g.classPrefix;y(g.getEl()).append('<div id="'+e+'" class="'+t+"scrollbar "+t+"scrollbar-"+a+'"><div id="'+e+'t" class="'+t+'scrollbar-thumb"></div></div>'),g.draghelper=new r(e+"t",{start:function(){d=g.getEl("body")["scroll"+s],y("#"+e).addClass(t+"active")},drag:function(e){var t,n,r,i,o=g.layoutRect();n=o.contentW>o.innerW,r=o.contentH>o.innerH,i=g.getEl("body")["client"+l]-2*v,t=(i-=n&&r?g.getEl("scroll"+a)["client"+c]:0)/g.getEl("body")["scroll"+l],g.getEl("body")["scroll"+s]=d+e["delta"+u]/t},stop:function(){y("#"+e).removeClass(t+"active")}})}g.settings.autoScroll&&(g._hasScroll||(g._hasScroll=!0,g.classes.add("scroll"),e("v","Top","Height","Y","Width"),e("h","Left","Width","X","Height"),g.on("wheel",function(e){var t=g.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),y(g.getEl("body")).on("scroll",n)),n())}}}),e(Ee,[$e,Ce],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+t.renderHtml(e)+"</div>":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1" role="group">'+(e._preBodyHtml||"")+n+"</div>"}})}),e(Se,[he],function(h){function o(e,t,n){var r,i,o,a,s,l,u,c,d,f;return d=h.getViewPort(),o=(i=h.getPos(t)).x,a=i.y,e.state.get("fixed")&&"static"==h.getRuntimeStyle(document.body,"position")&&(o-=d.x,a-=d.y),r=e.getEl(),s=(f=h.getSize(r)).width,l=f.height,u=(f=h.getSize(t)).width,c=f.height,"b"===(n=(n||"").split(""))[0]&&(a+=c),"r"===n[1]&&(o+=u),"c"===n[0]&&(a+=Math.round(c/2)),"c"===n[1]&&(o+=Math.round(u/2)),"b"===n[3]&&(a-=l),"r"===n[4]&&(o-=s),"c"===n[3]&&(a-=Math.round(l/2)),"c"===n[4]&&(o-=Math.round(s/2)),{x:o,y:a,w:s,h:l}}return{testMoveRel:function(e,t){for(var n=h.getViewPort(),r=0;r<t.length;r++){var i=o(this,e,t[r]);if(this.state.get("fixed")){if(0<i.x&&i.x+i.w<n.w&&0<i.y&&i.y+i.h<n.h)return t[r]}else if(i.x>n.x&&i.x+i.w<n.w+n.x&&i.y>n.y&&i.y+i.h<n.h+n.y)return t[r]}return t[0]},moveRel:function(e,t){"string"!=typeof t&&(t=this.testMoveRel(e,t));var n=o(this,e,t);return this.moveTo(n.x,n.y)},moveBy:function(e,t){var n=this.layoutRect();return this.moveTo(n.x+e,n.y+t),this},moveTo:function(e,t){function n(e,t,n){return e<0?0:t<e+n?(e=t-n)<0?0:e:e}if(this.settings.constrainToViewport){var r=h.getViewPort(window),i=this.layoutRect();e=n(e,r.w+r.x,i.w),t=n(t,r.h+r.y,i.h)}return this.state.get("rendered")?this.layoutRect({x:e,y:t}).repaint():(this.settings.x=e,this.settings.y=t),this.fire("move",{x:e,y:t}),this}}}),e(_e,[he],function(r){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(e,t){if(e<=1||t<=1){var n=r.getWindowSize();e=e<=1?e*n.w:e,t=t<=1?t*n.h:t}return this._layoutRect.autoResize=!1,this.layoutRect({minW:e,minH:t,w:e,h:t}).reflow()},resizeBy:function(e,t){var n=this.layoutRect();return this.resizeTo(n.w+e,n.h+t)}}}),e(ke,[Ee,Se,_e,he,f,r],function(e,t,n,r,a,i){function o(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(){d||(d=function(e){2!=e.button&&function(e){for(var t=m.length;t--;){var n=m[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(o(r,n)||n.parent()===r))continue;(e=n.fire("autohide",{target:e.target})).isDefaultPrevented()||n.hide()}}}(e)},a(document).on("click touchstart",d))}function l(i){function e(e,t){for(var n,r=0;r<m.length;r++)if(m[r]!=i)for(n=m[r].parent();n=n&&n.parent();)n==i&&m[r].fixed(e).moveBy(0,t).repaint()}var t=r.getViewPort().y;i.settings.autofix&&(i.state.get("fixed")?i._autoFixY>t&&(i.fixed(!1).layoutRect({y:i._autoFixY}).repaint(),e(!1,i._autoFixY-t)):(i._autoFixY=i.layoutRect().y,i._autoFixY<t&&(i.fixed(!0).layoutRect({y:0}).repaint(),e(!0,t-i._autoFixY))))}function u(e,t){var n,r,i=v.zIndex||65535;if(e)g.push(t);else for(n=g.length;n--;)g[n]===t&&g.splice(n,1);if(g.length)for(n=0;n<g.length;n++)g[n].modal&&(i++,r=g[n]),g[n].getEl().style.zIndex=i,g[n].zIndex=i,i++;var o=a("#"+t.classPrefix+"modal-block",t.getContainerElm())[0];r?a(o).css("z-index",r.zIndex-1):o&&(o.parentNode.removeChild(o),p=!1),v.currentZIndex=i}function c(e){var t;for(t=m.length;t--;)m[t]===e&&m.splice(t,1);for(t=g.length;t--;)g[t]===e&&g.splice(t,1)}var d,f,h,p,m=[],g=[],v=e.extend({Mixins:[t,n],init:function(e){var r=this;r._super(e),(r._eventsRoot=r).classes.add("floatpanel"),e.autohide&&(s(),function(){if(!h){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;h=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,v.hideAll())},a(window).on("resize",h)}}(),m.push(r)),e.autofix&&(f||(f=function(){var e;for(e=m.length;e--;)l(m[e])},a(window).on("scroll",f)),r.on("move",function(){l(this)})),r.on("postrender show",function(e){if(e.control==r){var t,n=r.classPrefix;r.modal&&!p&&((t=a("#"+n+"modal-block",r.getContainerElm()))[0]||(t=a('<div id="'+n+'modal-block" class="'+n+"reset "+n+'fade"></div>').appendTo(r.getContainerElm())),i.setTimeout(function(){t.addClass(n+"in"),a(r.getEl()).addClass(n+"in")}),p=!0),u(!0,r)}}),r.on("show",function(){r.parents().each(function(e){if(e.state.get("fixed"))return r.fixed(!0),!1})}),e.popover&&(r._preBodyHtml='<div class="'+r.classPrefix+'arrow"></div>',r.classes.add("popover").add("bottom").add(r.isRtl()?"end":"start")),r.aria("label",e.ariaLabel),r.aria("labelledby",r._id),r.aria("describedby",r.describedBy||r._id+"-none")},fixed:function(e){if(this.state.get("fixed")!=e){if(this.state.get("rendered")){var t=r.getViewPort();e?this.layoutRect().y-=t.y:this.layoutRect().y+=t.y}this.classes.toggle("fixed",e),this.state.set("fixed",e)}return this},show:function(){var e,t=this._super();for(e=m.length;e--&&m[e]!==this;);return-1===e&&m.push(this),t},hide:function(){return c(this),u(!1,this),this._super()},hideAll:function(){v.hideAll()},close:function(){return this.fire("close").isDefaultPrevented()||(this.remove(),u(!1,this)),this},remove:function(){c(this),this._super()},postRender:function(){return this.settings.bodyRole&&this.getEl("body").setAttribute("role",this.settings.bodyRole),this._super()}});return v.hideAll=function(){for(var e=m.length;e--;){var t=m[e];t&&t.settings.autohide&&(t.hide(),m.splice(e,1))}},v}),e(Ne,[ke,Ee,he,f,we,pe,i,r],function(e,t,s,l,r,u,i,c){function o(e){var t,n=l("meta[name=viewport]")[0];!1!==i.overrideViewPort&&(n||((n=document.createElement("meta")).setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),(t=n.getAttribute("content"))&&void 0!==d&&(d=t),n.setAttribute("content",e?"width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0":d))}function n(e,t){!function(){for(var e=0;e<a.length;e++)if(a[e]._fullscreen)return!0;return!1}()||!1!==t||l([document.documentElement,document.body]).removeClass(e+"fullscreen")}var a=[],d="",f=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.classes.add("rtl"),n.classes.add("window"),n.bodyClasses.add("window-body"),n.state.set("fixed",!0),e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.classes.add("foot"),n.statusbar.parent(n)),n.on("click",function(e){var t=n.classPrefix+"close";(s.hasClass(e.target,t)||s.hasClass(e.target.parentNode,t))&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,n,r,i=this,o=i.statusbar;i._fullscreen&&(i.layoutRect(s.getWindowSize()),i.layoutRect().contentH=i.layoutRect().innerH),i._super(),e=i.layoutRect(),!i.settings.title||i._fullscreen||(t=e.headerW)>e.w&&(n=e.x-Math.max(0,t/2),i.layoutRect({w:t,x:n}),r=!0),o&&(o.layoutRect({w:i.layoutRect().innerW}).recalc(),(t=o.layoutRect().minW+e.deltaW)>e.w&&(n=e.x-Math.max(0,t-e.w),i.layoutRect({w:t,x:n}),r=!0)),r&&i.recalc()},initLayoutRect:function(){var e,t=this._super(),n=0;if(this.settings.title&&!this._fullscreen){e=this.getEl("head");var r=s.getSize(e);t.headerW=r.width,t.headerH=r.height,n+=t.headerH}this.statusbar&&(n+=this.statusbar.layoutRect().h),t.deltaH+=n,t.minH+=n,t.h+=n;var i=s.getWindowSize();return t.x=this.settings.x||Math.max(0,i.w/2-t.w/2),t.y=this.settings.y||Math.max(0,i.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='<div id="'+n+'-head" class="'+r+'window-head"><div id="'+n+'-title" class="'+r+'title">'+e.encode(i.title)+'</div><div id="'+n+'-dragh" class="'+r+'dragh"></div><button type="button" class="'+r+'close" aria-hidden="true"><i class="mce-ico mce-i-remove"></i></button></div>'),i.url&&(s='<iframe src="'+i.url+'" tabindex="-1"></iframe>'),void 0===s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'<div id="'+n+'" class="'+e.classes+'" hidefocus="1"><div class="'+e.classPrefix+'reset" role="application">'+o+'<div id="'+n+'-body" class="'+e.bodyClasses+'">'+s+"</div>"+a+"</div></div>"},fullscreen:function(e){var n,t,r=this,i=document.documentElement,o=r.classPrefix;if(e!=r._fullscreen)if(l(window).on("resize",function(){var e;if(r._fullscreen)if(n)r._timer||(r._timer=c.setTimeout(function(){var e=s.getWindowSize();r.moveTo(0,0).resizeTo(e.w,e.h),r._timer=0},50));else{e=(new Date).getTime();var t=s.getWindowSize();r.moveTo(0,0).resizeTo(t.w,t.h),50<(new Date).getTime()-e&&(n=!0)}}),t=r.layoutRect(),r._fullscreen=e){r._initial={x:t.x,y:t.y,w:t.w,h:t.h},r.borderBox=u.parseBox("0"),r.getEl("head").style.display="none",t.deltaH-=t.headerH+2,l([i,document.body]).addClass(o+"fullscreen"),r.classes.add("fullscreen");var a=s.getWindowSize();r.moveTo(0,0).resizeTo(a.w,a.h)}else r.borderBox=u.parseBox(r.settings.border),r.getEl("head").style.display="",t.deltaH+=t.headerH,l([i,document.body]).removeClass(o+"fullscreen"),r.classes.remove("fullscreen"),r.moveTo(r._initial.x,r._initial.y).resizeTo(r._initial.w,r._initial.h);return r.reflow()},postRender:function(){var t,n=this;setTimeout(function(){n.classes.add("in"),n.fire("open")},0),n._super(),n.statusbar&&n.statusbar.postRender(),n.focus(),this.dragHelper=new r(n._id+"-dragh",{start:function(){t={x:n.layoutRect().x,y:n.layoutRect().y}},drag:function(e){n.moveTo(t.x+e.deltaX,t.y+e.deltaY)}}),n.on("submit",function(e){e.isDefaultPrevented()||n.close()}),a.push(n),o(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e;for(this.dragHelper.destroy(),this._super(),this.statusbar&&this.statusbar.remove(),n(this.classPrefix,!1),e=a.length;e--;)a[e]===this&&a.splice(e,1);o(0<a.length)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return function(){if(!i.desktop){var n={w:window.innerWidth,h:window.innerHeight};c.setInterval(function(){var e=window.innerWidth,t=window.innerHeight;n.w==e&&n.h==t||(n={w:e,h:t},l(window).trigger("resize"))},100)}l(window).on("resize",function(){var e,t,n=s.getWindowSize();for(e=0;e<a.length;e++)t=a[e].layoutRect(),a[e].moveTo(a[e].settings.x||Math.max(0,n.w/2-t.w/2),a[e].settings.y||Math.max(0,n.h/2-t.h/2))})}(),f}),e(Te,[Ne],function(i){var o=i.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(e){function t(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),r(t)}}}var n,r=e.callback||function(){};switch(e.buttons){case o.OK_CANCEL:n=[t("Ok",!0,!0),t("Cancel",!1)];break;case o.YES_NO:case o.YES_NO_CANCEL:n=[t("Yes",1,!0),t("No",0)],e.buttons==o.YES_NO_CANCEL&&n.push(t("Cancel",-1));break;default:n=[t("Ok",!0,!0)]}return new i({padding:20,x:e.x,y:e.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:n,title:e.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:e.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:e.onClose,onCancel:function(){r(!1)}}).renderTo(document.body).reflow()},alert:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,o.msgBox(e)},confirm:function(e,t){return"string"==typeof e&&(e={text:e}),e.callback=t,e.buttons=o.OK_CANCEL,o.msgBox(e)}}});return o}),e(Ae,[Ne,Te],function(s,l){return function(i){function t(){if(r.length)return r[r.length-1]}function o(e){i.fire("OpenWindow",{win:e})}function a(e){i.fire("CloseWindow",{win:e})}var r=[];this.windows=r,i.on("remove",function(){for(var e=r.length;e--;)r[e].close()}),this.open=function(n,e){var t;return i.editorManager.setActive(i),n.title=n.title||" ",n.url=n.url||n.file,n.url&&(n.width=parseInt(n.width||320,10),n.height=parseInt(n.height||240,10)),n.body&&(n.items={defaults:n.defaults,type:n.bodyType||"form",items:n.body,data:n.data,callbacks:n.commands}),n.url||n.buttons||(n.buttons=[{text:"Ok",subtype:"primary",onclick:function(){t.find("form")[0].submit()}},{text:"Cancel",onclick:function(){t.close()}}]),t=new s(n),r.push(t),t.on("close",function(){for(var e=r.length;e--;)r[e]===t&&r.splice(e,1);r.length||i.focus(),a(t)}),n.data&&t.on("postRender",function(){this.find("*").each(function(e){var t=e.name();t in n.data&&e.value(n.data[t])})}),t.features=n||{},t.params=e||{},1===r.length&&i.nodeChanged(),o(t=t.renderTo().reflow()),t},this.alert=function(e,t,n){var r;(r=l.alert(e,function(){t?t.call(n||this):i.focus()})).on("close",function(){a(r)}),o(r)},this.confirm=function(e,t,n){var r;(r=l.confirm(e,function(e){t.call(n||this,e)})).on("close",function(){a(r)}),o(r)},this.close=function(){t()&&t().close()},this.getParams=function(){return t()?t().params:null},this.setParams=function(e){t()&&(t().params=e)},this.getWindows=function(){return r}}}),e(Re,[ve,Se],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'" role="presentation"><div class="'+e+'tooltip-arrow"></div><div class="'+e+'tooltip-inner">'+this.encode(this.state.get("text"))+"</div></div>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().lastChild.innerHTML=t.encode(e.value)}),t._super()},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}})}),e(Be,[ve,Re],function(e,t){var n,o=e.extend({init:function(r){var i=this;i._super(r),r=i.settings,i.canFocus=!0,r.tooltip&&!1!==o.tooltips&&(i.on("mouseenter",function(e){var t=i.tooltip().moveTo(-65535);if(e.control==i){var n=t.text(r.tooltip).show().testMoveRel(i.getEl(),["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"==n),t.classes.toggle("tooltip-nw","bc-tl"==n),t.classes.toggle("tooltip-ne","bc-tr"==n),t.moveRel(i.getEl(),n)}else t.hide()}),i.on("mouseleave mousedown click",function(){i.tooltip().hide()})),i.aria("label",r.ariaLabel||r.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"})).renderTo(),n},postRender:function(){var e=this.settings;this._super(),this.parent()||!e.width&&!e.height||(this.initLayoutRect(),this.repaint()),e.autofocus&&this.focus()},bindStates:function(){function t(e){r.aria("disabled",e),r.classes.toggle("disabled",e)}function n(e){r.aria("pressed",e),r.classes.toggle("active",e)}var r=this;return r.state.on("change:disabled",function(e){t(e.value)}),r.state.on("change:active",function(e){n(e.value)}),r.state.get("disabled")&&t(!0),r.state.get("active")&&n(!0),r._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return o}),e(De,[Be],function(e){return e.extend({Defaults:{value:0},init:function(e){this._super(e),this.classes.add("progress"),this.settings.filter||(this.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div class="'+t+'bar-container"><div class="'+t+'bar"></div></div><div class="'+t+'text">0%</div></div>'},postRender:function(){return this._super(),this.value(this.settings.value),this},bindStates:function(){function t(e){e=n.settings.filter(e),n.getEl().lastChild.innerHTML=e+"%",n.getEl().firstChild.firstChild.style.width=e+"%"}var n=this;return n.state.on("change:value",function(e){t(e.value)}),t(n.state.get("value")),n._super()}})}),e(Me,[ve,Se,De,r],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||0<e.timeout)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n='<i class="'+t+"ico "+t+"i-"+e.icon+'"></i>'),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r='<button type="button" class="'+t+'close" aria-hidden="true">×</button>'),e.progressBar&&(i=e.progressBar.renderHtml()),'<div id="'+e._id+'" class="'+e.classes+'"'+o+' role="presentation">'+n+'<div class="'+t+'notification-inner">'+e.state.get("text")+"</div>"+i+r+"</div>"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl().childNodes[1].innerHTML=e.value}),t.progressBar&&t.progressBar.bindStates(),t._super()},close:function(){return this.fire("close").isDefaultPrevented()||this.remove(),this},repaint:function(){var e,t;e=this.getEl().style,t=this._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=65534}})}),e(Oe,[Me,r,d],function(a,t,s){return function(r){function e(){if(o.length)return o[o.length-1]}function i(){if(0<o.length){var e=o.slice(0,1)[0],t=r.inline?r.getElement():r.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),1<o.length)for(var n=1;n<o.length;n++)o[n].moveRel(o[n-1].getEl(),"bc-tc")}}var o=[];this.notifications=o,r.on("remove",function(){for(var e=o.length;e--;)o[e].close()}),r.on("ResizeEditor",i),r.on("ResizeWindow",function(){t.requestAnimationFrame(function(){(function(){for(var e=0;e<o.length;e++)o[e].moveTo(0,0)})(),i()})}),this.open=function(e){if(!r.removed){var t;r.editorManager.setActive(r);var n=function(e,t){if(!function(e){return!e.progressBar&&!e.timeout}(t))return null;var n=s.grep(e,function(e){return function(e,t){return e.type===t.settings.type&&e.text===t.settings.text}(t,e)});return 0===n.length?null:n[0]}(o,e);return null===n?(t=new a(e),o.push(t),0<e.timeout&&(t.timer=setTimeout(function(){t.close()},e.timeout)),t.on("close",function(){var e=o.length;for(t.timer&&r.getWin().clearTimeout(t.timer);e--;)o[e]===t&&o.splice(e,1);i()}),t.renderTo(),i()):t=n,t}},this.close=function(){e()&&e().close()},this.getNotifications=function(){return o},r.on("SkinLoaded",function(){var e=r.settings.service_message;e&&r.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),e(Pe,[y],function(i){return{create:function(e,t,n){for(var r=[];t&&t!=e;t=t.parentNode)r.push(i.nodeIndex(t,n));return r},resolve:function(e,t){var n,r,i;for(r=e,n=t.length-1;0<=n;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}}}),e(Le,[M,E,p,Pe,_,g,i,d,r,C,H,te],function(J,Z,Q,ee,te,ne,re,ie,oe,ae,se,le){return function(h){function e(e,t){try{h.getDoc().execCommand(e,!1,t)}catch(e){}}function t(){var e=h.getDoc().documentMode;return e||6}function s(e){return e.isDefaultPrevented()}function n(e){var t,n;e.dataTransfer&&(h.selection.isCollapsed()&&"IMG"==e.target.tagName&&A.select(e.target),0<(t=h.selection.getContent()).length&&(n=L+escape(h.id)+","+escape(t),e.dataTransfer.setData(I,n)))}function r(e){var t;return e.dataTransfer&&((t=e.dataTransfer.getData(I))&&0<=t.indexOf(L))?(t=t.substr(L.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function i(e){h.queryCommandSupported("mceInsertClipboardContent")?h.execCommand("mceInsertClipboardContent",!1,{content:e}):h.execCommand("mceInsertContent",!1,e)}function o(){h.shortcuts.add("meta+a",null,"SelectAll")}function a(){h.on("keydown",function(e){if(!s(e)&&e.keyCode===k){if(!h.getBody().getElementsByTagName("hr").length)return;if(A.isCollapsed()&&0===A.getRng(!0).startOffset){var t=A.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return T.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(T.remove(n),e.preventDefault())}}})}function l(){h.on("keydown",function(e){if(!s(e)&&e.keyCode===k&&A.isCollapsed()&&0===A.getRng(!0).startOffset){var t=A.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function u(){h.inline||(h.contentStyles.push("body {min-height: 150px}"),h.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(11<re.ie)return void h.getBody().focus();t=h.selection.getRng(),h.getBody().focus(),h.selection.setRng(t),h.selection.normalize(),h.nodeChanged()}}))}function c(){}function d(){function n(e){var t=new le(e.getBody()),n=e.selection.getRng(),r=se.fromRangeStart(n),i=se.fromRangeEnd(n),o=t.prev(r),a=t.next(i);return!e.selection.isCollapsed()&&(!o||o.isAtStart()&&r.isEqual(o))&&(!a||a.isAtEnd()&&r.isEqual(a))}h.on("keypress",function(e){!s(e)&&!A.isCollapsed()&&31<e.charCode&&!J.metaKeyPressed(e)&&n(h)&&(e.preventDefault(),h.setContent(String.fromCharCode(e.charCode)),h.selection.select(h.getBody(),!0),h.selection.collapse(!1),h.nodeChanged())}),h.on("keydown",function(e){var t=e.keyCode;s(e)||t!=N&&t!=k||n(h)&&(e.preventDefault(),h.setContent(""),h.nodeChanged())})}var f,p,m,g,v,y,b,x,$,w,C,E,S=ie.each,_=h.$,k=J.BACKSPACE,N=J.DELETE,T=h.dom,A=h.selection,R=h.settings,B=h.parser,D=h.serializer,M=re.gecko,O=re.ie,P=re.webkit,L="data:text/mce-internal,",I=O?"Text":"URL";return h.on("keydown",function(e){var t,n,r,i,o;if(!s(e)&&e.keyCode==J.BACKSPACE&&(n=(t=A.getRng()).startContainer,r=t.startOffset,i=T.getRoot(),o=n,t.collapsed&&0===r)){for(;o&&o.parentNode&&o.parentNode.firstChild==o&&o.parentNode!=i;)o=o.parentNode;"BLOCKQUOTE"===o.tagName&&(h.formatter.toggle("blockquote",null,o),(t=T.createRng()).setStart(n,0),t.setEnd(n,0),A.setRng(t))}}),h.on("keydown",function(e){var t,n,r=e.keyCode;if(!s(e)&&(r==N||r==k)){if(t=h.selection.isCollapsed(),n=h.getBody(),t&&!T.isEmpty(n))return;if(!t&&!function(e){if(!e.setStart){if(e.item)return!1;var t=e.duplicate();return t.moveToElementText(h.getBody()),Z.compareRanges(e,t)}var n=K(e),r=T.createRng();return r.selectNode(h.getBody()),n===K(r)}(h.selection.getRng()))return;e.preventDefault(),h.setContent(""),n.firstChild&&T.isBlock(n.firstChild)?h.selection.setCursorLocation(n.firstChild,0):h.selection.setCursorLocation(n,0),h.nodeChanged()}}),re.windowsPhone||h.on("keyup focusin mouseup",function(e){65==e.keyCode&&J.metaKeyPressed(e)||A.normalize()},!0),P&&(d(),$=h.getDoc(),w=h.dom,C=h.selection,(E=window.MutationObserver)||(b=!0,E=function(){function t(e){var t=e.relatedNode||e.target;i.push({target:t,addedNodes:[t]})}function n(e){var t=e.relatedNode||e.target;i.push({target:t,attributeName:e.attrName})}var r,i=[];this.observe=function(e){(r=e).addEventListener("DOMSubtreeModified",t,!1),r.addEventListener("DOMNodeInsertedIntoDocument",t,!1),r.addEventListener("DOMNodeInserted",t,!1),r.addEventListener("DOMAttrModified",n,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",t,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",t,!1),r.removeEventListener("DOMNodeInserted",t,!1),r.removeEventListener("DOMAttrModified",n,!1)},this.takeRecords=function(){return i}}),h.on("keydown",function(e){var t=e.keyCode==N,n=e.ctrlKey||e.metaKey;if(!s(e)&&(t||e.keyCode==k)){var r=h.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(function(e,n){function t(e,t){return f=_(t).parents().filter(function(e,t){return!!h.schema.getTextInlineElements()[t.nodeName]}),a=e.cloneNode(!1),(f=ie.map(f,function(e){return e=e.cloneNode(!1),a.hasChildNodes()&&e.appendChild(a.firstChild),a.appendChild(e),a.appendChild(e),e})).length?(d=w.create("br"),f[0].appendChild(d),w.replace(a,e),n.setStartBefore(d),n.setEndBefore(d),h.selection.setRng(n),d):null}function r(e){return e&&h.schema.getTextBlockElements()[e.tagName]}var i,o,a,s,l,u,c,d,f;if(n.collapsed&&(u=n.startContainer,c=n.startOffset,r(o=w.getParent(u,w.isBlock))))if(1==u.nodeType){if((u=u.childNodes[c])&&"BR"!=u.tagName)return;if(l=e?o.nextSibling:o.previousSibling,w.isEmpty(o)&&r(l)&&w.isEmpty(l)&&t(o,u))return w.remove(l),!0}else if(3==u.nodeType){if(i=ee.create(o,u),s=o.cloneNode(!0),u=ee.resolve(s,i),e){if(c>=u.data.length)return;u.deleteData(c,1)}else{if(c<=0)return;u.deleteData(c-1,1)}if(w.isEmpty(s))return t(o,u)}}(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o<i.data.length:0<o))return;e.preventDefault(),n&&h.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),X(t)}}),h.on("keypress",function(e){var t,n,r,i,o,a;!s(e)&&!C.isCollapsed()&&31<e.charCode&&!J.metaKeyPressed(e)&&(t=h.selection.getRng(),a=String.fromCharCode(e.charCode),e.preventDefault(),n=_(t.startContainer).parents().filter(function(e,t){return!!h.schema.getTextInlineElements()[t.nodeName]}),X(!0),(n=n.filter(function(e,t){return!_.contains(h.getBody(),t)})).length?(r=w.createFragment(),n.each(function(e,t){t=t.cloneNode(!1),r.hasChildNodes()?t.appendChild(r.firstChild):o=t,r.appendChild(t),r.appendChild(t)}),o.appendChild(h.getDoc().createTextNode(a)),i=w.getParent(t.startContainer,w.isBlock),w.isEmpty(i)?_(i).empty().append(r):t.insertNode(r),t.setStart(o.firstChild,1),t.setEnd(o.firstChild,1),h.selection.setRng(t)):h.selection.setContent(a))}),h.addCommand("Delete",function(){X()}),h.addCommand("ForwardDelete",function(){X(!0)}),b||(h.on("dragstart",function(e){x=C.getRng(),n(e)}),h.on("drop",function(t){if(!s(t)){var n=r(t);n&&(t.preventDefault(),oe.setEditorTimeout(h,function(){var e=Z.getCaretRangeFromPoint(t.x,t.y,$);x&&(C.setRng(x),x=null,Y()),C.setRng(e),i(n.html)}))}}),h.on("cut",function(e){s(e)||!e.clipboardData||h.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",h.selection.getContent()),e.clipboardData.setData("text/plain",h.selection.getContent({format:"text"})),oe.setEditorTimeout(h,function(){Y(!0)}))})),h.settings.content_editable||T.bind(h.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==h.getDoc().documentElement)if(t=A.getRng(),h.getBody().focus(),"mousedown"==e.type){if(ae.isCaretContainer(t.startContainer))return;A.placeCaretAt(e.clientX,e.clientY)}else A.setRng(t)}),h.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==T.getContentEditableParent(t)&&(e.preventDefault(),A.select(t),h.nodeChanged()),"A"==t.nodeName&&T.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),A.select(t))}),R.forced_root_block&&h.on("init",function(){e("DefaultParagraphSeparator",R.forced_root_block)}),h.on("init",function(){h.dom.bind(h.getBody(),"submit",function(e){e.preventDefault()})}),l(),B.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()}),re.iOS?(h.inline||h.on("keydown",function(){document.activeElement==document.body&&h.getWin().focus()}),u(),h.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),h.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):o()),O&&re.ie<11&&(a(),document.body.setAttribute("role","application"),7<t()||(e("RespectVisibilityInDesign",!0),h.contentStyles.push(".mceHideBrInPre pre br {display: none}"),T.addClass(h.getBody(),"mceHideBrInPre"),B.addNodeFilter("pre",function(e){for(var t,n,r,i,o=e.length;o--;)for(n=(t=e[o].getAll("br")).length;n--;)(i=(r=t[n]).prev)&&3===i.type&&"\n"!=i.value.charAt(i.value-1)?i.value+="\n":r.parent.insert(new te("#text",3),r,!0).value="\n"}),D.addNodeFilter("pre",function(e){for(var t,n,r,i=e.length;i--;)for(n=(t=e[i].getAll("br")).length;n--;)(r=t[n].prev)&&3==r.type&&(r.value=r.value.replace(/\r?\n$/,""))})),T.bind(h.getBody(),"mouseup",function(){var e,t=A.getNode();"IMG"==t.nodeName&&((e=T.getStyle(t,"width"))&&(T.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),T.setStyle(t,"width","")),(e=T.getStyle(t,"height"))&&(T.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),T.setStyle(t,"height","")))}),h.on("keydown",function(e){var t;s(e)||e.keyCode!=k||(t=h.getDoc().selection.createRange())&&t.item&&(e.preventDefault(),h.undoManager.beforeChange(),T.remove(t.item(0)),h.undoManager.add())}),10<=t()&&(y="",S("p div h1 h2 h3 h4 h5 h6".split(" "),function(e,t){y+=(0<t?",":"")+e+":empty"}),h.contentStyles.push(y+"{padding-right: 1px !important}")),t()<9&&(B.addNodeFilter("noscript",function(e){for(var t,n,r=e.length;r--;)(n=(t=e[r]).firstChild)&&t.attr("data-mce-innertext",n.value)}),D.addNodeFilter("noscript",function(e){for(var t,n,r,i=e.length;i--;)t=e[i],(n=e[i].firstChild)?n.value=ne.decode(n.value):(r=t.attributes.map["data-mce-innertext"])&&(t.attr("data-mce-innertext",null),(n=new te("#text",3)).value=r,n.raw=!0,t.append(n))})),g=T.doc,v=g.body,g.documentElement.unselectable=!0,T.bind(g,"mousedown contextmenu",function(e){if("HTML"===e.target.nodeName){if(f&&V(),(m=g.documentElement).scrollHeight>m.clientHeight)return;f=1,(p=U(e.x,e.y))&&(T.bind(g,"mouseup",V),T.bind(g,"mousemove",z),T.getRoot().focus(),p.select())}})),11<=re.ie&&l(),re.ie&&(u(),o(),e("AutoUrlDetect",!1),h.on("dragstart",function(e){n(e)}),h.on("drop",function(e){if(!s(e)){var t=r(e);if(t&&t.id!=h.id){e.preventDefault();var n=Z.getCaretRangeFromPoint(e.x,e.y,h.getDoc());A.setRng(n),i(t.html)}}})),M&&(d(),a(),window.Range.prototype.getClientRects||h.on("mousedown",function(e){if(!s(e)&&"HTML"===e.target.nodeName){var t=h.getBody();t.blur(),oe.setEditorTimeout(h,function(){t.focus()})}}),h.on("keypress",function(e){var t;if(!s(e)&&(8==e.keyCode||46==e.keyCode)&&H())return t=F(),h.getDoc().execCommand("delete",!1,null),t(),e.preventDefault(),!1}),T.bind(h.getDoc(),"cut",function(e){var t;!s(e)&&H()&&(t=F(),oe.setEditorTimeout(h,function(){t()}))}),R.readonly||h.on("BeforeExecCommand MouseDown",function(){e("StyleWithCSS",!1),e("enableInlineTableEditing",!1),R.object_resizing||e("enableObjectResizing",!1)}),h.on("SetContent ExecCommand",function(e){"setcontent"!=e.type&&"mceInsertLink"!==e.command||S(T.select("a"),function(e){var t=e.parentNode,n=T.getRoot();if(t.lastChild===e){for(;t&&!T.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}T.add(t,"br",{"data-mce-bogus":1})}})}),h.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),re.mac&&h.on("keydown",function(e){!J.metaKeyPressed(e)||e.shiftKey||37!=e.keyCode&&39!=e.keyCode||(e.preventDefault(),h.selection.getSel().modify("move",37==e.keyCode?"backward":"forward","lineboundary"))}),l()),{refreshContentEditable:c,isHidden:function(){var e;return M?!(e=h.selection.getSel())||!e.rangeCount||0===e.rangeCount:0}};function F(){var e=T.getAttribs(A.getStart().cloneNode(!1));return function(){var t=A.getStart();t!==h.getBody()&&(T.setAttrib(t,"style",null),S(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function H(){return!A.isCollapsed()&&T.getParent(A.getStart(),T.isBlock)!=T.getParent(A.getEnd(),T.isBlock)}function U(e,t){var n=v.createTextRange();try{n.moveToPoint(e,t)}catch(e){n=null}return n}function z(e){var t;e.button?(t=U(e.x,e.y))&&(0<t.compareEndPoints("StartToStart",p)?t.setEndPoint("StartToStart",p):t.setEndPoint("EndToEnd",p),t.select()):V()}function V(){var e=g.selection.createRange();p&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&p.select(),T.unbind(g,"mouseup",V),T.unbind(g,"mousemove",z),p=f=0}function j(e){var t=w.schema.getBlockElements(),n=h.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function W(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==_.trim(n.data).length)&&n!==t)return!1;return n===t}function q(e,t,n){var r,i,o;if(w.isChildOf(e,h.getBody()))for(o=w.schema.getNonEmptyElements(),r=new Q(n||e,e);i=r[t?"next":"prev"]();){if(o[i.nodeName]&&!j(i))return i;if(3==i.nodeType&&0<i.data.length)return i}}function G(e){var t=C.getRng();if(function(e){var t,n,r,i,o;if(!e.collapsed&&(t=w.getParent(Z.getNode(e.startContainer,e.startOffset),w.isBlock),n=w.getParent(Z.getNode(e.endContainer,e.endOffset),w.isBlock),o=h.schema.getTextBlockElements(),t!=n&&o[t.nodeName]&&o[n.nodeName]&&"false"!==w.getContentEditable(t)&&"false"!==w.getContentEditable(n)))return e.deleteContents(),r=q(t,!1),i=q(n,!0),w.isEmpty(n)||_(t).append(n.childNodes),_(n).remove(),r?1==r.nodeType?"BR"==r.nodeName?(e.setStartBefore(r),e.setEndBefore(r)):(e.setStartAfter(r),e.setEndAfter(r)):(e.setStart(r,r.data.length),e.setEnd(r,r.data.length)):i&&(1==i.nodeType?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStart(i,0),e.setEnd(i,0))),C.setRng(e),!0}(t=function(e,t){var n,r,i,o,a,s;if(!e.collapsed)return e;if(a=e.startContainer,s=e.startOffset,3==a.nodeType)if(t){if(s<a.data.length)return e}else if(0<s)return e;n=Z.getNode(a,s),i=w.getParent(n,w.isBlock),r=q(h.getBody(),t,n),o=w.getParent(r,w.isBlock);var l=1===a.nodeType&&s>a.childNodes.length-1;if(!n||!r)return e;if(o&&i!=o)if(t){if(!W(i,o))return e;1==n.nodeType?"BR"==n.nodeName?e.setStartBefore(n):e.setStartAfter(n):e.setStart(n,n.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}else{if(!W(o,i))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==n.nodeType&&l?e.setEndAfter(n):e.setEndBefore(n)}return e}(t,e)))return!0}function X(e){var t,r,i;G(e)||(ie.each(h.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&h.dom.setAttrib(e,"style",h.dom.getAttrib(e,"style"))}),(t=new E(function(){})).observe(h.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),h.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),r=h.selection.getRng(),i=r.startContainer.parentNode,ie.each(t.takeRecords(),function(e){if(w.isChildOf(e.target,h.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}ie.each(e.addedNodes,function(e){var t,n;"SPAN"!=e.nodeName||e.getAttribute("mce-data-marked")||(e==i&&(t=r.startOffset,n=e.firstChild),w.remove(e,!0),n&&(r.setStart(n,t),r.setEnd(n,t),h.selection.setRng(r)))})}}),t.disconnect(),ie.each(h.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}function Y(e){h.undoManager.transact(function(){X(e)})}function K(e){var t=T.create("body"),n=e.cloneContents();return t.appendChild(n),A.serializer.serialize(t,{format:"html"})}}}),e(Ie,[ue,y,d],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=u.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(o,a){function s(e){return!e.hidden&&!e.readonly}var e,t=r(o,a);if(o.delegates||(o.delegates={}),!o.delegates[a])if(o.settings.event_root){if(l||(l={},o.editorManager.on("removeEditor",function(){var e;if(!o.editorManager.activeEditor&&l){for(e in l)o.dom.unbind(r(o,e));l=null}})),l[a])return;e=function(e){for(var t=e.target,n=o.editorManager.editors,r=n.length;r--;){var i=n[r].getBody();(i===t||u.isChildOf(t,i))&&s(n[r])&&n[r].fire(a,e)}},l[a]=e,u.bind(t,a,e)}else e=function(e){s(o)&&o.fire(a,e)},u.bind(t,a,e),o.delegates[a]=e}var l,u=t.DOM,o={bindPendingEventDelegates:function(){var t=this;n.each(t._pendingNativeEvents,function(e){i(t,e)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this;if(t.delegates){for(e in t.delegates)t.dom.unbind(r(t,e),e,t.delegates[e]);delete t.delegates}t.inline||(t.getBody().onload=null,t.dom.unbind(t.getWin()),t.dom.unbind(t.getDoc())),t.dom.unbind(t.getBody()),t.dom.unbind(t.getContainer())}};return n.extend({},e,o)}),e(Fe,[],function(){function n(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(e){}}function r(e,t){e._clickBlocker&&(e._clickBlocker.unbind(),e._clickBlocker=null),t?(e._clickBlocker=function(t){var e,n;return e=t.getBody(),n=function(e){0<t.dom.getParents(e.target,"a").length&&e.preventDefault()},t.dom.bind(e,"click",n),{unbind:function(){t.dom.unbind(e,"click",n)}}}(e),e.selection.controlSelection.hideResizeRect(),e.readonly=!0,e.getBody().contentEditable=!1):(e.readonly=!1,e.getBody().contentEditable=!0,n(e,"StyleWithCSS",!1),n(e,"enableInlineTableEditing",!1),n(e,"enableObjectResizing",!1),e.focus(),e.nodeChanged())}return{setMode:function(e,t){var n=e.readonly?"readonly":"design";t!=n&&(e.initialized?r(e,"readonly"==t):e.on("init",function(){r(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}}}),e(He,[d,i],function(u,c){var d=u.each,f=u.explode,h={f9:120,f10:121,f11:122},p=u.makeMap("alt,ctrl,shift,meta,access");return function(o){function a(e){var t,n,r={};for(n in d(f(e,"+"),function(e){e in p?r[e]=!0:/^[0-9]{2,}$/.test(e)?r.keyCode=parseInt(e,10):(r.charCode=e.charCodeAt(0),r.keyCode=h[e]||e.toUpperCase().charCodeAt(0))}),t=[r.keyCode],p)r[n]?t.push(n):r[n]=!1;return r.id=t.join(","),r.access&&(r.alt=!0,c.mac?r.ctrl=!0:r.shift=!0),r.meta&&(c.mac?r.meta=!0:(r.ctrl=!0,r.meta=!1)),r}function s(e,t,n,r){var i;return(i=u.map(f(e,">"),a))[i.length-1]=u.extend(i[i.length-1],{func:n,scope:r||o}),u.extend(i[0],{desc:o.translate(t),subpatterns:i.slice(1)})}function n(e,t){return!!t&&t.ctrl==e.ctrlKey&&t.meta==e.metaKey&&t.alt==e.altKey&&t.shift==e.shiftKey&&!!(e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode)&&(e.preventDefault(),!0)}function r(e){return e.func?e.func.call(e.scope):null}var l={},i=[];o.on("keyup keypress keydown",function(t){!function(e){return e.altKey||e.ctrlKey||e.metaKey}(t)&&!function(e){return"keydown"===e.type&&112<=e.keyCode&&e.keyCode<=123}(t)||t.isDefaultPrevented()||(d(l,function(e){if(n(t,e))return i=e.subpatterns.slice(0),"keydown"==t.type&&r(e),!0}),n(t,i[0])&&(1===i.length&&"keydown"==t.type&&r(i[0]),i.shift()))}),this.add=function(e,n,r,i){var t;return"string"==typeof(t=r)?r=function(){o.execCommand(t,!1,null)}:u.isArray(t)&&(r=function(){o.execCommand(t[0],t[1],t[2])}),d(f(u.trim(e.toLowerCase())),function(e){var t=s(e,n,r,i);l[t.id]=t}),!0},this.remove=function(e){var t=s(e);return!!l[t.id]&&(delete l[t.id],!0)}}}),e(Ue,[n,d,P],function(f,s,h){return function(l,a){function n(e,t,n,r){var i,o;(i=new XMLHttpRequest).open("POST",a.url),i.withCredentials=a.credentials,i.upload.onprogress=function(e){r(e.loaded/e.total*100)},i.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+i.status)},i.onload=function(){var e;return 200!=i.status?void n("HTTP Error: "+i.status):(e=JSON.parse(i.responseText))&&"string"==typeof e.location?void t(function(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}(a.basePath,e.location)):void n("Invalid JSON: "+i.responseText)},(o=new FormData).append("file",e.blob(),e.filename()),i.send(o)}function u(e,t){return{url:t,blobInfo:e,status:!0}}function c(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function d(e,t){s.each(o[e],function(e){e(t)}),delete o[e]}function r(o,a,s){return l.markPending(o.blobUri()),new f(function(t){function e(){}var n,r;try{var i=function(){n&&(n.close(),r=e)};r=function(e){e<0||100<e||(n=n||s()).progressBar.value(e)},a(function(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:h.constant(function(e){var t;return t={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"}[e.blob().type.toLowerCase()]||"dat",e.filename()+"."+t}(e))}}(o),function(e){i(),l.markUploaded(o.blobUri(),e),d(o.blobUri(),u(o,e)),t(u(o,e))},function(e){i(),l.removeFailed(o.blobUri()),d(o.blobUri(),c(o,e)),t(c(o,e))},r)}catch(e){t(c(o,e.message))}})}function i(e,t){return e=s.grep(e,function(e){return!l.isUploaded(e.blobUri())}),f.all(s.map(e,function(e){return l.isPending(e.blobUri())?function(e){var t=e.blobUri();return new f(function(e){o[t]=o[t]||[],o[t].push(e)})}(e):r(e,a.handler,t)}))}var o={};return a=s.extend({credentials:!1,handler:n},a),{upload:function(e,t){return!a.url&&function(e){return e===n}(a.handler)?new f(function(e){e([])}):i(e,t)}}}}),e(ze,[n],function(t){function o(e){var t,n;return e=decodeURIComponent(e).split(","),(n=/data:([^;]+)/.exec(e[0]))&&(t=n[1]),{type:t,data:e[1]}}return{uriToBlob:function(e){return 0===e.indexOf("blob:")?function(i){return new t(function(e,t){function n(){t("Cannot convert "+i+" to Blob. Resource might not exist or is inaccessible.")}try{var r=new XMLHttpRequest;r.open("GET",i,!0),r.responseType="blob",r.onload=function(){200==this.status?e(this.response):n()},r.onerror=n,r.send()}catch(e){n()}})}(e):0===e.indexOf("data:")?function(i){return new t(function(t){var e,n,r;i=o(i);try{e=atob(i.data)}catch(e){return void t(new Blob([]))}for(n=new Uint8Array(e.length),r=0;r<n.length;r++)n[r]=e.charCodeAt(r);t(new Blob([n],{type:i.type}))})}(e):null},blobToDataUri:function(n){return new t(function(e){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n)})},parseDataUri:o}}),e(Ve,[n,c,P,ze,i],function(s,l,u,c,d){function f(e){return(e||"blobid")+t++}var t=0;return function(i,a){var o={};return{findAll:function(e,n){var t,r;return n=n||u.constant(!0),t=l.filter(e.getElementsByTagName("img"),function(e){var t=e.src;return!!d.fileApi&&!e.hasAttribute("data-mce-bogus")&&!e.hasAttribute("data-mce-placeholder")&&!(!t||t==d.transparentSrc)&&(0===t.indexOf("blob:")?!i.isUploaded(t):0===t.indexOf("data:")&&n(e))}),r=l.map(t,function(n){var e;return o[n.src]?new s(function(t){o[n.src].then(function(e){return"string"==typeof e?e:void t({image:n,blobInfo:e.blobInfo})})}):(e=new s(function(e,t){!function(n,r,t){var i,o;0===n.src.indexOf("blob:")?(o=a.getByUri(n.src))?r({image:n,blobInfo:o}):c.uriToBlob(n.src).then(function(t){c.blobToDataUri(t).then(function(e){i=c.parseDataUri(e).data,o=a.create(f(),t,i),a.add(o),r({image:n,blobInfo:o})})},function(e){t(e)}):(i=c.parseDataUri(n.src).data,(o=a.findFirst(function(e){return e.base64()===i}))?r({image:n,blobInfo:o}):c.uriToBlob(n.src).then(function(e){o=a.create(f(),e,i),a.add(o),r({image:n,blobInfo:o})},function(e){t(e)}))}(n,e,t)}).then(function(e){return delete o[e.image.src],e}).catch(function(e){return delete o[n.src],e}),o[n.src]=e)}),s.all(r)}}}}),e(je,[c,P],function(r,o){return function(){function t(t){return e(function(e){return e.id()===t})}function e(e){return r.filter(n,e)[0]}var n=[],i=o.constant;return{create:function(e,t,n,r){return{id:i(e),filename:i(r||e),blob:i(t),base64:i(n),blobUri:i(URL.createObjectURL(t))}},add:function(e){t(e.id())||n.push(e)},get:t,getByUri:function(t){return e(function(e){return e.blobUri()==t})},findFirst:e,removeByUri:function(t){n=r.filter(n,function(e){return e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)})},destroy:function(){r.each(n,function(e){URL.revokeObjectURL(e.blobUri())}),n=[]}}}}),e(We,[],function(){return function(){function n(e,t){return{status:e,resultUri:t}}function t(e){return e in r}var r={};return{hasBlobUri:t,getResultUri:function(e){var t=r[e];return t?t.resultUri:null},isPending:function(e){return!!t(e)&&1===r[e].status},isUploaded:function(e){return!!t(e)&&2===r[e].status},markPending:function(e){r[e]=n(1,null)},markUploaded:function(e,t){r[e]=n(2,t)},removeFailed:function(e){delete r[e]},destroy:function(){r={}}}}}),e(qe,[x],function(e){function n(e,t){var n=function(e,t){for(var n in o.urls){if(o.urls[n]+"/plugin"+t+".js"===e)return n}return null}(t,e.suffix);return n?"Failed to load plugin: "+n+" from url "+t:"Failed to load plugin url: "+t}function r(e,t){e.notificationManager.open({type:"error",text:t})}function i(e,t){e._skinLoaded?r(e,t):e.on("SkinLoaded",function(){r(e,t)})}var o=e.PluginManager;return{pluginLoadError:function(e,t){i(e,n(e,t))},uploadError:function(e,t){i(e,"Failed to upload image: "+t)},displayError:i}}),e(Ge,[c,Ue,Ve,je,We,qe],function(v,y,b,x,$,w){return function(i){function n(t){return function(e){return i.selection?t(e):[]}}function r(e,t,n){for(var r=0;-1!==(r=e.indexOf(t,r))&&(e=e.substring(0,r)+n+e.substr(r+t.length),r+=n.length-t.length+1),-1!==r;);return e}function o(e,t,n){return r(e=r(e,'src="'+t+'"','src="'+n+'"'),'data-mce-src="'+t+'"','data-mce-src="'+n+'"')}function a(t,n){v.each(i.undoManager.data,function(e){"fragmented"===e.type?e.fragments=v.map(e.fragments,function(e){return o(e,t,n)}):e.content=o(e.content,t,n)})}function s(){return i.notificationManager.open({text:i.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}function l(e,t){p.removeByUri(e.src),a(e.src,t),i.$(e).attr({src:m.images_reuse_filename?t+"?"+(new Date).getTime():t,"data-mce-src":i.convertURL(t,"src")})}function t(t){return f=f||new y(g,{url:m.images_upload_url,basePath:m.images_upload_base_path,credentials:m.images_upload_credentials,handler:m.images_upload_handler}),c().then(n(function(r){var e;return e=v.map(r,function(e){return e.blobInfo}),f.upload(e,s).then(n(function(e){return e=v.map(e,function(e,t){var n=r[t].image;return e.status&&!1!==i.settings.images_replace_blob_uris?l(n,e.url):e.error&&w.uploadError(i,e.error),{element:n,status:e.status}}),t&&t(e),e}))}))}function e(e){if(!1!==m.automatic_uploads)return t(e)}function u(e){return!m.images_dataimg_filter||m.images_dataimg_filter(e)}function c(){return(h=h||new b(g,p)).findAll(i.getBody(),u).then(n(function(e){return e=v.filter(e,function(e){return"string"!=typeof e||(w.displayError(i,e),!1)}),v.each(e,function(e){a(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")}),e}))}function d(e){return e.replace(/src="(blob:[^"]+)"/g,function(e,n){var t=g.getResultUri(n);if(t)return'src="'+t+'"';var r=p.getByUri(n);return(r=r||v.reduce(i.editorManager.editors,function(e,t){return e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)},null))?'src="data:'+r.blob().type+";base64,"+r.base64()+'"':e})}var f,h,p=new x,m=i.settings,g=new $;return i.on("setContent",function(){!1!==i.settings.automatic_uploads?e():c()}),i.on("RawSaveContent",function(e){e.content=d(e.content)}),i.on("getContent",function(e){e.source_view||"raw"==e.format||(e.content=d(e.content))}),i.on("PostRender",function(){i.parser.addNodeFilter("img",function(e){v.each(e,function(e){var t=e.attr("src");if(!p.getByUri(t)){var n=g.getResultUri(t);n&&e.attr("src",n)}})})}),{blobCache:p,uploadImages:t,uploadImagesAuto:e,scanForImages:c,destroy:function(){p.destroy(),g.destroy(),h=f=null}}}}),e(Xe,[C,H,$,E,f,I,r],function(c,e,t,n,d,f,h){var p=t.isContentEditableFalse;return function(l,i){function o(){(function(){var e,t,n,r,i;for(e=d("*[contentEditable=false]",l),r=0;r<e.length;r++)n=(t=e[r]).previousSibling,c.endsWithCaretContainer(n)&&(1==(i=n.data).length?n.parentNode.removeChild(n):n.deleteData(i.length-1,1)),n=t.nextSibling,c.startsWithCaretContainer(n)&&(1==(i=n.data).length?n.parentNode.removeChild(n):n.deleteData(0,1))})(),u&&(c.remove(u),u=null),s&&(s.remove(),s=null),clearInterval(a)}var a,s,u;return{show:function(e,t){var n,r;return o(),i(t)?(u=c.insertBlock("p",t,e),n=function(e,t){var n,r,i,o,a,s=f.collapse(e.getBoundingClientRect(),t);return i="BODY"==l.tagName?(n=l.ownerDocument.documentElement,r=l.scrollLeft||n.scrollLeft,l.scrollTop||n.scrollTop):(a=l.getBoundingClientRect(),r=l.scrollLeft-a.left,l.scrollTop-a.top),s.left+=r,s.right+=r,s.top+=i,s.bottom+=i,s.width=1,0<(o=e.offsetWidth-e.clientWidth)&&(t&&(o*=-1),s.left+=o,s.right+=o),s}(t,e),d(u).css("top",n.top),s=d('<div class="mce-visual-caret" data-mce-bogus="all"></div>').css(n).appendTo(l),e&&s.addClass("mce-visual-caret-before"),a=h.setInterval(function(){d("div.mce-visual-caret",l).toggleClass("mce-visual-caret-hidden")},500),(r=t.ownerDocument.createRange()).setStart(u,0),r.setEnd(u,0)):(u=c.insertInline(t,e),r=t.ownerDocument.createRange(),p(u.nextSibling)?(r.setStart(u,0),r.setEnd(u,0)):(r.setStart(u,1),r.setEnd(u,1))),r},hide:o,getCss:function(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"},destroy:function(){h.clearInterval(a)}}}}),e(Ye,[c,$,I],function(i,o,a){return{getClientRects:function n(t){function e(e){return i.map(e,function(e){return(e=a.clone(e)).node=t,e})}if(i.isArray(t))return i.reduce(t,function(e,t){return e.concat(n(t))},[]);if(o.isElement(t))return e(t.getClientRects());if(o.isText(t)){var r=t.ownerDocument.createRange();return r.setStart(t,0),r.setEnd(t,t.data.length),e(r.getClientRects())}}}}),e(Ke,[P,c,Ye,L,ee,te,H,I],function(e,p,d,f,h,m,g,v){function t(i,o,a,e,s,t){function n(e){var t,n,r;for(r=d.getClientRects(e),-1==i&&(r=r.reverse()),t=0;t<r.length;t++)if(n=r[t],!a(n,l)){if(0<c.length&&o(n,p.last(c))&&u++,n.line=u,s(n))return!0;c.push(n)}}var r,l,u=0,c=[];return(l=p.last(t.getClientRects()))&&(n(r=t.getNode()),function(e,t,n,r){for(;r=h.findNode(r,e,f.isEditableCaretCandidate,t);)if(n(r))return}(i,e,n,r)),c}var n=e.curry;return{upUntil:n(t,-1,v.isAbove,v.isBelow),downUntil:n(t,1,v.isBelow,v.isAbove),positionsUntil:function(e,t,n,r){function i(e){return p.last(e.getClientRects())}var o,a,s,l,u,c,d=new m(t),f=[],h=0;c=i(l=1==e?(o=d.next,a=v.isBelow,s=v.isAbove,g.after(r)):(o=d.prev,a=v.isAbove,s=v.isBelow,g.before(r)));do{if(l.isVisible()&&!s(u=i(l),c)){if(0<f.length&&a(u,p.last(f))&&h++,(u=v.clone(u)).position=l,u.line=h,n(u))return f;f.push(u)}}while(l=o(l));return f},isAboveLine:n(function(e,t){return t.line>e}),isLine:n(function(e,t){return t.line===e})}}),e(Je,[P,c,$,Ye,I,ee,L],function(e,a,t,o,n,r,i){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function u(e,i){function o(e,t){return e>=t.left&&e<=t.right}return a.reduce(e,function(e,t){var n,r;return n=Math.min(s(e,i),l(e,i)),r=Math.min(s(t,i),l(t,i)),o(i,t)?t:o(i,e)?e:r==n&&f(t.node)?t:r<n?t:e})}function c(e,t,n,r){for(;r=h(r,e,i.isEditableCaretCandidate,t);)if(n(r))return}function d(e,r){function t(t,e){var n;return n=a.filter(o.getClientRects(e),function(e){return!t(e,r)}),i=i.concat(n),0===n.length}var i=[];return i.push(r),c(-1,e,p(t,n.isAbove),r.node),c(1,e,p(t,n.isBelow),r.node),i}var f=t.isContentEditableFalse,h=r.findNode,p=e.curry;return{findClosestClientRect:u,findLineNodeRects:d,closestCaret:function(e,t,n){var r,i;return r=o.getClientRects(function(e){return a.filter(a.toArray(e.getElementsByTagName("*")),f)}(e)),(i=u(r=a.filter(r,function(e){return n>=e.top&&n<=e.bottom}),t))&&((i=u(d(e,i),t))&&f(i.node))?function(e,t){return{node:e.node,before:s(e,t)<l(e,t)}}(i,t):null}}}),e(Ze,[],function(){function i(e){var t,n,r,i;return i=e.getBoundingClientRect(),n=(t=e.ownerDocument).documentElement,r=t.defaultView,{top:i.top+r.pageYOffset-n.clientTop,left:i.left+r.pageXOffset-n.clientLeft}}return{calc:function(e,t){return function(e,t,n){return{pageX:n.left-e.left+t.left,pageY:n.top-e.top+t.top}}(function(e){return e.inline?i(e.getBody()):{left:0,top:0}}(e),function(e){var t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}}(e),function(e,t){if(t.target.ownerDocument===e.getDoc())return{left:t.pageX,top:t.pageY};var n=i(e.getContentAreaContainer()),r=function(e){var t=e.getBody(),n=e.getDoc().documentElement,r={left:t.scrollLeft,top:t.scrollTop},i={left:t.scrollLeft||n.scrollLeft,top:t.scrollTop||n.scrollTop};return e.inline?r:i}(e);return{left:t.pageX-n.left+r.left,top:t.pageY-n.top+r.top}}(e,t))}}}),e(Qe,[$,c,P,r,y,Ze],function(e,s,l,u,c,d){function o(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function f(o,a){return function(e){if(function(e){return 0===e.button}(e)){var t=s.find(a.dom.getParents(e.target),l.or(p,m));if(function(e,t){return p(t)&&t!==e}(a.getBody(),t)){var n=a.dom.getPos(t),r=a.getBody(),i=a.getDoc().documentElement;o.element=t,o.screenX=e.screenX,o.screenY=e.screenY,o.maxX=(a.inline?r.scrollWidth:i.offsetWidth)-2,o.maxY=(a.inline?r.scrollHeight:i.offsetHeight)-2,o.relX=e.pageX-n.x,o.relY=e.pageY-n.y,o.width=t.offsetWidth,o.height=t.offsetHeight,o.ghost=function(e,t,n,r){var i=t.cloneNode(!0);e.dom.setStyles(i,{width:n,height:r}),e.dom.setAttrib(i,"data-mce-selected",null);var o=e.dom.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return e.dom.setStyles(o,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),e.dom.setStyles(i,{margin:0,boxSizing:"border-box"}),o.appendChild(i),o}(a,t,o.width,o.height)}}}}function h(r,i){return function(e){if(r.dragging&&function(e,t,n){return t!==n&&!e.dom.isChildOf(t,n)&&!p(t)}(i,function(e){var t=e.getSel().getRangeAt(0).startContainer;return 3===t.nodeType?t.parentNode:t}(i.selection),r.element)){var t=function(e){var t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t}(r.element),n=i.fire("drop",{targetClone:t,clientX:e.clientX,clientY:e.clientY});n.isDefaultPrevented()||(t=n.targetClone,i.undoManager.transact(function(){o(r.element),i.insertContent(i.dom.getOuterHTML(t)),i._selectionOverrides.hideFakeCaret()}))}g(r)}}function t(e){var t,n,r,i,o,a,s={};t=c.DOM,a=document,n=f(s,e),r=function(r,i){var o=u.throttle(function(e,t){i._selectionOverrides.hideFakeCaret(),i.selection.placeCaretAt(e,t)},0);return function(e){var t=Math.max(Math.abs(e.screenX-r.screenX),Math.abs(e.screenY-r.screenY));if(function(e){return e.element}(r)&&!r.dragging&&10<t){if(i.fire("dragstart",{target:r.element}).isDefaultPrevented())return;r.dragging=!0,i.focus()}if(r.dragging){var n=function(e,t){return{pageX:t.pageX-e.relX,pageY:t.pageY+5}}(r,d.calc(i,e));(function(e,t){e.parentNode!==t&&t.appendChild(e)})(r.ghost,i.getBody()),function(e,t,n,r,i,o){var a=0,s=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+n>i&&(a=t.pageX+n-i),t.pageY+r>o&&(s=t.pageY+r-o),e.style.width=n-a+"px",e.style.height=r-s+"px"}(r.ghost,n,r.width,r.height,r.maxX,r.maxY),o(e.clientX,e.clientY)}}}(s,e),i=h(s,e),o=function(e,t){return function(){g(e),e.dragging&&t.fire("dragend")}}(s,e),e.on("mousedown",n),e.on("mousemove",r),e.on("mouseup",i),t.bind(a,"mousemove",r),t.bind(a,"mouseup",o),e.on("remove",function(){t.unbind(a,"mousemove",r),t.unbind(a,"mouseup",o)})}var p=e.isContentEditableFalse,m=e.isContentEditableTrue,g=function(e){e.dragging=!1,e.element=null,o(e.ghost)};return{init:function(e){t(e),function(n){n.on("drop",function(e){var t=void 0!==e.clientX?n.getDoc().elementFromPoint(e.clientX,e.clientY):null;(p(t)||p(n.dom.getContentEditableParent(t)))&&e.preventDefault()})}(e)}}}),e(et,[i,te,H,C,ee,Xe,Ke,Je,$,E,I,M,P,c,r,Qe],function(X,Y,K,J,Z,Q,ee,te,ne,e,re,ie,oe,ae,se,le){function ue(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}var ce=oe.curry,de=ne.isContentEditableTrue,fe=ne.isContentEditableFalse,he=ne.isElement,pe=Z.isAfterContentEditableFalse,me=Z.isBeforeContentEditableFalse,ge=e.getSelectedNode;return function(h){function l(e){return h.dom.isBlock(e)}function r(e){e&&h.selection.setRng(e)}function i(){return h.selection.getRng()}function o(e,t){h.selection.scrollIntoView(e,t)}function p(e,t,n){return h.fire("ShowCaret",{target:t,direction:e,before:n}).isDefaultPrevented()?null:(o(t,-1===e),H.show(n,t))}function u(e){return h.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?null:function(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}(e)}function m(e,t){return t=Z.normalizeRange(e,P,t),-1==e?K.fromRangeStart(t):K.fromRangeEnd(t)}function a(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=ge(r),fe(i))?p(e,i,-1==e):(s=function(e){return J.isCaretContainerBlock(e.startContainer)}(r),n(o=m(e,r))?u(o.getNode(-1==e)):(o=t(o))?n(o)?p(e,o.getNode(-1==e),1==e):n(a=t(o))&&function(e,t){var n=Z.isInSameBlock(e,t);return!(n||!ne.isBr(e.getNode()))||n}(o,a)?p(e,a.getNode(-1==e),1==e):s?g(o.toRange()):null:s?r:null)}function s(e,t){var n,r,i;if(t.collapsed&&h.settings.forced_root_block){if(!(n=h.dom.getParent(t.startContainer,"PRE")))return;(1==e?I(K.fromRangeStart(t)):F(K.fromRangeStart(t)))||(i=h.dom.create(h.settings.forced_root_block),(!X.ie||11<=X.ie)&&(i.innerHTML='<br data-mce-bogus="1">'),r=i,1==e?h.$(n).after(r):h.$(n).before(r),h.selection.select(r,!0),h.selection.collapse())}}function e(e,t,n,r){var i;return(i=a(e,t,n,r))?i:(i=s(e,r))||null}function t(e,t,n){var r;return(r=function(e,t,n){var r,i,o,a,s,l,u,c,d;if(d=ge(n),r=m(e,n),i=t(P,ee.isAboveLine(1),r),o=ae.filter(i,ee.isLine(1)),s=ae.last(r.getClientRects()),me(r)&&(d=r.getNode()),pe(r)&&(d=r.getNode(!0)),!s)return null;if(l=s.left,(a=te.findClosestClientRect(o,l))&&fe(a.node))return u=Math.abs(l-a.left),c=Math.abs(l-a.right),p(e,a.node,u<c);if(d){var f=ee.positionsUntil(e,P,ee.isAboveLine(1),d);if(a=te.findClosestClientRect(ae.filter(f,ee.isLine(1)),l))return g(a.position.toRange());if(a=ae.last(ae.filter(f,ee.isLine(0))))return g(a.position.toRange())}}(e,t,n))?r:(r=s(e,n))||null}function n(e){e.hasAttribute("data-mce-caret")&&(J.showCaretContainerBlock(e),r(i()),o(e[0]))}function c(e){var t,n;return e=Z.normalizeRange(1,P,e),t=K.fromRangeStart(e),fe(t.getNode())?p(1,t.getNode(),!t.isAtEnd()):fe(t.getNode(!0))?p(1,t.getNode(!0),!1):(n=h.dom.getParent(t.getNode(),oe.or(fe,de)),fe(n)?p(1,n,!1):null)}function g(e){return e&&e.collapsed?c(e)||e:e}function d(e){var t,n,r,i;return fe(e)?(fe(e.previousSibling)&&(r=e.previousSibling),(n=F(K.before(e)))||(t=I(K.after(e))),t&&he(t.getNode())&&(i=t.getNode()),J.remove(e.previousSibling),J.remove(e.nextSibling),h.dom.remove(e),h.dom.isEmpty(h.getBody())?(h.setContent(""),void h.focus()):r?K.after(r).toRange():i?K.before(i).toRange():n?n.toRange():t?t.toRange():null):null}function f(e){var t=h.schema.getTextBlockElements();return e.nodeName in t}function v(e){return h.dom.isEmpty(e)}function y(e,t,n){var r,i,o,a,s=h.dom;if(r=s.getParent(t.getNode(),s.isBlock),i=s.getParent(n.getNode(),s.isBlock),-1===e){if(a=n.getNode(!0),pe(n)&&l(a))return f(r)?(v(r)&&s.remove(r),K.after(a).toRange()):d(n.getNode(!0))}else if(a=t.getNode(),me(t)&&l(a))return f(i)?(v(i)&&s.remove(i),K.before(a).toRange()):d(t.getNode());if(r===i||!f(r)||!f(i))return null;for(;o=r.firstChild;)i.appendChild(o);return h.dom.remove(r),n.toRange()}function b(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=ge(r),fe(i))?g(d(i)):n(o=m(e,r))&&J.isCaretContainerBlock(r.startContainer)?(s=-1==e?L.prev(o):L.next(o))?g(s.toRange()):r:t(o)?g(d(o.getNode(-1==e))):t(a=-1==e?L.prev(o):L.next(o))?-1===e?y(e,o,a):y(e,a,o):void 0}function x(e){return J.isCaretContainer(e)||J.startsWithCaretContainer(e)||J.endsWithCaretContainer(e)}function $(e){return x(e.startContainer)||x(e.endContainer)}function w(e){var t,n,r,i,o,a,s,l,u,c,d=h.$,f=h.dom;if(!e)return null;if(e.collapsed){if(!$(e)){if(l=m(1,e),fe(l.getNode()))return p(1,l.getNode(),!l.isAtEnd());if(fe(l.getNode(!0)))return p(1,l.getNode(!0),!1)}return null}return i=e.startContainer,o=e.startOffset,a=e.endOffset,3==i.nodeType&&0==o&&fe(i.parentNode)&&(i=i.parentNode,o=f.nodeIndex(i),i=i.parentNode),1!=i.nodeType?null:(a==o+1&&(t=i.childNodes[o]),fe(t)?(u=c=t.cloneNode(!0),(s=h.fire("ObjectSelected",{target:t,targetClone:u})).isDefaultPrevented()?null:(u=s.targetClone,0===(n=d("#"+U)).length&&(n=d('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>').attr("id",U)).appendTo(h.getBody()),e=h.dom.createRng(),u===c&&X.ie?(n.empty().append('<p style="font-size: 0" data-mce-bogus="all"> </p>').append(u),e.setStartAfter(n[0].firstChild.firstChild),e.setEndAfter(u)):(n.empty().append(" ").append(u).append(" "),e.setStart(n[0].firstChild,1),e.setEnd(n[0].lastChild,0)),n.css({top:f.getPos(t,h.getBody()).y}),n[0].focus(),(r=h.selection.getSel()).removeAllRanges(),r.addRange(e),h.$("*[data-mce-selected]").removeAttr("data-mce-selected"),t.setAttribute("data-mce-selected",1),S=t,E(),e)):null)}function C(){S&&(S.removeAttribute("data-mce-selected"),h.$("#"+U).remove(),S=null)}function E(){H.hide()}var S,_,k,N,T,A,R,B,D,M,O,P=h.getBody(),L=new Y(P),I=ce(ue,L.next),F=ce(ue,L.prev),H=new Q(h.getBody(),l),U="sel-"+h.dom.uniqueId(),z=h.$;return X.ceFalse&&(A=ce(e,1,I,me),R=ce(e,-1,F,pe),B=ce(b,1,me,pe),D=ce(b,-1,pe,me),M=ce(t,-1,ee.upUntil),O=ce(t,1,ee.downUntil),h.on("mouseup",function(){var e=i();e.collapsed&&r(c(e))}),h.on("click",function(e){var t;(t=j(e.target))&&(fe(t)&&(e.preventDefault(),h.focus()),de(t)&&h.dom.isChildOf(t,h.selection.getNode())&&C())}),h.on("blur NewBlock",function(){C(),E()}),T=!1,(N=h).on("touchstart",function(){T=!1}),N.on("touchmove",function(){T=!0}),N.on("touchend",function(e){var t=j(e.target);fe(t)&&(T||(e.preventDefault(),w(u(t))))}),h.on("mousedown",function(e){var t;if(t=j(e.target))fe(t)?(e.preventDefault(),w(u(t))):function(n,r,e){return!e.collapsed&&ae.reduce(e.getClientRects(),function(e,t){return e||re.containsXY(t,n,r)},!1)}(e.clientX,e.clientY,h.selection.getRng())||h.selection.placeCaretAt(e.clientX,e.clientY);else{C(),E();var n=te.closestCaret(P,e.clientX,e.clientY);n&&(G(e.target,n.node)||(e.preventDefault(),h.getBody().focus(),r(p(1,n.node,n.before))))}}),h.on("keydown",function(e){if(!ie.modifierPressed(e))switch(e.keyCode){case ie.RIGHT:V(e,A);break;case ie.DOWN:V(e,O);break;case ie.LEFT:V(e,R);break;case ie.UP:V(e,M);break;case ie.DELETE:V(e,B);break;case ie.BACKSPACE:V(e,D);break;default:fe(h.selection.getNode())&&function(e){return!(112<=e.keyCode&&e.keyCode<=123)}(e)&&e.preventDefault()}}),h.on("keyup compositionstart",function(e){q(e),function(e){var t;switch(e.keyCode){case ie.DELETE:t=W();break;case ie.BACKSPACE:t=W()}t&&e.preventDefault()}(e)},!0),h.on("cut",function(){var e=h.selection.getNode();fe(e)&&se.setEditorTimeout(h,function(){r(g(d(e)))})}),h.on("getSelectionRange",function(e){var t=e.range;if(S){if(!S.parentNode)return void(S=null);(t=t.cloneRange()).selectNode(S),e.range=t}}),h.on("setSelectionRange",function(e){var t;(t=w(e.range))&&(e.range=t)}),h.on("AfterSetSelectionRange",function(e){var t=e.range;$(t)||E(),function(e){return h.dom.hasClass(e,"mce-offscreen-selection")}(t.startContainer.parentNode)||C()}),h.on("focus",function(){se.setEditorTimeout(h,function(){h.selection.setRng(g(h.selection.getRng()))},0)}),h.on("copy",function(e){var t=e.clipboardData;if(!e.isDefaultPrevented()&&e.clipboardData&&!X.ie){var n=function(){var e=h.dom.get(U);return e?e.getElementsByTagName("*")[0]:e}();n&&(e.preventDefault(),t.clearData(),t.setData("text/html",n.outerHTML),t.setData("text/plain",n.outerText))}}),le.init(h),_=h.contentStyles,k=".mce-content-body",_.push(H.getCss()),_.push(k+" .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}"+k+" *[contentEditable=false] {cursor: default;}"+k+" *[contentEditable=true] {cursor: text;}")),{showBlockCaretContainer:n,hideFakeCaret:E,destroy:function(){H.destroy(),S=null}};function V(e,t){if(!1===e.isDefaultPrevented()){var n=t(i());n&&(e.preventDefault(),r(n))}}function j(e){for(var t=h.getBody();e&&e!=t;){if(de(e)||fe(e))return e;e=e.parentNode}return null}function W(){var e,t=j(h.selection.getNode());de(t)&&l(t)&&h.dom.isEmpty(t)&&(e=h.dom.create("br",{"data-mce-bogus":"1"}),h.$(t).empty().append(e),h.selection.setRng(K.before(e).toRange()))}function q(e){var t=z("*[data-mce-caret]")[0];if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void n(t)):void(J.hasContent(t)&&n(t))}function G(e,t){var n=h.dom.getParent(e,h.dom.isBlock),r=h.dom.getParent(t,h.dom.isBlock);return n&&!function(e,t){return h.dom.getParent(e,h.dom.isBlock)===h.dom.getParent(t,h.dom.isBlock)}(n,r)&&function(e){var t=new Y(e);if(!e.firstChild)return!1;var n=K.before(e.firstChild),r=t.next(n);return r&&!me(r)&&!pe(r)}(n)}}}),e(tt,[],function(){var t=0;return{uuid:function(e){return e+t+++function(){function e(){return Math.round(4294967295*Math.random()).toString(36)}return"s"+(new Date).getTime().toString(36)+e()+e()+e()}()}}}),e(nt,[],function(){return{add:function(e,t,n){var r=e.sidebars?e.sidebars:[];r.push({name:t,settings:n}),e.sidebars=r}}}),e(rt,[y,f,x,S,_,B,R,V,G,J,Z,Q,ie,oe,b,a,Ae,Oe,k,T,Le,i,d,r,Ie,Fe,He,Ge,et,tt,nt,qe],function(a,s,l,u,c,d,f,h,p,m,g,v,y,b,o,e,x,$,w,C,E,S,_,k,t,n,N,T,A,i,r,R){function B(e,t,n){var r,i,o,a=this;r=a.documentBaseUrl=n.documentBaseURL,i=n.baseURI,o=n.defaultSettings,t=P({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:r,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:a.convertURL,url_converter_scope:a,ie7_compat:!0},o,t),o&&o.external_plugins&&t.external_plugins&&(t.external_plugins=P({},o.external_plugins,t.external_plugins)),a.settings=t,l.language=t.language||"en",l.languageLoad=t.language_load,l.baseURL=n.baseURL,a.id=t.id=e,a.setDirty(!1),a.plugins={},a.documentBaseURI=new b(t.document_base_url||r,{base_uri:i}),a.baseURI=i,a.contentCSS=[],a.contentStyles=[],a.shortcuts=new N(a),a.loadedCSS={},a.editorCommands=new y(a),a.suffix=n.suffix,a.editorManager=n,a.inline=t.inline,a.settings.content_editable=a.inline,t.cache_suffix&&(S.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),!1===t.override_viewport&&(S.overrideViewPort=!1),n.fire("SetupEditor",a),a.execCallback("setup",a),a.$=s.overrideDefaults(function(){return{context:a.inline?a.getBody():a.getDoc(),element:a.getBody()}})}var D=a.DOM,M=l.ThemeManager,O=l.PluginManager,P=_.extend,L=_.each,I=_.explode,F=_.inArray,H=_.trim,U=_.resolve,z=e.Event,V=S.gecko,j=S.ie;return P(B.prototype={render:function(){var n=this,r=n.settings,e=n.id,i=n.suffix;if(z.domLoaded){if(n.getElement()&&S.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var t=n.getElement().form||D.getParent(e,"form");t&&(n.formElement=t,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(D.insertAfter(D.create("input",{type:"hidden",name:e}),e),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},D.bind(t,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||t.submit.nodeType||t.submit.length||t._mceOldSubmit||(t._mceOldSubmit=t.submit,t.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),t._mceOldSubmit(t)})),n.windowManager=new x(n),n.notificationManager=new $(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=D.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),function(){var e=o.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!M.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+i+".js",M.load(r.theme,t)}_.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),L(r.external_plugins,function(e,t){O.load(t,e),r.plugins+=" "+t}),L(r.plugins.split(/[ ,]/),function(e){if((e=H(e))&&!O.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=O.dependencies(e);L(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+i+".js"};e=O.createUrl(t,e),O.load(e.resource,e)})}else O.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+i+".js"})}),e.loadQueue(function(){n.removed||n.init()},n,function(e){R.pluginLoadError(n,e[0]),n.removed||n.init()})}()}}else D.bind(window,"ready",function e(){D.unbind(window,"ready",e),n.render()})},init:function(){var e,t,n,r,i,o,a,s,l,u,c,d=this,f=d.settings,h=d.getElement(),p=[];if(d.rtl=f.rtl_ui||d.editorManager.i18n.rtl,d.editorManager.i18n.setCode(f.language),f.aria_label=f.aria_label||D.getAttrib(h,"aria-label",d.getLang("aria.rich_text_area")),d.fire("ScriptsLoaded"),f.theme&&("function"!=typeof f.theme?(f.theme=f.theme.replace(/-/,""),o=M.get(f.theme),d.theme=new o(d,M.urls[f.theme]),d.theme.init&&d.theme.init(d,M.urls[f.theme]||d.documentBaseUrl.replace(/\/$/,""),d.$)):d.theme=f.theme),L(f.plugins.replace(/\-/g,"").split(/[ ,]/),function t(e){var n,r,i=O.get(e);if(n=O.urls[e]||d.documentBaseUrl.replace(/\/$/,""),e=H(e),i&&-1===F(p,e)){if(L(O.dependencies(e),function(e){t(e)}),d.plugins[e])return;r=new i(d,n,d.$),(d.plugins[e]=r).init&&(r.init(d,n),p.push(e))}}),f.render_ui&&d.theme&&(d.orgDisplay=h.style.display,"function"!=typeof f.theme?(e=f.width||h.style.width||h.offsetWidth,t=f.height||h.style.height||h.offsetHeight,n=f.min_height||100,(u=/^[0-9\.]+(|px)$/i).test(""+e)&&(e=Math.max(parseInt(e,10),100)),u.test(""+t)&&(t=Math.max(parseInt(t,10),n)),i=d.theme.renderUI({targetNode:h,width:e,height:t,deltaWidth:f.delta_width,deltaHeight:f.delta_height}),f.content_editable||(t=(i.iframeHeight||t)+("number"==typeof t?i.deltaHeight||0:""))<n&&(t=n)):((i=f.theme(d,h)).editorContainer.nodeType&&(i.editorContainer.id=i.editorContainer.id||d.id+"_parent"),i.iframeContainer.nodeType&&(i.iframeContainer.id=i.iframeContainer.id||d.id+"_iframecontainer"),t=i.iframeHeight||h.offsetHeight),d.editorContainer=i.editorContainer),f.content_css&&L(I(f.content_css),function(e){d.contentCSS.push(d.documentBaseURI.toAbsolute(e))}),f.content_style&&d.contentStyles.push(f.content_style),f.content_editable)return h=r=i=null,d.initContentBody();if(d.iframeHTML=f.doctype+"<html><head>",f.document_base_url!=d.documentBaseUrl&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),!S.caretAfter&&f.ie7_compat&&(d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',!/#$/.test(document.location.href))for(c=0;c<d.contentCSS.length;c++){var m=d.contentCSS[c];d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+_._addCacheSuffix(m)+'" />',d.loadedCSS[m]=!0}-1!=(s=f.body_id||"tinymce").indexOf("=")&&(s=(s=d.getParam("body_id","","hash"))[d.id]||s),-1!=(l=f.body_class||"").indexOf("=")&&(l=(l=d.getParam("body_class","","hash"))[d.id]||""),f.content_security_policy&&(d.iframeHTML+='<meta http-equiv="Content-Security-Policy" content="'+f.content_security_policy+'" />'),d.iframeHTML+='</head><body id="'+s+'" class="mce-content-body '+l+'" data-id="'+d.id+'"><br></body></html>';var g='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&S.ie&&S.ie<12&&(a=g);var v=D.create("iframe",{id:d.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:d.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:t,display:"block"}});if(v.onload=function(){v.onload=null,d.fire("load")},D.setAttrib(v,"src",a||'javascript:""'),d.contentAreaContainer=i.iframeContainer,d.iframeElement=v,r=D.add(i.iframeContainer,v),j)try{d.getDoc()}catch(e){r.src=a=g}i.editorContainer&&(D.get(i.editorContainer).style.display=d.orgDisplay,d.hidden=D.isHidden(i.editorContainer)),d.getElement().style.display="none",D.setAttrib(d.id,"aria-hidden",!0),a||d.initContentBody(),h=r=i=null},initContentBody:function(e){var t,n,s=this,r=s.settings,i=s.getElement(),o=s.getDoc();r.inline||(s.getElement().style.visibility=s.orgVisibility),e||r.content_editable||(o.open(),o.write(s.iframeHTML),o.close()),r.content_editable&&(s.on("remove",function(){var e=this.getBody();D.removeClass(e,"mce-content-body"),D.removeClass(e,"mce-edit-focus"),D.setAttrib(e,"contentEditable",null)}),D.addClass(i,"mce-content-body"),s.contentDocument=o=r.content_document||document,s.contentWindow=r.content_window||window,s.bodyElement=i,r.content_document=r.content_window=null,r.root_name=i.nodeName.toLowerCase()),(t=s.getBody()).disabled=!0,s.readonly=r.readonly,s.readonly||(s.inline&&"static"==D.getStyle(t,"position",!0)&&(t.style.position="relative"),t.contentEditable=s.getParam("content_editable_state",!0)),t.disabled=!1,s.editorUpload=new T(s),s.schema=new w(r),s.dom=new a(o,{keep_values:!0,url_converter:s.convertURL,url_converter_scope:s,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:s.inline?s.getBody():null,collect:r.content_editable,schema:s.schema,onSetAttrib:function(e){s.fire("SetAttrib",e)}}),s.parser=new C(r,s.schema),s.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,r,i,o=e.length,a=s.dom;o--;)if(r=(n=e[o]).attr(t),i="data-mce-"+t,!n.attributes.map[i]){if(0===r.indexOf("data:")||0===r.indexOf("blob:"))continue;"style"===t?((r=a.serializeStyle(a.parseStyle(r),n.name)).length||(r=null),n.attr(i,r),n.attr(t,r)):"tabindex"===t?(n.attr(i,r),n.attr(t,null)):n.attr(i,s.convertURL(r,t,n.name))}}),s.parser.addNodeFilter("script",function(e){for(var t,n,r=e.length;r--;)0!==(n=(t=e[r]).attr("type")||"no/type").indexOf("mce-")&&t.attr("type","mce-"+n)}),s.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),s.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,r=s.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(r)&&0===t.getAll("br").length&&(t.append(new c("br",1)).shortEnded=!0)}),s.serializer=new d(r,s),s.selection=new h(s.dom,s.getWin(),s.serializer,s),s.formatter=new p(s),s.undoManager=new m(s),s.forceBlocks=new v(s),s.enterKey=new g(s),s._nodeChangeDispatcher=new u(s),s._selectionOverrides=new A(s),s.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(o.body.spellcheck=!1,D.setAttrib(t,"spellcheck","false")),s.quirks=new E(s),s.fire("PostRender"),r.directionality&&(t.dir=r.directionality),r.nowrap&&(t.style.whiteSpace="nowrap"),r.protect&&s.on("BeforeSetContent",function(t){L(r.protect,function(e){t.content=t.content.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),s.on("SetContent",function(){s.addVisual(s.getBody())}),r.padd_empty_editor&&s.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|<br \/>|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),s.load({initial:!0,format:"html"}),s.startContent=s.getContent({format:"raw"}),s.initialized=!0,s.bindPendingEventDelegates(),s.fire("init"),s.focus(!0),s.nodeChanged({initial:!0}),s.execCallback("init_instance_callback",s),s.on("compositionstart compositionend",function(e){s.composing="compositionstart"===e.type}),0<s.contentStyles.length&&(n="",L(s.contentStyles,function(e){n+=e+"\r\n"}),s.dom.addStyle(n)),L(s.contentCSS,function(e){s.loadedCSS[e]||(s.dom.loadCSS(e),s.loadedCSS[e]=!0)}),r.auto_focus&&k.setEditorTimeout(s,function(){var e;(e=!0===r.auto_focus?s:s.editorManager.get(r.auto_focus)).destroyed||e.focus()},100),i=o=t=null},focus:function(e){var t,n,r,i,o=this,a=o.selection,s=o.settings.content_editable,l=o.getDoc(),u=o.getBody();if(!e){if((t=a.getRng()).item&&(n=t.item(0)),o.quirks.refreshContentEditable(),i=a.getNode(),r=o.dom.getParent(i,function(e){return"true"===o.dom.getContentEditable(e)}),o.$.contains(u,r))return r.focus(),a.normalize(),void o.editorManager.setActive(o);if(s||(S.opera||o.getBody().focus(),o.getWin().focus()),V||s){if(u.setActive)try{u.setActive()}catch(e){u.focus()}else u.focus();s&&a.normalize()}n&&n.ownerDocument==l&&((t=l.body.createControlRange()).addElement(n),t.select())}o.editorManager.setActive(o)},execCallback:function(e){var t,n=this.settings[e];if(n)return this.callbackLookup&&(t=this.callbackLookup[e])&&(n=t.func,t=t.scope),"string"==typeof n&&(t=(t=n.replace(/\.\w+$/,""))?U(t):0,n=U(n),this.callbackLookup=this.callbackLookup||{},this.callbackLookup[e]={func:n,scope:t}),n.apply(t||this,Array.prototype.slice.call(arguments,1))},translate:function(e){var n=this.settings.language||"en",r=this.editorManager.i18n;return e?(e=r.data[n+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,t){return r.data[n+"."+t]||"{#"+t+"}"}),this.editorManager.translate(e)):""},getLang:function(e,t){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(t!==ye?t:"{#"+e+"}")},getParam:function(e,t,n){var r,i=e in this.settings?this.settings[e]:t;return"hash"===n?(r={},"string"==typeof i?L(0<i.indexOf("=")?i.split(/[;,](?![^=;,]*(?:[;,]|$))/):i.split(","),function(e){1<(e=e.split("=")).length?r[H(e[0])]=H(e[1]):r[H(e[0])]=H(e)}):r=i,r):i},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addSidebar:function(e,t){return r.add(this,e,t)},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n,r=this;r.contextToolbars=r.contextToolbars||[],"string"==typeof e&&(n=e,e=function(e){return r.dom.is(e,n)}),r.contextToolbars.push({id:i.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){this.hidden&&(this.hidden=!1,this.inline?this.getBody().contentEditable=!0:(D.show(this.getContainer()),D.hide(this.id)),this.load(),this.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(j&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(D.hide(e.getContainer()),D.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var t,n=this.getElement();if(n)return(e=e||{}).load=!0,t=this.setContent(n.value!==ye?n.value:n.innerHTML,e),e.element=n,e.no_events||this.fire("LoadContent",e),e.element=n=null,t},save:function(e){var t,n,r=this,i=r.getElement();if(i&&r.initialized)return(e=e||{}).save=!0,e.element=i,e.content=r.getContent(e),e.no_events||r.fire("SaveContent",e),"raw"==e.format&&r.fire("RawSaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(i.nodeName)?i.value=t:(r.inline||(i.innerHTML=t),(n=D.getParent(r.id,"form"))&&L(n.elements,function(e){if(e.name==r.id)return e.value=t,!1})),e.element=i=null,!1!==e.set_dirty&&r.setDirty(!1),t},setContent:function(e,t){var n,r,i=this,o=i.getBody();return(t=t||{}).format=t.format||"html",t.set=!0,t.content=e,t.no_events||i.fire("BeforeSetContent",t),0===(e=t.content).length||/^\s+$/.test(e)?(r=j&&j<11?"":'<br data-mce-bogus="1">',"TABLE"==o.nodeName?e="<tr><td>"+r+"</td></tr>":/^(UL|OL)$/.test(o.nodeName)&&(e="<li>"+r+"</li>"),(n=i.settings.forced_root_block)&&i.schema.isValidChild(o.nodeName.toLowerCase(),n.toLowerCase())?(e=r,e=i.dom.createHTML(n,i.settings.forced_root_block_attrs,e)):j||e||(e='<br data-mce-bogus="1">'),i.dom.setHTML(o,e),i.fire("SetContent",t)):("raw"!==t.format&&(e=new f({validate:i.validate},i.schema).serialize(i.parser.parse(e,{isRootContent:!0}))),t.content=H(e),i.dom.setHTML(o,t.content),t.no_events||i.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this.getBody();return(e=e||{}).format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||this.fire("BeforeGetContent",e),t="raw"==e.format?_.trim(this.serializer.getTrimmedContent()):"text"==e.format?n.innerText||n.textContent:this.serializer.serialize(n,e),"text"!=e.format?e.content=H(t):e.content=t,e.no_events||this.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=P({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){n.setMode(this,e)},getContainer:function(){return this.container||(this.container=D.get(this.editorContainer||this.id+"_parent")),this.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=D.get(this.id)),this.targetElm},getWin:function(){var e;return this.contentWindow||(e=this.iframeElement)&&(this.contentWindow=e.contentWindow),this.contentWindow},getDoc:function(){var e;return this.contentDocument||(e=this.getWin())&&(this.contentDocument=e.document),this.contentDocument},getBody:function(){var e=this.getDoc();return this.bodyElement||(e?e.body:null)},convertURL:function(e,t,n){var r=this.settings;return r.urlconverter_callback?this.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?this.documentBaseURI.toRelative(e):e=this.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var n,r=this,i=r.settings,o=r.dom;e=e||r.getBody(),r.hasVisual===ye&&(r.hasVisual=i.visual),L(o.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=i.visual_table_class||"mce-item-table",void((t=o.getAttrib(e,"border"))&&"0"!=t||!r.hasVisual?o.removeClass(e,n):o.addClass(e,n));case"A":return void(o.getAttrib(e,"href",!1)||(t=o.getAttrib(e,"name")||e.id,n=i.visual_anchor_class||"mce-item-anchor",t&&r.hasVisual?o.addClass(e,n):o.removeClass(e,n)))}}),r.fire("VisualAid",{element:e,hasVisual:r.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&D.remove(e.getElement().nextSibling),e.inline||(j&&j<10&&e.getDoc().execCommand("SelectAll",!1,null),D.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),D.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t,n=this;if(!n.destroyed){if(!e&&!n.removed)return void n.remove();e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),(t=n.formElement)&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),D.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},t),B}),e(it,[d],function(a){var s={},l="en";return{setCode:function(e){e&&(l=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return l},rtl:!1,add:function(e,t){var n=s[e];for(var r in n||(s[e]=n={}),t)n[r]=t[r];this.setCode(e)},translate:function(e){function n(e){return a.is(e,"function")?Object.prototype.toString.call(e):t(e)?"":""+e}function t(e){return""===e||null===e||a.is(e,"undefined")}function r(e){return e=n(e),a.hasOwn(i,e)?n(i[e]):e}var i=s[l]||{};if(t(e))return"";if(a.is(e,"object")&&a.hasOwn(e,"raw"))return n(e.raw);if(a.is(e,"array")){var o=e.slice(1);e=r(e[0]).replace(/\{([0-9]+)\}/g,function(e,t){return a.hasOwn(o,t)?n(o[t]):e})}return r(e).replace(/{context:\w+}$/,"")},data:s}}),e(ot,[y,r,i],function(e,t,o){function r(i){function r(){try{return document.activeElement}catch(e){return document.body}}i.on("AddEditor",function(e){var n=e.editor;n.on("init",function(){(n.inline||o.ie)&&("onbeforedeactivate"in document&&o.ie<9?n.dom.bind(n.getBody(),"beforedeactivate",function(e){if(e.target==n.getBody())try{n.lastRng=n.selection.getRng()}catch(e){}}):n.on("nodechange mouseup keyup",function(e){var t=r();"nodechange"==e.type&&e.selectionChange||(t&&t.id==n.id+"_ifr"&&(t=n.getBody()),n.dom.isChildOf(t,n.getBody())&&(n.lastRng=n.selection.getRng()))}),o.webkit&&!a&&(a=function(){var e=i.activeEditor;if(e&&e.selection){var t=e.selection.getRng();t&&!t.collapsed&&(n.lastRng=t)}},u.bind(document,"selectionchange",a)))}),n.on("setcontent",function(){n.lastRng=null}),n.on("mousedown",function(){n.selection.lastFocusBookmark=null}),n.on("focusin",function(){var e,t=i.focusedEditor;n.selection.lastFocusBookmark&&(e=function(e,t){var n;return t.startContainer?((n=e.getDoc().createRange()).setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}(n,n.selection.lastFocusBookmark),n.selection.lastFocusBookmark=null,n.selection.setRng(e)),t!=n&&(t&&t.fire("blur",{focusedEditor:n}),i.setActive(n),(i.focusedEditor=n).fire("focus",{blurredEditor:t}),n.focus(!0)),n.lastRng=null}),n.on("focusout",function(){t.setEditorTimeout(n,function(){var e=i.focusedEditor;c(n,r())||e!=n||(n.fire("blur",{focusedEditor:null}),i.focusedEditor=null,n.selection&&(n.selection.lastFocusBookmark=null))})}),s||(s=function(e){var t,n=i.activeEditor;t=e.target,n&&t.ownerDocument==document&&(n.selection&&t!=n.getBody()&&(n.selection.lastFocusBookmark=function(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}(n.dom,n.lastRng)),t==document.body||c(n,t)||i.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),i.focusedEditor=null))},u.bind(document,"focusin",s)),n.inline&&!l&&(l=function(e){var t=i.activeEditor,n=t.dom;if(t.inline&&n&&!n.isChildOf(e.target,t.getBody())){var r=t.selection.getRng();r.collapsed||(t.lastRng=r)}},u.bind(document,"mouseup",l))}),i.on("RemoveEditor",function(e){i.focusedEditor==e.editor&&(i.focusedEditor=null),i.activeEditor||(u.unbind(document,"selectionchange",a),u.unbind(document,"focusin",s),u.unbind(document,"mouseup",l),a=s=l=null)})}var a,s,l,u=e.DOM,c=function(t,e){var n=t?t.settings.custom_ui_selector:"";return null!==u.getParent(e,function(e){return r.isEditorUIElement(e)||!!n&&t.dom.is(e,n)})};return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r._isUIElement=c,r}),e(at,[rt,f,y,oe,i,d,n,ue,it,ot,x],function(f,h,e,l,t,p,i,n,r,u,o){function a(t){y(d.editors,function(e){"scroll"===t.type?e.fire("ScrollWindow",t):e.fire("ResizeWindow",t)})}function s(e,t){t!==$&&(t?h(window).on("resize scroll",a):h(window).off("resize scroll",a),$=t)}function m(e){var t,n=d.editors;delete n[e.id];for(var r=0;r<n.length;r++)if(n[r]==e){n.splice(r,1),t=!0;break}return d.activeEditor==e&&(d.activeEditor=n[0]),d.focusedEditor==e&&(d.focusedEditor=null),t}var c,d,g=e.DOM,v=p.explode,y=p.each,b=p.extend,x=0,$=!1;return b(d={$:h,majorVersion:"4",minorVersion:"5.8",releaseDate:"2017-10-05",editors:[],i18n:r,activeEditor:null,setup:function(){var e,t,n,r,i="";if(t=l.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),n=window.tinymce||window.tinyMCEPreInit)e=n.base||n.baseURL,i=n.suffix;else{for(var o=document.getElementsByTagName("script"),a=0;a<o.length;a++){var s=(r=o[a].src).substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!=s.indexOf(".min")&&(i=".min"),e=r.substring(0,r.lastIndexOf("/"));break}}!e&&document.currentScript&&(-1!=(r=document.currentScript.src).indexOf(".min")&&(i=".min"),e=r.substring(0,r.lastIndexOf("/")))}this.baseURL=new l(t).toAbsolute(e),this.documentBaseURL=t,this.baseURI=new l(this.baseURL),this.suffix=i,this.focusManager=new u(this)},overrideDefaults:function(e){var t,n;(t=e.base_url)&&(this.baseURL=new l(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new l(this.baseURL)),n=e.suffix,e.suffix&&(this.suffix=n);var r=(this.defaultSettings=e).plugin_base_urls;for(var i in r)o.PluginManager.urls[i]=r[i]},init:function(r){function s(e){var t=e.id;return t||(t=(t=e.name)&&!g.get(t)?e.name:g.uniqueId(),e.setAttribute("id",t)),t}function l(e,t){return t.constructor===RegExp?t.test(e.className):g.hasClass(e,t)}var n,u,c=this;u=p.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var d=function(e){n=e};return c.settings=r,g.bind(window,"ready",function e(){function n(e,t,n){var r=new f(e,t,c);a.push(r),r.on("init",function(){++o===i.length&&d(a)}),r.targetElm=r.targetElm||n,r.render()}var i,o=0,a=[];return g.unbind(window,"ready",e),function(e){var t=r[e];t&&t.apply(c,Array.prototype.slice.call(arguments,2))}("onpageload"),i=h.unique(function(t){var e,n=[];if(t.types)return y(t.types,function(e){n=n.concat(g.select(e.selector))}),n;if(t.selector)return g.select(t.selector);if(t.target)return[t.target];switch(t.mode){case"exact":0<(e=t.elements||"").length&&y(v(e),function(t){var e;(e=g.get(t))?n.push(e):y(document.forms,function(e){y(e.elements,function(e){e.name===t&&(t="mce_editor_"+x++,g.setAttrib(e,"id",t),n.push(e))})})});break;case"textareas":case"specific_textareas":y(g.select("textarea"),function(e){t.editor_deselector&&l(e,t.editor_deselector)||t.editor_selector&&!l(e,t.editor_selector)||n.push(e)})}return n}(r)),r.types?void y(r.types,function(t){p.each(i,function(e){return!g.is(e,t.selector)||(n(s(e),b({},r,t),e),!1)})}):(p.each(i,function(e){!function(e){e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(m(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)}(c.get(e.id))}),i=p.grep(i,function(e){return!c.get(e.id)}),void y(i,function(e){!function(e,t){return e.inline&&t.tagName.toLowerCase()in u}(r,e)?n(s(e),r,e):function(e,t){window.console&&!window.test&&window.console.log(e,t)}("Could not initialize inline editor on invalid inline target element",e)}))}),new i(function(t){n?t(n):d=function(e){t(e)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),s(0,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),c||(c=function(){t.fire("BeforeUnload")},g.bind(window,"beforeunload",c)),e},createEditor:function(e,t){return this.add(new f(e,t,this))},remove:function(e){var t,n,r=this,i=r.editors;if(e)return"string"==typeof e?(e=e.selector||e,void y(g.select(e),function(e){(n=i[e.id])&&r.remove(n)})):i[(n=e).id]?(m(n)&&r.fire("RemoveEditor",{editor:n}),i.length||g.unbind(window,"beforeunload",c),n.remove(),s(0,0<i.length),n):null;for(t=i.length-1;0<=t;t--)r.remove(i[t])},execCommand:function(e,t,n){var r=this.get(n);switch(e){case"mceAddEditor":return this.get(n)||new f(n,this.settings,this).render(),!0;case"mceRemoveEditor":return r&&r.remove(),!0;case"mceToggleEditor":return r?r.isHidden()?r.show():r.hide():this.execCommand("mceAddEditor",0,n),!0}return!!this.activeEditor&&this.activeEditor.execCommand(e,t,n)},triggerSave:function(){y(this.editors,function(e){e.save()})},addI18n:function(e,t){r.add(e,t)},translate:function(e){return r.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},n),d.setup(),window.tinymce=window.tinyMCE=d,d}),e("tinymce/LegacyInput",[at,d],function(e,t){var s=t.each,l=t.explode;e.on("AddEditor",function(e){var a=e.editor;a.on("preInit",function(){function n(n,e){s(e,function(e,t){e&&i.setStyle(n,t,e)}),i.rename(n,"span")}var t,r,i,o=a.settings;o.inline_styles&&(r=l(o.font_size_legacy_values),t={font:function(e,t){n(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:r[parseInt(t.size,10)-1]})},u:function(e,t){"html4"===a.settings.schema&&n(t,{textDecoration:"underline"})},strike:function(e,t){n(t,{textDecoration:"line-through"})}},a.on("PreProcess SetContent",function(e){i=a.dom,o.convert_fonts_to_spans&&s(i.select("font,u,strike",e.node),function(e){t[e.nodeName.toLowerCase()](i,e)})}))})})}),e(st,[ue,d],function(e,i){var o={send:function(e){function t(){!e.async||4==n.readyState||1e4<r++?(e.success&&r<1e4&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,1e4<r?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=!1!==e.async,e.data=e.data||"",o.fire("beforeInitialize",{settings:e}),n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(n.withCredentials=!0),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&i.each(e.requestheaders,function(e){n.setRequestHeader(e.key,e.value)}),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),(n=o.fire("beforeSend",{xhr:n,settings:e}).xhr).send(e.data),!e.async)return t();setTimeout(t,10)}}};return i.extend(o,e),o}),e(lt,[],function(){return{serialize:function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if("string"==(o=typeof t))return i="\bb\tt\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t))+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"!=o)return""+t;if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r<t.length;r++)i+=(0<r?",":"")+e(t[r],n);return i+"]"}for(a in i="{",t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(1<i.length?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"},parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(e){}}}}),e(ut,[lt,st,d],function(o,e,t){function n(e){this.settings=a({},e),this.count=0}var a=t.extend;return n.sendRPC=function(e){return(new n).send(e)},n.prototype={send:function(n){var r=n.error,i=n.success;(n=a(this.settings,n)).success=function(e,t){void 0===(e=o.parse(e))&&(e={error:"JSON Parse error."}),e.error?r.call(n.error_scope||n.scope,e.error,t):i.call(n.success_scope||n.scope,e.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=o.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",e.send(n)}},n}),e(ct,[y],function(e){return{callbacks:{},count:0,send:function(t){var n=this,r=e.DOM,i=t.count!==ye?t.count:n.count,o="tinymce_jsonp_"+i;n.callbacks[i]=function(e){r.remove(o),delete n.callbacks[i],t.callback(e)},r.add(r.doc.body,"script",{id:o,src:t.url,type:"text/javascript"}),n.count++}}}),e(dt,[],function(){function a(){for(var e in r=[],l)r.push(e);t.length=r.length}function n(){var e,t="";if(c){for(var n in l)e=l[n],t+=(t?",":"")+n.length.toString(32)+","+n+","+e.length.toString(32)+","+e;s.setAttribute(u,t);try{s.save(u)}catch(e){}a()}}var t,s,l,r,u,c;try{if(window.localStorage)return localStorage}catch(e){}return u="tinymce",s=document.documentElement,(c=!!s.addBehavior)&&s.addBehavior("#default#userData"),t={key:function(e){return r[e]},getItem:function(e){return e in l?l[e]:null},setItem:function(e,t){l[e]=""+t,n()},removeItem:function(e){delete l[e],n()},clear:function(){l={},n()}},function(){function e(e){var t,n;return-1===(n=e!==ye?i+e:r.indexOf(",",i))||n>r.length?null:(t=r.substring(i,n),i=n+1,t)}var t,r,n,i=0;if(l={},c){s.load(u),r=s.getAttribute(u)||"";do{var o=e();if(null===o)break;if(null!==(t=e(parseInt(o,32)||0))){if(null===(o=e()))break;n=e(parseInt(o,32)||0),t&&(l[t]=n)}}while(null!==t);a()}}(),t}),e(ft,[y,a,b,x,d,i],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each("trim isArray is toArray makeMap each map grep inArray extend create walk createNS resolve explode _addCacheSuffix".split(" "),function(e){a[e]=i[e]}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),e(ht,[ae,d],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t,n,r,i,o=this.settings;t=o.firstControlClass,n=o.lastControlClass,e.each(function(e){e.classes.remove(t).remove(n).add(o.controlClass),e.visible()&&(r=r||e,i=e)}),r&&r.classes.add(t),i&&i.classes.add(n)},renderHtml:function(e){var t="";return this.applyClasses(e.items()),e.items().each(function(e){t+=e.renderHtml()}),t},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),e(pt,[ht],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),e(mt,[Be],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n._super(e),e=n.settings,t=n.settings.size,n.on("click mousedown",function(e){e.preventDefault()}),n.on("touchstart",function(e){n.fire("click",e),e.preventDefault()}),e.subtype&&n.classes.add(e.subtype),t&&n.classes.add("btn-"+t),e.icon&&n.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e,t=this.getEl().firstChild;t&&((e=t.style).width=e.height="100%"),this._super()},renderHtml:function(){var e,t=this._id,n=this.classPrefix,r=this.state.get("icon"),i=this.state.get("text"),o="";return e=(e=this.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",i&&(this.classes.add("btn-has-text"),o='<span class="'+n+'txt">'+this.encode(i)+"</span>"),r=r?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+this.classes+'" tabindex="-1" aria-labelledby="'+t+'"><button role="presentation" type="button" tabindex="-1">'+(r?'<i class="'+r+'"'+e+"></i>":"")+o+"</button></div>"},bindStates:function(){function o(e){var t=n("span."+r,a.getEl());e?(t[0]||(n("button:first",a.getEl()).append('<span class="'+r+'"></span>'),t=n("span."+r,a.getEl())),t.html(a.encode(e))):t.remove(),a.classes.toggle("btn-has-text",!!e)}var a=this,n=a.$,r=a.classPrefix+"txt";return a.state.on("change:text",function(e){o(e.value)}),a.state.on("change:icon",function(e){var t=e.value,n=a.classPrefix;t=(a.settings.icon=t)?n+"ico "+n+"i-"+a.settings.icon:"";var r=a.getEl().firstChild,i=r.getElementsByTagName("i")[0];t?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=t):i&&r.removeChild(i),o(a.state.get("text"))}),a._super()}})}),e(gt,[$e],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this._layout;return this.classes.add("btn-group"),this.preRender(),e.preRender(this),'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+(this.settings.html||"")+e.renderHtml(this)+"</div></div>"}})}),e(vt,[Be],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'" unselectable="on" aria-labelledby="'+e+'-al" tabindex="-1"><i class="'+t+"ico "+t+'i-checkbox"></i><span id="'+e+'-al" class="'+t+'label">'+this.encode(this.state.get("text"))+"</span></div>"},bindStates:function(){function t(e){o.classes.toggle("checked",e),o.aria("checked",e)}var o=this;return o.state.on("change:text",function(e){o.getEl("al").firstChild.data=o.translate(e.value)}),o.state.on("change:checked change:value",function(e){o.fire("change"),t(e.value)}),o.state.on("change:icon",function(e){var t=e.value,n=o.classPrefix;if(void 0===t)return o.settings.icon;t=(o.settings.icon=t)?n+"ico "+n+"i-"+o.settings.icon:"";var r=o.getEl().firstChild,i=r.getElementsByTagName("i")[0];t?(i&&i==r.firstChild||(i=document.createElement("i"),r.insertBefore(i,r.firstChild)),i.className=t):i&&r.removeChild(i)}),o.state.get("checked")&&t(!0),o._super()}})}),e(yt,[Be,be,he,f,M,d],function(e,i,l,u,r,o){return e.extend({init:function(r){var i=this;i._super(r),r=i.settings,i.classes.add("combobox"),i.subinput=!0,i.ariaTarget="inp",r.menu=r.menu||r.values,r.menu&&(r.icon="caret"),i.on("click",function(e){var t=e.target,n=i.getEl();if(u.contains(n,t)||t==n)for(;t&&t!=n;)t.id&&-1!=t.id.indexOf("-open")&&(i.fire("action"),r.menu&&(i.showMenu(),e.aria&&i.menu.items()[0].focus())),t=t.parentNode}),i.on("keydown",function(e){var t;13==e.keyCode&&"INPUT"===e.target.nodeName&&(e.preventDefault(),i.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),i.fire("submit",{data:t.toJSON()}))}),i.on("keyup",function(e){if("INPUT"==e.target.nodeName){var t=i.state.get("value"),n=e.target.value;n!==t&&(i.state.set("value",n),i.fire("autocomplete",e))}}),i.on("mouseover",function(e){var t=i.tooltip().moveTo(-65535);if(i.statusLevel()&&-1!==e.target.className.indexOf(i.classPrefix+"status")){var n=i.statusMessage()||"Ok",r=t.text(n).show().testMoveRel(e.target,["bc-tc","bc-tl","bc-tr"]);t.classes.toggle("tooltip-n","bc-tc"==r),t.classes.toggle("tooltip-nw","bc-tl"==r),t.classes.toggle("tooltip-ne","bc-tr"==r),t.moveRel(e.target,r)}})},statusLevel:function(e){return 0<arguments.length&&this.state.set("statusLevel",e),this.state.get("statusLevel")},statusMessage:function(e){return 0<arguments.length&&this.state.set("statusMessage",e),this.state.get("statusMessage")},showMenu:function(){var e,t=this,n=t.settings;t.menu||((e=n.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",t.menu=i.create(e).parent(t).renderTo(t.getContainerElm()),t.fire("createmenu"),t.menu.reflow(),t.menu.on("cancel",function(e){e.control===t.menu&&t.focus()}),t.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()==t.value())})}).fire("show"),t.menu.on("select",function(e){t.value(e.control.value())}),t.on("focusin",function(e){"INPUT"==e.target.tagName.toUpperCase()&&t.menu.hide()}),t.aria("expanded",!0)),t.menu.show(),t.menu.layoutRect({w:t.layoutRect().w}),t.menu.moveRel(t.getEl(),t.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,n=this.getEl(),r=this.getEl("open"),i=this.layoutRect(),o=0,a=n.firstChild;this.statusLevel()&&"none"!==this.statusLevel()&&(o=parseInt(l.getRuntimeStyle(a,"padding-right"),10)-parseInt(l.getRuntimeStyle(a,"padding-left"),10)),e=r?i.w-l.getSize(r).width-10:i.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(t=this.layoutRect().h-2+"px"),u(a).css({width:e-o,lineHeight:t}),this._super(),this},postRender:function(){var t=this;return u(this.getEl("inp")).on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)}),t._super()},renderHtml:function(){var e,t,n,r=this,i=r._id,o=r.settings,a=r.classPrefix,s=r.state.get("value")||"",l="",u="";return"spellcheck"in o&&(u+=' spellcheck="'+o.spellcheck+'"'),o.maxLength&&(u+=' maxlength="'+o.maxLength+'"'),o.size&&(u+=' size="'+o.size+'"'),o.subtype&&(u+=' type="'+o.subtype+'"'),n='<i id="'+i+'-status" class="mce-status mce-ico" style="display: none"></i>',r.disabled()&&(u+=' disabled="disabled"'),(e=o.icon)&&"caret"!=e&&(e=a+"ico "+a+"i-"+o.icon),t=r.state.get("text"),(e||t)&&(l='<div id="'+i+'-open" class="'+a+"btn "+a+'open" tabIndex="-1" role="button"><button id="'+i+'-action" type="button" hidefocus="1" tabindex="-1">'+("caret"!=e?'<i class="'+e+'"></i>':'<i class="'+a+'caret"></i>')+(t?(e?" ":"")+t:"")+"</button></div>",r.classes.add("has-open")),'<div id="'+i+'" class="'+r.classes+'"><input id="'+i+'-inp" class="'+a+'textbox" value="'+r.encode(s,!1)+'" hidefocus="1"'+u+' placeholder="'+r.encode(o.placeholder)+'" />'+n+l+"</div>"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},showAutoComplete:function(e,t){var n=this;if(0!==e.length){n.menu?n.menu.items().remove():n.menu=i.create({type:"menu",classes:"combobox-menu",layout:"flow"}).parent(n).renderTo(),o.each(e,function(e){n.menu.add({text:e.title,url:e.previewUrl,match:t,classes:"menu-item-ellipsis",onclick:function(e,t){return function(){n.fire("selectitem",{title:t,value:e})}}(e.value,e.title)})}),n.menu.renderNew(),n.hideMenu(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()});var r=n.layoutRect().w;n.menu.layoutRect({w:r,minW:0,maxW:r}),n.menu.reflow(),n.menu.show(),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])}else n.hideMenu()},hideMenu:function(){this.menu&&this.menu.hide()},bindStates:function(){var i=this;i.state.on("change:value",function(e){i.getEl("inp").value!=e.value&&(i.getEl("inp").value=e.value)}),i.state.on("change:disabled",function(e){i.getEl("inp").disabled=e.value}),i.state.on("change:statusLevel",function(e){var t=i.getEl("status"),n=i.classPrefix,r=e.value;l.css(t,"display","none"===r?"none":""),l.toggleClass(t,n+"i-checkmark","ok"===r),l.toggleClass(t,n+"i-warning","warn"===r),l.toggleClass(t,n+"i-error","error"===r),i.classes.toggle("has-status","none"!==r),i.repaint()}),l.on(i.getEl("status"),"mouseleave",function(){i.tooltip().hide()}),i.on("cancel",function(e){i.menu&&i.menu.visible()&&(e.stopPropagation(),i.hideMenu())});function n(e,t){t&&0<t.items().length&&t.items().eq(e)[0].focus()}return i.on("keydown",function(e){var t=e.keyCode;"INPUT"===e.target.nodeName&&(t===r.DOWN?(e.preventDefault(),i.fire("autocomplete"),n(0,i.menu)):t===r.UP&&(e.preventDefault(),n(-1,i.menu)))}),i._super()},remove:function(){u(this.getEl("inp")).off(),this.menu&&this.menu.remove(),this._super()}})}),e(bt,[yt],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl("open"),n=t?t.getElementsByTagName("i")[0]:null;if(n)try{n.style.background=e}catch(e){}},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.state.get("rendered")&&t.repaintColor(e.value)}),t._super()}})}),e(xt,[mt,ke],function(e,r){return e.extend({showPanel:function(){var t=this,e=t.settings;if(t.active(!0),t.panel)t.panel.show();else{var n=e.panel;n.type&&(n={layout:"grid",items:n}),n.role=n.role||"dialog",n.popover=!0,n.autohide=!0,n.ariaRoot=!0,t.panel=new r(n).on("hide",function(){t.active(!1)}).on("cancel",function(e){e.stopPropagation(),t.focus(),t.hidePanel()}).parent(t).renderTo(t.getContainerElm()),t.panel.fire("show"),t.panel.reflow()}t.panel.moveRel(t.getEl(),e.popoverAlign||(t.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){this.panel&&this.panel.hide()},postRender:function(){var t=this;return t.aria("haspopup",!0),t.on("click",function(e){e.control===t&&(t.panel&&t.panel.visible()?t.hidePanel():(t.showPanel(),t.panel.focus(!!e.aria)))}),t._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),e($t,[xt,y],function(e,t){var r=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a='<span class="'+n+'txt">'+e.encode(r)+"</span>"),'<div id="'+t+'" class="'+e.classes+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+o+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+a+'</button><button type="button" class="'+n+'open" hidefocus="1" tabindex="-1"> <i class="'+n+'caret"></i></button></div>'},postRender:function(){var t=this,n=t.settings.onclick;return t.on("click",function(e){e.aria&&"down"==e.aria.key||e.control!=t||r.getParent(e.target,"."+t.classPrefix+"open")||(e.stopImmediatePropagation(),n.call(t,e))}),delete t.settings.onclick,t._super()}})}),e(wt,[],function(){var c=Math.min,d=Math.max,f=Math.round;return function(e){function t(e){var t;return"object"==typeof e?"r"in e?(s=e.r,l=e.g,u=e.b):"v"in e&&function(e,t,n){var r,i,o,a;if(e=(parseInt(e,10)||0)%360,t=parseInt(t,10)/100,n=parseInt(n,10)/100,t=d(0,c(t,1)),n=d(0,c(n,1)),0!==t){switch(r=e/60,o=(i=n*t)*(1-Math.abs(r%2-1)),a=n-i,Math.floor(r)){case 0:s=i,l=o,u=0;break;case 1:s=o,l=i,u=0;break;case 2:s=0,l=i,u=o;break;case 3:s=0,l=o,u=i;break;case 4:s=o,l=0,u=i;break;case 5:s=i,l=0,u=o;break;default:s=l=u=0}s=f(255*(s+a)),l=f(255*(l+a)),u=f(255*(u+a))}else s=l=u=f(255*n)}(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(s=parseInt(t[1],10),l=parseInt(t[2],10),u=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(s=parseInt(t[1],16),l=parseInt(t[2],16),u=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),u=parseInt(t[3]+t[3],16)),s=s<0?0:255<s?255:s,l=l<0?0:255<l?255:l,u=u<0?0:255<u?255:u,n}var n=this,s=0,l=0,u=0;e&&t(e),n.toRgb=function(){return{r:s,g:l,b:u}},n.toHsv=function(){return function(e,t,n){var r,i,o,a;return i=r=0,(o=c(e/=255,c(t/=255,n/=255)))==(a=d(e,d(t,n)))?{h:0,s:0,v:100*(i=o)}:(r=(a-o)/a,{h:f(60*((e==o?3:n==o?1:5)-(e==o?t-n:n==o?e-t:n-e)/((i=a)-o))),s:f(100*r),v:f(100*i)})}(s,l,u)},n.toHex=function(){function e(e){return 1<(e=parseInt(e,10).toString(16)).length?e:"0"+e}return"#"+e(s)+e(l)+e(u)},n.parse=t}}),e(Ct,[Be,we,he,wt],function(e,d,f,h){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function n(e,t){var n,r,i=f.getPos(e);return n=t.pageX-i.x,r=t.pageY-i.y,{x:n=Math.max(0,Math.min(n/e.clientWidth,1)),y:r=Math.max(0,Math.min(r/e.clientHeight,1))}}function r(e,t){var n=(360-e.h)/360;f.css(a,{top:100*n+"%"}),t||f.css(l,{left:e.s+"%",top:100-e.v+"%"}),s.style.background=new h({s:100,v:100,h:e.h}).toHex(),u.color().parse({s:e.s,v:e.v,h:e.h})}function e(e){var t;t=n(s,e),i.s=100*t.x,i.v=100*(1-t.y),r(i),u.fire("change")}function t(e){var t;t=n(o,e),(i=c.toHsv()).h=360*(1-t.y),r(i,!0),u.fire("change")}var i,o,a,s,l,u=this,c=u.color();o=u.getEl("h"),a=u.getEl("hp"),s=u.getEl("sv"),l=u.getEl("svp"),u._repaint=function(){r(i=c.toHsv())},u._super(),u._svdraghelper=new d(u._id+"-sv",{start:e,drag:e}),u._hdraghelper=new d(u._id+"-h",{start:t,drag:t}),u._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){return arguments.length?(this.color().parse(e),void(this._rendered&&this._repaint())):this.color().toHex()},color:function(){return this._color||(this._color=new h),this._color},renderHtml:function(){var e,t=this._id,o=this.classPrefix,a="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='<div id="'+t+'-h" class="'+o+'colorpicker-h" style="'+("background: -ms-linear-gradient(top,"+a+");background: linear-gradient(to bottom,"+a+");")+'">'+function(){var e,t,n,r,i="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(r=a.split(",")).length-1;e<t;e++)i+='<div class="'+o+'colorpicker-h-chunk" style="height:'+100/t+"%;"+n+r[e]+",endColorstr="+r[e+1]+");-ms-"+n+r[e]+",endColorstr="+r[e+1]+')"></div>';return i}()+'<div id="'+t+'-hp" class="'+o+'colorpicker-h-marker"></div></div>','<div id="'+t+'" class="'+this.classes+'"><div id="'+t+'-sv" class="'+o+'colorpicker-sv"><div class="'+o+'colorpicker-overlay1"><div class="'+o+'colorpicker-overlay2"><div id="'+t+'-svp" class="'+o+'colorpicker-selector1"><div class="'+o+'colorpicker-selector2"></div></div></div></div></div>'+e+"</div>"}})}),e(Et,[Be],function(e){return e.extend({init:function(e){var n=this;e.delimiter||(e.delimiter="»"),n._super(e),n.classes.add("path"),n.canFocus=!0,n.on("click",function(e){var t;(t=e.target.getAttribute("data-index"))&&n.fire("select",{value:n.row()[t],index:t})}),n.row(n.settings.row)},focus:function(){return this.getEl().firstChild.focus(),this},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){return'<div id="'+this._id+'" class="'+this.classes+'">'+this._getDataPathHtml(this.state.get("row"))+"</div>"},bindStates:function(){var t=this;return t.state.on("change:row",function(e){t.innerHtml(t._getDataPathHtml(e.value))}),t._super()},_getDataPathHtml:function(e){var t,n,r=e||[],i="",o=this.classPrefix;for(t=0,n=r.length;t<n;t++)i+=(0<t?'<div class="'+o+'divider" aria-hidden="true"> '+this.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(t==n-1?" "+o+"last":"")+'" data-index="'+t+'" tabindex="-1" id="'+this._id+"-"+t+'" aria-level="'+(t+1)+'">'+r[t].name+"</div>";return i=i||'<div class="'+o+'path-item"> </div>'}})}),e(St,[Et],function(e){return e.extend({postRender:function(){function o(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var a=this,s=a.settings.editor;return!1!==s.settings.elementpath&&(a.on("select",function(e){s.focus(),s.selection.select(this.row()[e.index].element),s.nodeChanged()}),s.on("nodeChange",function(e){for(var t=[],n=e.parents,r=n.length;r--;)if(1==n[r].nodeType&&!o(n[r])){var i=s.fire("ResolveName",{name:n[r].nodeName.toLowerCase(),target:n[r]});if(i.isDefaultPrevented()||t.push({name:i.name,element:n[r]}),i.isPropagationStopped())break}a.row(t)})),a._super()}})}),e(_t,[$e],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></div>"}})}),e(kt,[$e,_t,d],function(e,i,o){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var r=this,e=r.items();r.settings.formItemDefaults||(r.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),e.each(function(e){var t,n=e.settings.label;n&&((t=new i(o.extend({items:{type:"label",id:e._id+"-l",text:n,flex:0,forId:e._id,disabled:e.disabled()}},r.settings.formItemDefaults))).type="formitem",e.aria("labelledby",e._id+"-l"),void 0===e.settings.flex&&(e.settings.flex=1),r.replace(e,t),t.add(e))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){this._super(),this.fromJSON(this.settings.data)},bindStates:function(){function e(){var e,t,r=0,i=[];if(!1!==n.settings.labelGapCalc)for(("children"==n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;r=r<n?n:r,i.push(t)}),t=n.settings.labelGap||0,e=i.length;e--;)i[e].settings.minWidth=r+t}var n=this;n._super(),n.on("show",e),e()}})}),e(Nt,[kt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes+'" hidefocus="1" tabindex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.bodyClasses+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div></fieldset>"}})}),e(Tt,[y,P,c,tt,d,$],function(n,r,i,o,e,a){function s(e,t,n,r,i){return{type:e,title:t,url:n,level:r,attach:i}}function l(e){return e.innerText||e.textContent}function u(e){return function(e){return e&&"A"===e.nodeName&&(e.id||e.name)}(e)&&g(e)}function c(e){return e&&/^(H[1-6])$/.test(e.nodeName)}function d(e){return c(e)&&g(e)}function f(e){var t=function(e){return e.id?e.id:o.uuid("h")}(e);return s("header",l(e),"#"+t,function(e){return c(e)?parseInt(e.nodeName.substr(1),10):0}(e),function(){e.id=t})}function h(e){var t=e.id||e.name,n=l(e);return s("anchor",n||"#"+t,"#"+t,0,r.noop)}function p(e){return function(e,t){return n.DOM.select(e,t)}("h1,h2,h3,h4,h5,h6,a:not([href])",e)}function m(e){return 0<t(e.title).length}var t=e.trim,g=function(e){return function(e){for(;e=e.parentNode;){var t=e.contentEditable;if(t&&"inherit"!==t)return a.isContentEditableTrue(e)}return!1}(e)&&!a.isContentEditableFalse(e)};return{find:function(e){var t=p(e);return i.filter(function(e){return i.map(i.filter(e,d),f)}(t).concat(function(e){return i.map(i.filter(e,u),h)}(t)),m)}}}),e(At,[yt,d,c,P,M,Tt],function(e,d,f,h,t,s){function p(e){return{title:e.title,value:{title:{raw:e.title},url:e.url,attach:e.attach}}}function m(e,t){return{title:e,value:{title:e,url:t,attach:h.noop}}}function g(e,t,n){var r=t in e?e[t]:n;return!1===r?null:r}function l(e,n,r,t){function i(e){var t=f.filter(e[r],function(e){return function(t,e){return!f.find(e,function(e){return e.url===t})}(e,n)});return d.map(t,function(e){return{title:e,value:{title:e,url:e,attach:h.noop}}})}function o(t){return function(e){return d.map(e,p)}(f.filter(n,function(e){return e.type==t}))}var a,s,l,u,c={title:"-"};return!1===t.typeahead_urls?[]:"file"===r?(a=[y(e,i(v)),y(e,o("header")),y(e,(s=o("anchor"),l=g(t,"anchor_top","#top"),u=g(t,"anchor_bottom","#bottom"),null!==l&&s.unshift(m("<top>",l)),null!==u&&s.push(m("<bottom>",u)),s))],f.reduce(a,function(e,t){return 0===e.length||0===t.length?e.concat(t):e.concat(c,t)},[])):y(e,i(v))}function u(r,i,o,a){function t(e){var t=s.find(o),n=l(e,t,a,i);r.showAutoComplete(n,e)}r.on("autocomplete",function(){t(r.value())}),r.on("selectitem",function(e){var t=e.value;r.value(t.url);var n=function(e){var t=e.title;return t.raw?t.raw:t}(t);"image"===a?r.fire("change",{meta:{alt:n,attach:t.attach}}):r.fire("change",{meta:{text:n,attach:t.attach}}),r.focus()}),r.on("click",function(e){0===r.value().length&&"INPUT"===e.target.nodeName&&t("")}),r.on("PostRender",function(){r.getRoot().on("submit",function(e){e.isDefaultPrevented()||function(e,t){var n=v[t];/^https?/.test(e)&&(n?-1===f.indexOf(n,e)&&(v[t]=n.slice(0,5).concat(e)):v[t]=[e])}(r.value(),a)})})}function c(n,e,t){var r=e.filepicker_validator_handler;if(r){n.state.on("change:value",function(e){!function(e){0===e.length?n.statusLevel("none"):r({url:e,type:t},function(e){var t=function(e){var t=e.status,n=e.message;return"valid"===t?{status:"ok",message:n}:"unknown"===t?{status:"warn",message:n}:"invalid"===t?{status:"warn",message:n}:{status:"none",message:""}}(e);n.statusMessage(t.message),n.statusLevel(t.status)})}(e.value)})}}var v={},y=function(e,t){var n=e.toLowerCase(),r=d.grep(t,function(e){return-1!==e.title.toLowerCase().indexOf(n)});return 1===r.length&&r[0].title===e?[]:r};return e.extend({init:function(e){var t,n,r,i=this,o=tinymce.activeEditor,a=o.settings,s=e.filetype;e.spellcheck=!1,(r=(r=a.file_picker_types||a.file_browser_callback_types)&&d.makeMap(r,/[, ]/))&&!r[s]||(!(n=a.file_picker_callback)||r&&!r[s]?!(n=a.file_browser_callback)||r&&!r[s]||(t=function(){n(i.getEl("inp").id,i.value(),s,window)}):t=function(){var e=i.fire("beforecall").meta;e=d.extend({filetype:s},e),n.call(o,function(e,t){i.value(e).fire("change",{meta:t})},i.value(),e)}),t&&(e.icon="browse",e.onaction=t),i._super(e),u(i,a,o.getBody(),s),c(i,a,s)}})}),e(Rt,[pt],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),e(Bt,[pt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,u,c,d,f,h,p,m,g,v,y,b,x,$,w,C,E,S,_,k,N,T,A,R,B,D,M,O,P,L,I=[],F=Math.max,H=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,u=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),L="column"==f?(E="y",w="h",C="minH",S="maxH",k="innerH",_="top",N="deltaH",T="contentH",M="left",B="w",A="x",R="innerW",D="minW",O="right",P="deltaW","contentW"):(E="x",w="w",C="minW",S="maxW",k="innerW",_="left",N="deltaW",T="contentW",M="top",B="h",A="y",R="innerH",D="minH",O="bottom",P="deltaH","contentH"),d=i[k]-o[_]-o[_],$=c=0,t=0,n=r.length;t<n;t++)p=(h=r[t]).layoutRect(),d-=t<n-1?u:0,0<(m=h.settings.flex)&&(c+=m,p[S]&&I.push(h),p.flex=m),d-=p[C],$<(g=o[M]+p[D]+o[O])&&($=g);if((b={})[C]=d<0?i[C]-d+i[N]:i[k]-d+i[N],b[D]=$+i[P],b[T]=i[k]-d,b[L]=$,b.minW=H(b.minW,i.maxW),b.minH=H(b.minH,i.maxH),b.minW=F(b.minW,i.startMinWidth),b.minH=F(b.minH,i.startMinHeight),!i.autoResize||b.minW==i.minW&&b.minH==i.minH){for(y=d/c,t=0,n=I.length;t<n;t++)(v=(p=(h=I[t]).layoutRect())[S])<(g=p[C]+p.flex*y)?(d-=p[S]-p[C],c-=p.flex,p.flex=0,p.maxFlexSize=v):p.maxFlexSize=0;for(y=d/c,x=o[_],b={},0===c&&("end"==l?x=d+o[_]:"center"==l?(x=Math.round(i[k]/2-(i[k]-d)/2)+o[_])<0&&(x=o[_]):"justify"==l&&(x=o[_],u=Math.floor(d/(r.length-1)))),b[A]=o[M],t=0,n=r.length;t<n;t++)g=(p=(h=r[t]).layoutRect()).maxFlexSize||p[C],"center"===s?b[A]=Math.round(i[R]/2-p[B]/2):"stretch"===s?(b[B]=F(p[D]||0,i[R]-o[M]-o[O]),b[A]=o[M]):"end"===s&&(b[A]=i[R]-p[B]-o.top),0<p.flex&&(g+=p.flex*y),b[w]=g,b[E]=x,h.layoutRect(b),h.recalc&&h.recalc(),x+=g+u}else if(b.w=b.minW,b.h=b.minH,e.layoutRect(b),this.recalc(e),null===e._lastRect){var U=e.parent();U&&(U._lastRect=null,U.recalc())}}})}),e(Dt,[ht],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),e(Mt,[y],function(n){function i(e,t,n){for(;n!==t;){if(n.style[e])return n.style[e];n=n.parentNode}return""}function o(e,t){return n.DOM.getStyle(t,e,!0)}return{getFontSize:function(e,t){var n=i("fontSize",e,t);return""!==n?n:o("fontSize",t)},getFontFamily:function(e,t){var n=i("fontFamily",e,t),r=""!==n?n:o("fontFamily",t);return r!==ye?function(e){return e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")}(r):""},toPt:function(e){return/[0-9.]+px$/.test(e)?Math.round(72*parseInt(e,10)/96)+"pt":e}}}),e(Ot,[ve,Be,ke,d,c,y,at,i,Mt],function(n,e,f,h,p,r,t,i,m){function o(a){function n(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}function r(e){return function(){var t=this;a.formatter?a.formatter.formatChanged(e,function(e){t.active(e)}):a.on("init",function(){a.formatter.formatChanged(e,function(e){t.active(e)})})}}function e(n){return function(){function e(){var e="redo"==n?"hasRedo":"hasUndo";return!!a.undoManager&&a.undoManager[e]()}var t=this;t.disabled(!e()),a.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){t.disabled(a.readonly||!e())})}}function i(e){e.control&&(e=e.control.value()),e&&a.execCommand("mceToggleFormat",!1,e)}function o(e){var n=e.items().length;return e.items().each(function(e){e.menu&&e.visible(0<o(e.menu)),!e.menu&&e.settings.menu&&e.visible(0<function n(e){var r=e.length;return h.each(e,function(e){e.menu&&(e.hidden=0===n(e.menu));var t=e.format;t&&(e.hidden=!a.formatter.canApply(t)),e.hidden&&r--}),r}(e.settings.menu));var t=e.settings.format;t&&e.visible(a.formatter.canApply(t)),e.visible()||n--}),n}var t,s,l,u;s=0,l=[],u=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}],a.on("init",function(){g(l,function(e){a.formatter.register(e.name,e)})}),t={type:"menu",items:function r(e){var i=[];if(e)return g(e,function(e){var t={text:e.title,icon:e.icon};if(e.items)t.menu=r(e.items);else{var n=e.format||"custom"+s++;e.format||(e.name=n,l.push(e)),t.format=n,t.cmd=e.cmd}i.push(t)}),i}(a.settings.style_formats_merge?a.settings.style_formats?u.concat(a.settings.style_formats):u:a.settings.style_formats||u),onPostRender:function(e){a.fire("renderFormatsMenu",{control:e.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return a.formatter.getCssText(this.settings.format)},onPostRender:function(){var n=this;n.parent().on("show",function(){var e,t;(e=n.settings.format)&&(n.disabled(!a.formatter.canApply(e)),n.active(a.formatter.match(e))),(t=n.settings.cmd)&&n.active(a.queryCommandState(t))})},onclick:function(){this.settings.format&&i(this.settings.format),this.settings.cmd&&a.execCommand(this.settings.cmd)}}},g({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){a.addButton(t,{tooltip:e,onPostRender:r(t),onclick:function(){i(t)}})}),g({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(e,t){a.addButton(t,{tooltip:e[0],cmd:e[1]})}),g({blockquote:["Blockquote","mceBlockQuote"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(e,t){a.addButton(t,{tooltip:e[0],cmd:e[1],onPostRender:r(t)})});function c(e){return function(e){var t=e;return 0<t.length&&"-"===t[0].text&&(t=t.slice(1)),0<t.length&&"-"===t[t.length-1].text&&(t=t.slice(0,t.length-1)),t}(e.insert_button_items?d(e.insert_button_items):function(t){var n=[{text:"-"}],e=h.grep(a.menuItems,function(e){return e.context===t});return h.each(e,function(e){"before"==e.separator&&n.push({text:"|"}),e.prependToContext?n.unshift(e):n.push(e),"after"==e.separator&&n.push({text:"|"})}),n}("insert"))}var d=function(e){var t,n;if("string"==typeof e)n=e.split(" ");else if(h.isArray(e))return function(e){return p.reduce(e,function(e,t){return e.concat(t)},[])}(h.map(e,d));return t=h.grep(n,function(e){return"|"===e||e in a.menuItems}),h.map(t,function(e){return"|"===e?{text:"-"}:a.menuItems[e]})};a.addButton("undo",{tooltip:"Undo",onPostRender:e("undo"),cmd:"undo"}),a.addButton("redo",{tooltip:"Redo",onPostRender:e("redo"),cmd:"redo"}),a.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),a.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:e("undo"),cmd:"undo"}),a.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:e("redo"),cmd:"redo"}),a.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:function(){var t=this;a.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(a.hasVisual)},cmd:"mceToggleVisualAid"}),a.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),a.addButton("insert",{type:"menubutton",icon:"insert",menu:[],oncreatemenu:function(){this.menu.add(c(a.settings)),this.menu.renderNew()}}),g({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline","Meta+U"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(e,t){a.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),a.on("mousedown",function(){f.hideAll()}),a.addButton("styleselect",{type:"menubutton",text:"Formats",menu:t,onShowMenu:function(){a.settings.style_formats_autohide&&o(this.menu)}}),a.addButton("formatselect",function(){var t=[],e=n(a.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return g(e,function(e){t.push({text:e[0],value:e[1],textStyle:function(){return a.formatter.getCssText(e[1])}})}),{type:"listbox",text:e[0][0],values:t,fixedWidth:!0,onselect:i,onPostRender:function(i,o){return function(){var t=this;a.on("nodeChange",function(e){var n=a.formatter,r=null;g(e.parents,function(t){if(g(i,function(e){if(o?n.matchNode(t,o,{value:e.value})&&(r=e.value):n.matchNode(t,e.value)&&(r=e.value),r)return!1}),r)return!1}),t.value(r)})}}(t)}}),a.addButton("fontselect",function(){var t=[],e=n(a.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return g(e,function(e){t.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:t,fixedWidth:!0,onPostRender:function(o){return function(){function r(e){return e?e.split(",")[0]:""}var i=this;a.on("nodeChange",function(e){var t,n=null;t=m.getFontFamily(a.getBody(),e.element),g(o,function(e){e.value.toLowerCase()===t.toLowerCase()&&(n=e.value)}),g(o,function(e){n||r(e.value).toLowerCase()!==r(t).toLowerCase()||(n=e.value)}),i.value(n),!n&&t&&i.text(r(t))})}}(t),onselect:function(e){e.control.settings.value&&a.execCommand("FontName",!1,e.control.settings.value)}}}),a.addButton("fontsizeselect",function(){var i=[],e=a.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt";return g(e.split(" "),function(e){var t=e,n=e,r=e.split("=");1<r.length&&(t=r[0],n=r[1]),i.push({text:t,value:n})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:i,fixedWidth:!0,onPostRender:function(o){return function(){var i=this;a.on("nodeChange",function(e){var t,n,r=null;t=m.getFontSize(a.getBody(),e.element),n=m.toPt(t),g(o,function(e){e.value===t?r=t:e.value===n&&(r=n)}),i.value(r),r||i.text(n)})}}(i),onclick:function(e){e.control.settings.value&&a.execCommand("FontSize",!1,e.control.settings.value)}}}),a.addMenuItem("formats",{text:"Formats",menu:t})}var g=h.each;t.on("AddEditor",function(e){var t=e.editor;(function(e){e.on("ScriptsLoaded",function(){e.rtl&&(n.rtl=!0)})})(t),o(t),function(e){e.settings.ui_container&&(i.container=r.DOM.select(e.settings.ui_container)[0])}(t)}),n.translate=function(e){return t.translate(e)},e.tooltips=!i.iOS}),e(Pt,[pt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,u,c,d,f,h,p,m,g,v,y,b,x,$,w,C,E,S,_,k,N,T=[],A=[];t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,x=t.alignH||t.align,$=t.alignV||t.align,g=e.paddingBox,N="reverseRows"in t?t.reverseRows:e.isRtl(),x&&"string"==typeof x&&(x=[x]),$&&"string"==typeof $&&($=[$]);for(d=0;d<r;d++)T.push(0);for(f=0;f<n;f++)A.push(0);for(f=0;f<n;f++)for(d=0;d<r&&(c=i[f*r+d]);d++)E=(u=c.layoutRect()).minW,S=u.minH,T[d]=E>T[d]?E:T[d],A[f]=S>A[f]?S:A[f];for(_=o.innerW-g.left-g.right,d=w=0;d<r;d++)w+=T[d]+(0<d?y:0),_-=(0<d?y:0)+T[d];for(k=o.innerH-g.top-g.bottom,f=C=0;f<n;f++)C+=A[f]+(0<f?b:0),k-=(0<f?b:0)+A[f];if(w+=g.left+g.right,C+=g.top+g.bottom,(l={}).minW=w+(o.w-o.innerW),l.minH=C+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){var R;o.autoResize&&((l=e.layoutRect(l)).contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH),R="start"==t.packV?0:0<k?Math.floor(k/n):0;var B=0,D=t.flexWidths;if(D)for(d=0;d<D.length;d++)B+=D[d];else B=r;var M=_/B;for(d=0;d<r;d++)T[d]+=D?D[d]*M:M;for(p=g.top,f=0;f<n;f++){for(h=g.left,s=A[f]+R,d=0;d<r&&(c=i[N?f*r+r-1-d:f*r+d]);d++)m=c.settings,u=c.layoutRect(),a=Math.max(T[d],u.startMinWidth),u.x=h,u.y=p,"center"==(v=m.alignH||(x?x[d]||x[0]:null))?u.x=h+a/2-u.w/2:"right"==v?u.x=h+a-u.w:"stretch"==v&&(u.w=a),"center"==(v=m.alignV||($?$[d]||$[0]:null))?u.y=p+s/2-u.h/2:"bottom"==v?u.y=p+s-u.h:"stretch"==v&&(u.h=s),c.layoutRect(u),h+=a+y,c.recalc&&c.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var O=e.parent();O&&(O._lastRect=null,O.recalc())}}})}),e(Lt,[Be,r],function(e,i){return e.extend({renderHtml:function(){return this.classes.add("iframe"),this.canFocus=!1,'<iframe id="'+this._id+'" class="'+this.classes+'" tabindex="-1" src="'+(this.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):i.setTimeout(function(){n.html(e)}),this}})}),e(It,[Be],function(e){return e.extend({init:function(e){this._super(e),this.classes.add("widget").add("infobox"),this.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this.classPrefix;return'<div id="'+this._id+'" class="'+this.classes+'"><div id="'+this._id+'-body">'+this.encode(this.state.get("text"))+'<button role="button" tabindex="-1"><i class="'+e+"ico "+e+'i-help"></i></button></div></div>'},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.getEl("body").firstChild.data=t.encode(e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t.state.on("change:help",function(e){t.classes.toggle("has-help",e.value),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}})}),e(Ft,[Be,he],function(e,t){return e.extend({init:function(e){this._super(e),this.classes.add("widget").add("label"),this.canFocus=!1,e.multiline&&this.classes.add("autoscroll"),e.strong&&this.classes.add("strong")},initLayoutRect:function(){var e=this._super();this.settings.multiline&&(t.getSize(this.getEl()).width>e.maxW&&(e.minW=e.maxW,this.classes.add("multiline")),this.getEl().style.width=e.minW+"px",e.startMinH=e.h=e.minH=Math.min(e.maxH,t.getSize(this.getEl()).height));return e},repaint:function(){return this.settings.multiline||(this.getEl().style.lineHeight=this.layoutRect().h+"px"),this._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e,t,n=this,r=n.settings.forId;return!r&&(t=n.settings.forName)&&((e=n.getRoot().find("#"+t)[0])&&(r=e._id)),r?'<label id="'+n._id+'" class="'+n.classes+'"'+(r?' for="'+r+'"':"")+">"+n.encode(n.state.get("text"))+"</label>":'<span id="'+n._id+'" class="'+n.classes+'">'+n.encode(n.state.get("text"))+"</span>"},bindStates:function(){var t=this;return t.state.on("change:text",function(e){t.innerHtml(t.encode(e.value)),t.state.get("rendered")&&t.updateLayoutRect()}),t._super()}})}),e(Ht,[$e],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){this._super(e),this.classes.add("toolbar")},postRender:function(){return this.items().each(function(e){e.classes.add("toolbar-item")}),this._super()}})}),e(Ut,[Ht],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),e(zt,[mt,be,Ut],function(e,r,s){var o=e.extend({init:function(e){this._renderOpen=!0,this._super(e),e=this.settings,this.classes.add("menubtn"),e.fixedWidth&&this.classes.add("fixed-width"),this.aria("haspopup",!0),this.state.set("menu",e.menu||this.render())},showMenu:function(e){var t,n=this;return n.menu&&n.menu.visible()&&!1!==e?n.hideMenu():(n.menu||((t=n.state.get("menu")||[]).length?t={type:"menu",items:t}:t.type=t.type||"menu",t.renderTo?n.menu=t.parent(n).show().renderTo():n.menu=r.create(t).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){e.control==n.menu&&n.activeMenu("show"==e.type),n.aria("expanded","show"==e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]),void n.fire("showmenu"))},hideMenu:function(){this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e,t=this,n=t._id,r=t.classPrefix,i=t.settings.icon,o=t.state.get("text"),a="";return e=(e=t.settings.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",o&&(t.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+t.encode(o)+"</span>"),i=t.settings.icon?r+"ico "+r+"i-"+i:"",t.aria("role",t.parent()instanceof s?"menuitem":"button"),'<div id="'+n+'" class="'+t.classes+'" tabindex="-1" aria-labelledby="'+n+'"><button id="'+n+'-open" role="presentation" type="button" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+a+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var i=this;return i.on("click",function(e){e.control===i&&function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}(e.target,i.getEl())&&(i.focus(),i.showMenu(!e.aria),e.aria&&i.menu.items().filter(":visible")[0].focus())}),i.on("mouseenter",function(e){var t,n=e.control,r=i.parent();n&&r&&n instanceof o&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(t=!0),e.hideMenu())}),t&&(n.focus(),n.showMenu()))}),i._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return o}),e(Vt,[Be,be,i,r],function(e,o,h,i){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t,n=this;n._super(e),e=n.settings,n.classes.add("menu-item"),e.menu&&n.classes.add("menu-item-expand"),e.preview&&n.classes.add("menu-item-preview"),"-"!==(t=n.state.get("text"))&&"|"!==t||(n.classes.add("menu-item-sep"),n.aria("role","separator"),n.state.set("text","-")),e.selectable&&(n.aria("role","menuitemcheckbox"),n.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||n.classes.add("menu-item-normal"),n.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&n.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var t,n=this,e=n.settings,r=n.parent();if(r.items().each(function(e){e!==n&&e.hideMenu()}),e.menu){(t=n.menu)?t.show():((t=e.menu).length?t={type:"menu",items:t}:t.type=t.type||"menu",r.settings.itemDefaults&&(t.itemDefaults=r.settings.itemDefaults),(t=n.menu=o.create(t).parent(n).renderTo()).reflow(),t.on("cancel",function(e){e.stopPropagation(),n.focus(),t.hide()}),t.on("show hide",function(e){e.control.items&&e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),t.on("hide",function(e){e.control===t&&n.classes.remove("selected")}),t.submenu=!0),t._parentMenu=r,t.classes.add("menu-sub");var i=t.testMoveRel(n.getEl(),n.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);t.moveRel(n.getEl(),i),i="menu-sub-"+(t.rel=i),t.classes.remove(t._lastRel).add(i),t._lastRel=i,n.classes.add("selected"),n.aria("expanded",!0)}},hideMenu:function(){return this.menu&&(this.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),this.menu.hide(),this.aria("expanded",!1)),this},renderHtml:function(){function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function e(e){var t=a.match||"";return t?e.replace(new RegExp(n(t),"gi"),function(e){return"!mce~match["+e+"]mce~match!"}):e}function t(e){return e.replace(new RegExp(n("!mce~match["),"g"),"<b>").replace(new RegExp(n("]mce~match!"),"g"),"</b>")}var r,i=this,o=i._id,a=i.settings,s=i.classPrefix,l=i.state.get("text"),u=i.settings.icon,c="",d=a.shortcut,f=i.encode(a.url);return u&&i.parent().classes.add("menu-has-icons"),a.image&&(c=" style=\"background-image: url('"+a.image+"')\""),d=d&&function(e){var t,n,r;for(r=h.mac?{alt:"&#x2325;",ctrl:"&#x2318;",shift:"&#x21E7;",meta:"&#x2318;"}:{meta:"Ctrl"},e=e.split("+"),t=0;t<e.length;t++)(n=r[e[t].toLowerCase()])&&(e[t]=n);return e.join("+")}(d),u=s+"ico "+s+"i-"+(i.settings.icon||"none"),r="-"!==l?'<i class="'+u+'"'+c+"></i> ":"",l=t(i.encode(e(l))),f=t(i.encode(e(f))),'<div id="'+o+'" class="'+i.classes+'" tabindex="-1">'+r+("-"!==l?'<span id="'+o+'-text" class="'+s+'text">'+l+"</span>":"")+(d?'<div id="'+o+'-shortcut" class="'+s+'menu-shortcut">'+d+"</div>":"")+(a.menu?'<div class="'+s+'caret"></div>':"")+(f?'<div class="'+s+'menu-item-link">'+f+"</div>":"")+"</div>"},postRender:function(){var t=this,n=t.settings,e=n.textStyle;if("function"==typeof e&&(e=e.call(this)),e){var r=t.getEl("text");r&&r.setAttribute("style",e)}return t.on("mouseenter click",function(e){e.control===t&&(n.menu||"click"!==e.type?(t.showMenu(),e.aria&&t.menu.focus(!0)):(t.fire("select"),i.requestAnimationFrame(function(){t.parent().hideAll()})))}),t._super(),t},hover:function(){return this.parent().items().each(function(e){e.classes.remove("selected")}),this.classes.toggle("selected",!0),this},active:function(e){return void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),e(jt,[f,ve,r],function(u,e,c){return function(r,i){var o,a,s=this,l=e.classPrefix;s.show=function(e,t){function n(){o&&(u(r).append('<div class="'+l+"throbber"+(i?" "+l+"throbber-inline":"")+'"></div>'),t&&t())}return s.hide(),o=!0,e?a=c.setTimeout(n,e):n(),s},s.hide=function(){var e=r.lastChild;return c.clearTimeout(a),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,s}}}),e(Wt,[ke,Vt,jt,d],function(e,t,i,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var t=e.items,n=t.length;n--;)t[n]=r.extend({},e.itemDefaults,t[n]);this._super(e),this.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){this.hideAll(),this.fire("select")},load:function(){function t(){r.throbber&&(r.throbber.hide(),r.throbber=null)}var n,r=this;r.settings.itemsFactory&&(r.throbber||(r.throbber=new i(r.getEl("body"),!0),0===r.items().length?(r.throbber.show(),r.fire("loading")):r.throbber.show(100,function(){r.items().remove(),r.fire("loading")}),r.on("hide close",t)),r.requestTime=n=(new Date).getTime(),r.settings.itemsFactory(function(e){return 0===e.length?void r.hide():void(r.requestTime===n&&(r.getEl().style.width="",r.getEl("body").style.width="",t(),r.items().remove(),r.getEl("body").innerHTML="",r.add(e),r.renderNew(),r.fire("loaded")))}))},hideAll:function(){return this.find("menuitem").exec("hideMenu"),this._super()},preRender:function(){var n=this;return n.items().each(function(e){var t=e.settings;if(t.icon||t.image||t.selectable)return!(n._hasIcons=!0)}),n.settings.itemsFactory&&n.on("postrender",function(){n.settings.itemsFactory&&n.load()}),n._super()}})}),e(qt,[zt,Wt],function(e,r){return e.extend({init:function(r){var e,i,o,n,a=this;a._super(r),r=a.settings,a._values=e=r.values,e&&(void 0!==r.value&&function e(t){for(var n=0;n<t.length;n++){if(i=t[n].selected||r.value===t[n].value)return o=o||t[n].text,a.state.set("value",t[n].value),!0;if(t[n].menu&&e(t[n].menu))return!0}}(e),!i&&0<e.length&&(o=e[0].text,a.state.set("value",e[0].value)),a.state.set("menu",e)),a.state.set("text",r.text||o),a.classes.add("listbox"),a.on("select",function(e){var t=e.control;n&&(e.lastControl=n),r.multiple?t.active(!t.active()):a.value(e.control.value()),n=t})},bindStates:function(){var n=this;return n.on("show",function(e){!function(e,t){e instanceof r&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===t)})}(e.control,n.value())}),n.state.on("change:value",function(e){var t=function e(t,n){var r;if(t)for(var i=0;i<t.length;i++){if(t[i].value===n)return t[i];if(t[i].menu&&(r=e(t[i].menu,n)))return r}}(n.state.get("menu"),e.value);t?n.text(t.text):n.text(n.settings.text)}),n._super()}})}),e(Gt,[vt],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),e(Xt,[Be,we],function(e,n){return e.extend({renderHtml:function(){var e=this.classPrefix;return this.classes.add("resizehandle"),"both"==this.settings.direction&&this.classes.add("resizehandle-both"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"><i class="'+e+"ico "+e+'i-resize"></i></div>'},postRender:function(){var t=this;t._super(),t.resizeDragHelper=new n(this._id,{start:function(){t.fire("ResizeStart")},drag:function(e){"both"!=t.settings.direction&&(e.deltaX=0),t.fire("Resize",e)},stop:function(){t.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),e(Yt,[Be],function(e){function n(e){var t="";if(e)for(var n=0;n<e.length;n++)t+='<option value="'+e[n]+'">'+e[n]+"</option>";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var n=this;n._super(e),n.settings.size&&(n.size=n.settings.size),n.settings.options&&(n._options=n.settings.options),n.on("keydown",function(e){var t;13==e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e,t="";return e=n(this._options),this.size&&(t=' size = "'+this.size+'"'),'<select id="'+this._id+'" class="'+this.classes+'"'+t+">"+e+"</select>"},bindStates:function(){var t=this;return t.state.on("change:options",function(e){t.getEl().innerHTML=n(e.value)}),t._super()}})}),e(Kt,[Be,we,he],function(e,y,b){function x(e,t,n){return e<t&&(e=t),n<e&&(e=n),e}function s(e,t,n){e.setAttribute("aria-"+t,n)}function n(e,t){var n,r,i,o,a;n="v"==e.settings.orientation?(i="top",r="height","h"):(i="left",r="width","w"),a=e.getEl("handle"),o=((e.layoutRect()[n]||100)-b.getSize(a)[r])*((t-e._minValue)/(e._maxValue-e._minValue))+"px",a.style[i]=o,a.style.height=e.layoutRect().h+"px",s(a,"valuenow",t),s(a,"valuetext",""+e.settings.previewFilter(t)),s(a,"valuemin",e._minValue),s(a,"valuemax",e._maxValue)}return e.extend({init:function(e){e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),this._super(e),this.classes.add("slider"),"v"==e.orientation&&this.classes.add("vertical"),this._minValue=e.minValue||0,this._maxValue=e.maxValue||100,this._initValue=this.state.get("value")},renderHtml:function(){var e=this._id,t=this.classPrefix;return'<div id="'+e+'" class="'+this.classes+'"><div id="'+e+'-handle" class="'+t+'slider-handle" role="slider" tabindex="-1"></div></div>'},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,m,g=this;function v(e){var t;t=g.value(),t=x(t=function(e,t,n){return n*(t-e)-e}(p,m,function(e,t,n){return(n+e)/(t-e)}(p,m,t)+.05*e),p,m),g.value(t),g.fire("dragstart",{value:t}),g.fire("drag",{value:t}),g.fire("dragend",{value:t})}e=g._minValue,t=g._maxValue,o="v"==g.settings.orientation?(n="screenY",r="top",i="height","h"):(n="screenX",r="left",i="width","w"),g._super(),p=e,m=t,g.getEl("handle"),g.on("keydown",function(e){switch(e.keyCode){case 37:case 38:v(-1);break;case 39:case 40:v(1)}}),a=e,s=t,l=g.getEl("handle"),g._dragHelper=new y(g._id,{handle:g._id+"-handle",start:function(e){u=e[n],c=parseInt(g.getEl("handle").style[r],10),d=(g.layoutRect()[o]||100)-b.getSize(l)[i],g.fire("dragstart",{value:h})},drag:function(e){var t=e[n]-u;f=x(c+t,0,d),l.style[r]=f+"px",h=a+f/d*(s-a),g.value(h),g.tooltip().text(""+g.settings.previewFilter(h)).show().moveRel(l,"bc tc"),g.fire("drag",{value:h})},stop:function(){g.tooltip().hide(),g.fire("dragend",{value:h})}})},repaint:function(){this._super(),n(this,this.value())},bindStates:function(){var t=this;return t.state.on("change:value",function(e){n(t,e.value)}),t._super()}})}),e(Jt,[Be],function(e){return e.extend({renderHtml:function(){return this.classes.add("spacer"),this.canFocus=!1,'<div id="'+this._id+'" class="'+this.classes+'"></div>'}})}),e(Zt,[zt,he,f],function(e,i,o){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,t,n=this.getEl(),r=this.layoutRect();return this._super(),e=n.firstChild,t=n.lastChild,o(e).css({width:r.w-i.getSize(t).width,height:r.h-2}),o(t).css({height:r.h-2}),this},activeMenu:function(e){o(this.getEl().lastChild).toggleClass(this.classPrefix+"active",e)},renderHtml:function(){var e,t=this,n=t._id,r=t.classPrefix,i=t.state.get("icon"),o=t.state.get("text"),a="";return e=(e=t.settings.image)?(i="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1])," style=\"background-image: url('"+e+"')\""):"",i=t.settings.icon?r+"ico "+r+"i-"+i:"",o&&(t.classes.add("btn-has-text"),a='<span class="'+r+'txt">'+t.encode(o)+"</span>"),'<div id="'+n+'" class="'+t.classes+'" role="button" tabindex="-1"><button type="button" hidefocus="1" tabindex="-1">'+(i?'<i class="'+i+'"'+e+"></i>":"")+a+'</button><button type="button" class="'+r+'open" hidefocus="1" tabindex="-1">'+(t._menuBtnText?(i?" ":"")+t._menuBtnText:"")+' <i class="'+r+'caret"></i></button></div>'},postRender:function(){var n=this.settings.onclick;return this.on("click",function(e){var t=e.target;if(e.control==this)for(;t;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==t.nodeName&&-1==t.className.indexOf("open"))return e.stopImmediatePropagation(),void(n&&n.call(this,e));t=t.parentNode}}),delete this.settings.onclick,this._super()}})}),e(Qt,[Dt],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),e(en,[Ee,f,he],function(e,t,i){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(n){var e;this.activeTabId&&(e=this.getEl(this.activeTabId),t(e).removeClass(this.classPrefix+"active"),e.setAttribute("aria-selected","false")),this.activeTabId="t"+n,(e=this.getEl("t"+n)).setAttribute("aria-selected","true"),t(e).addClass(this.classPrefix+"active"),this.items()[n].show().fire("showtab"),this.reflow(),this.items().each(function(e,t){n!=t&&e.hide()})},renderHtml:function(){var r=this,e=r._layout,i="",o=r.classPrefix;return r.preRender(),e.preRender(r),r.items().each(function(e,t){var n=r._id+"-t"+t;e.aria("role","tabpanel"),e.aria("labelledby",n),i+='<div id="'+n+'" class="'+o+'tab" unselectable="on" role="tab" aria-controls="'+e._id+'" aria-selected="false" tabIndex="-1">'+r.encode(e.settings.title)+"</div>"}),'<div id="'+r._id+'" class="'+r.classes+'" hidefocus="1" tabindex="-1"><div id="'+r._id+'-head" class="'+o+'tabs" role="tablist">'+i+'</div><div id="'+r._id+'-body" class="'+r.bodyClasses+'">'+e.renderHtml(r)+"</div></div>"},postRender:function(){var r=this;r._super(),r.settings.activeTab=r.settings.activeTab||0,r.activateTab(r.settings.activeTab),this.on("click",function(e){var t=e.target.parentNode;if(t&&t.id==r._id+"-head")for(var n=t.childNodes.length;n--;)t.childNodes[n]==e.target&&r.activateTab(n)})},initLayoutRect:function(){var e,t,n;t=(t=i.getSize(this.getEl("head")).width)<0?0:t,n=0,this.items().each(function(e){t=Math.max(t,e.layoutRect().minW),n=Math.max(n,e.layoutRect().minH)}),this.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=t,e.settings.h=n,e.layoutRect({x:0,y:0,w:t,h:n})});var r=i.getSize(this.getEl("head")).height;return this.settings.minWidth=t,this.settings.minHeight=n+r,(e=this._super()).deltaH+=r,e.innerH=e.h-e.deltaH,e}})}),e(tn,[Be,d,he],function(e,r,i){return e.extend({init:function(e){var n=this;n._super(e),n.classes.add("textbox"),e.multiline?n.classes.add("multiline"):(n.on("keydown",function(e){var t;13==e.keyCode&&(e.preventDefault(),n.parents().reverse().each(function(e){if(e.toJSON)return t=e,!1}),n.fire("submit",{data:t.toJSON()}))}),n.on("keyup",function(e){n.state.set("value",e.target.value)}))},repaint:function(){var e,t,n,r,i,o=0;e=this.getEl().style,t=this._layoutRect,i=this._lastRepaintRect||{};var a=document;return!this.settings.multiline&&a.all&&(!a.documentMode||a.documentMode<=8)&&(e.lineHeight=t.h-o+"px"),r=(n=this.borderBox).left+n.right+8,o=n.top+n.bottom+(this.settings.multiline?8:0),t.x!==i.x&&(e.left=t.x+"px",i.x=t.x),t.y!==i.y&&(e.top=t.y+"px",i.y=t.y),t.w!==i.w&&(e.width=t.w-r+"px",i.w=t.w),t.h!==i.h&&(e.height=t.h-o+"px",i.h=t.h),this._lastRepaintRect=i,this.fire("repaint",{},!1),this},renderHtml:function(){var t,e,n=this.settings;return t={id:this._id,hidefocus:"1"},r.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){t[e]=n[e]}),this.disabled()&&(t.disabled="disabled"),n.subtype&&(t.type=n.subtype),(e=i.create(n.multiline?"textarea":"input",t)).value=this.state.get("value"),e.className=this.classes,e.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var t=this;t.getEl().value=t.state.get("value"),t._super(),t.$el.on("change",function(e){t.state.set("value",e.target.value),t.fire("change",e)})},bindStates:function(){var t=this;return t.state.on("change:value",function(e){t.getEl().value!=e.value&&(t.getEl().value=e.value)}),t.state.on("change:disabled",function(e){t.getEl().disabled=e.value}),t._super()},remove:function(){this.$el.off(),this._super()}})}),e("tinymce/Register",[],function(){var e=this||window;return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],function(){return e.tinymce})),"object"==typeof rn&&(rn.exports=window.tinymce),{}}),function(e){var t,n,r,i,o;for(t=0;t<e.length;t++){n=s,i=(r=e[t]).split(/[.\/]/);for(var a=0;a<i.length-1;++a)n[i[a]]===ye&&(n[i[a]]={}),n=n[i[a]];n[i[i.length-1]]=l[r]}if(s.AMDLC_TESTS){for(r in o=s.privateModules||{},l)o[r]=l[r];for(t=0;t<e.length;t++)delete o[e[t]];s.privateModules=o}}([t,n,r,i,a,u,d,f,h,p,g,y,b,x,E,_,k,N,T,A,R,B,M,O,z,V,G,J,ie,oe,ae,se,ue,de,fe,ge,ve,be,xe,$e,we,Ce,Ee,Se,_e,ke,Ne,Te,Ae,Re,Be,De,Me,Oe,Ie,He,rt,it,ot,at,st,lt,ut,ct,dt,ft,ht,pt,mt,gt,vt,yt,bt,xt,$t,wt,Ct,Et,St,_t,kt,Nt,At,Rt,Bt,Dt,Ot,Pt,Lt,It,Ft,Ht,Ut,zt,Vt,jt,Wt,qt,Gt,Xt,Yt,Kt,Jt,Zt,Qt,en,tn])}(window)}).call(this,e("timers").setImmediate)},{timers:10}],17:[function(e,t,n){angular.module("ui.tinymce",[]).value("uiTinymceConfig",{}).directive("uiTinymce",["$rootScope","$compile","$timeout","$window","$sce","uiTinymceConfig","uiTinymceService",function(v,y,b,x,$,w,C){return(w=w||{}).baseUrl&&(tinymce.baseURL=w.baseUrl),{require:["ngModel","^?form"],priority:599,link:function(o,a,s,e){if(x.tinymce){function n(e){var t=e.getContent({format:u.format}).trim();t=$.trustAsHtml(t),i.$setViewValue(t),v.$$phase||o.$digest()}var t,r,i=e[0],l=e[1]||null,u={debounce:!0},c=C.getUniqueId();s.$set("id",c),t={},angular.extend(t,o.$eval(s.uiTinymce));var d,f=function(t){b.cancel(d),d=b(function(){var e;(e=t).isDirty()&&(e.save(),n(e))},400)},h={setup:function(e){e.on("init",function(){i.$render(),i.$setPristine(),i.$setUntouched(),l&&l.$setPristine()}),e.on("ExecCommand change NodeChange ObjectResized",function(){if(!u.debounce)return e.save(),void n(e);f(e)}),e.on("blur",function(){a[0].blur(),i.$setTouched(),v.$$phase||o.$digest()}),e.on("remove",function(){a.remove()}),w.setup&&w.setup(e,{updateView:n}),t.setup&&t.setup(e,{updateView:n})},format:t.format||"html",selector:"#"+s.id};angular.extend(u,w,t,h),b(function(){u.baseURL&&(tinymce.baseURL=u.baseURL);var e=tinymce.init(u);e&&"function"==typeof e.then?e.then(function(){m(o.$eval(s.ngDisabled))}):m(o.$eval(s.ngDisabled))}),i.$formatters.unshift(function(e){return e?$.trustAsHtml(e):""}),i.$parsers.unshift(function(e){return e?$.getTrustedHtml(e):""}),i.$render=function(){g();var e=i.$viewValue?$.getTrustedHtml(i.$viewValue):"";r&&r.getDoc()&&(r.setContent(e),r.fire("change"))},s.$observe("disabled",m);var p=o.$on("$tinymce:refresh",function(e,t){var n=s.id;if(angular.isUndefined(t)||t===n){var r=a.parent(),i=a.clone();i.removeAttr("id"),i.removeAttr("style"),i.removeAttr("aria-hidden"),tinymce.execCommand("mceRemoveEditor",!1,n),r.append(y(i)(o)),p()}});o.$on("$destroy",function(){g(),r&&(r.remove(),r=null)})}function m(e){e?(g(),r&&r.getBody().setAttribute("contenteditable",!1)):(g(),r&&!r.settings.readonly&&r.getDoc()&&r.getBody().setAttribute("contenteditable",!0))}function g(){r=r||tinymce.get(s.id)}}}}]).service("uiTinymceService",[function(){return new function(){var e=0;return{getUniqueId:function(){return"ui-tinymce-"+ ++e}}}}])},{}]},{},[15]);