Version Description
- fixed onLoad problem
Download this release
Release Info
Developer | sewpafly |
Plugin | Post Thumbnail Editor |
Version | 2.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.2.1
- README.txt +4 -1
- js-build/main.js +1 -1
- js-build/main.js.gz +0 -0
- js/csmain.coffee +31 -1
- post-thumbnail-editor.php +2 -2
README.txt
CHANGED
@@ -75,6 +75,9 @@ If you want to post a problem on the [support forums][wp] or at [github][gh] ple
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
78 |
= 2.2.0 =
|
79 |
* View the thumbnails you are planning on modifying from the crop tab
|
80 |
* New documentation at http://sewpafly.github.io/post-thumbnail-editor
|
@@ -149,5 +152,5 @@ If you want to post a problem on the [support forums][wp] or at [github][gh] ple
|
|
149 |
|
150 |
== Upgrade Notice ==
|
151 |
|
152 |
-
= 2.2.
|
153 |
Several new features and bug fixes since 2.1.0
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 2.2.1 =
|
79 |
+
* fixed onLoad problem
|
80 |
+
|
81 |
= 2.2.0 =
|
82 |
* View the thumbnails you are planning on modifying from the crop tab
|
83 |
* New documentation at http://sewpafly.github.io/post-thumbnail-editor
|
152 |
|
153 |
== Upgrade Notice ==
|
154 |
|
155 |
+
= 2.2.1 =
|
156 |
Several new features and bug fixes since 2.1.0
|
js-build/main.js
CHANGED
@@ -17,4 +17,4 @@
|
|
17 |
* https://github.com/tapmodo/Jcrop
|
18 |
*/
|
19 |
|
20 |
-
(function(){var e,t,n;(function(r){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(e){if(d(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!d(a,e)&&!d(c,e))throw new Error("No "+e);return a[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(e,t,n,i){var s,l,h,p,v,g=[],w;i=i||e;if(typeof n=="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(v=0;v<t.length;v+=1){p=o(t[v],i),l=p.f;if(l==="require")g[v]=u.require(e);else if(l==="exports")g[v]=u.exports(e),w=!0;else if(l==="module")s=g[v]=u.module(e);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=n.apply(a[e],g);if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!w)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){return typeof e=="string"?u[e]?u[e](t):b(o(e,t).f):(e.splice||(l=e,t.splice?(e=t,t=n,n=null):e=r),t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},n=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}})(),n("../apps/requirejs/almond",function(){}),n("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){n("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e,t,n){var i;if(e)if(E(e))for(i in e)i!="prototype"&&i!="length"&&i!="name"&&e.hasOwnProperty(i)&&t.call(n,e[i],i);else if(e.forEach&&e.forEach!==r)e.forEach(t,n);else if(!e||typeof e.length!="number"?0:typeof e.hasOwnProperty!="function"&&typeof e.constructor!="function"||e instanceof K||Ln&&e instanceof Ln||Mn.call(e)!=="[object Object]"||typeof e.callee=="function")for(i=0;i<e.length;i++)t.call(n,e[i],i);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i);return e}function i(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=i(e),s=0;s<r.length;s++)t.call(n,e[r[s]],r[s]);return r}function o(e){return function(t,n){e(n,t)}}function u(){for(var e=Hn.length,t;e;){e--,t=Hn[e].charCodeAt(0);if(t==57)return Hn[e]="A",Hn.join("");if(t!=90)return Hn[e]=String.fromCharCode(t+1),Hn.join("");Hn[e]="0"}return Hn.unshift("0"),Hn.join("")}function a(e){return r(arguments,function(t){t!==e&&r(t,function(t,n){e[n]=t})}),e}function f(e){return parseInt(e,10)}function l(e,t){return a(new(a(function(){},{prototype:e})),t)}function c(){}function h(e){return e}function p(e){return function(){return e}}function d(e){return typeof e=="undefined"}function v(e){return typeof e!="undefined"}function m(e){return e!=null&&typeof e=="object"}function g(e){return typeof e=="string"}function y(e){return typeof e=="number"}function b(e){return Mn.apply(e)=="[object Date]"}function w(e){return Mn.apply(e)=="[object Array]"}function E(e){return typeof e=="function"}function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function x(e){return g(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}function T(e){return e&&(e.nodeName||e.bind&&e.find)}function N(e,t,n){var i=[];return r(e,function(e,r,s){i.push(t.call(n,e,r,s))}),i}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function k(e,t){var n=C(e,t);return n>=0&&e.splice(n,1),t}function L(e,t){if(S(e)||e&&e.$evalAsync&&e.$watch)throw Error("Can't copy Window or Scope");if(t){if(e===t)throw Error("Can't copy equivalent objects or arrays");if(w(e))for(var n=t.length=0;n<e.length;n++)t.push(L(e[n]));else for(n in r(t,function(e,n){delete t[n]}),e)t[n]=L(e[n])}else(t=e)&&(w(e)?t=L(e,[]):b(e)?t=new Date(e.getTime()):m(e)&&(t=L(e,{})));return t}function A(e,t){var t=t||{},n;for(n in e)e.hasOwnProperty(n)&&n.substr(0,2)!=="$$"&&(t[n]=e[n]);return t}function O(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&r=="object"){if(!w(e)){if(b(e))return b(t)&&e.getTime()==t.getTime();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||S(e)||S(t))return!1;r={};for(i in e)if(i.charAt(0)!=="$"&&!E(e[i])){if(!O(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&i.charAt(0)!=="$"&&t[i]!==n&&!E(t[i]))return!1;return!0}if((r=e.length)==t.length){for(i=0;i<r;i++)if(!O(e[i],t[i]))return!1;return!0}}return!1}function M(e,t){var n=arguments.length>2?An.call(arguments,2):[];return!E(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(An.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function _(e,r){var i=r;return/^\$+/.test(e)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function D(e,t){return JSON.stringify(e,_,t?" ":null)}function P(e){return g(e)?JSON.parse(e):e}function H(e){return e&&e.length!==0?(e=Tn(""+e),e=e!="f"&&e!="0"&&e!="false"&&e!="no"&&e!="n"&&e!="[]"):e=!1,e}function B(e){e=kn(e).clone();try{e.html("")}catch(t){}var n=kn("<div>").append(e).html();try{return e[0].nodeType===3?Tn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tn(t)})}catch(r){return Tn(n)}}function j(e){var t={},n,i;return r((e||"").split("&"),function(e){e&&(n=e.split("="),i=decodeURIComponent(n[0]),t[i]=v(n[1])?decodeURIComponent(n[1]):!0)}),t}function F(e){var t=[];return r(e,function(e,n){t.push(q(n,!0)+(e===!0?"":"="+q(e,!0)))}),t.length?t.join("&"):""}function I(e){return q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function R(e,n){function i(e){e&&s.push(e)}var s=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(a,function(n){a[n]=!0,i(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(r(e.querySelectorAll("."+n),i),r(e.querySelectorAll("."+n+"\\:"),i),r(e.querySelectorAll("["+n+"]"),i))}),r(s,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):r(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function U(t,n){var i=function(){t=kn(t),n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),n.unshift("ng");var e=dt(n);return e.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},s=/^NG_DEFER_BOOTSTRAP!/;if(e&&!s.test(e.name))return i();e.name=e.name.replace(s,""),_n.resumeBootstrap=function(e){r(e,function(e){n.push(e)}),i()}}function z(e,t){return t=t||"_",e.replace(Bn,function(e,n){return(n?t:"")+e.toLowerCase()})}function W(e,t,n){if(!e)throw Error("Argument '"+(t||"?")+"' is "+(n||"required"));return e}function X(e,t,n){return n&&w(e)&&(e=e[e.length-1]),W(E(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function V(e){function t(e,t,n){return e[t]||(e[t]=n())}return t(t(e,"angular",Object),"module",function(){var e={};return function(n,r,i){return r&&e.hasOwnProperty(n)&&(e[n]=null),t(e,n,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),u}}if(!r)throw Error("No module: "+n);var t=[],s=[],o=e("$injector","invoke"),u={_invokeQueue:t,_runBlocks:s,requires:r,name:n,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:o,run:function(e){return s.push(e),this}};return i&&o(i),u})}})}function $(e){return e.replace(zn,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Wn,"Moz$1")}function J(e,t){function n(){var e;for(var n=[this],i=t,s,o,u,a,f,l;n.length;){s=n.shift(),o=0;for(u=s.length;o<u;o++){a=kn(s[o]),i?a.triggerHandler("$destroy"):i=!i,f=0;for(e=(l=a.children()).length,a=e;f<a;f++)n.push(Ln(l[f]))}}return r.apply(this,arguments)}var r=Ln.fn[e],r=r.$original||r;n.$original=r,Ln.fn[e]=n}function K(e){if(e instanceof K)return e;if(!(this instanceof K)){if(g(e)&&e.charAt(0)!="<")throw Error("selectors not implemented");return new K(e)}if(g(e)){var n=t.createElement("div");n.innerHTML="<div> </div>"+e,n.removeChild(n.firstChild),st(this,n.childNodes),this.remove()}else st(this,e)}function Q(e){return e.cloneNode(!0)}function G(e){Z(e);for(var t=0,e=e.childNodes||[];t<e.length;t++)G(e[t])}function Y(e,t,n){var i=et(e,"events");et(e,"handle")&&(d(t)?r(i,function(t,n){Un(e,n,t),delete i[n]}):d(n)?(Un(e,t,i[t]),delete i[t]):k(i[t],n))}function Z(e){var t=e[In],r=Fn[t];r&&(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Y(e)),delete Fn[t],e[In]=n)}function et(e,t,n){var r=e[In],r=Fn[r||-1];if(!v(n))return r&&r[t];r||(e[In]=r=++qn,r=Fn[r]={}),r[t]=n}function tt(e,t,n){var r=et(e,"data"),i=v(n),s=!i&&v(t),o=s&&!m(t);!r&&!o&&et(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];a(r,t)}}function nt(e,t){return(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function rt(e,t){t&&r(t.split(" "),function(t){e.className=x((" "+e.className+" ").replace(/[\n\t]/g," ").replace(" "+x(t)+" "," "))})}function it(e,t){t&&r(t.split(" "),function(t){nt(e,t)||(e.className=x(e.className+" "+x(t)))})}function st(e,t){if(t)for(var t=!t.nodeName&&v(t.length)&&!S(t)?t:[t],n=0;n<t.length;n++)e.push(t[n])}function ot(e,t){return ut(e,"$"+(t||"ngController")+"Controller")}function ut(e,t,n){e=kn(e);for(e[0].nodeType==9&&(e=e.find("html"));e.length;){if(n=e.data(t))return n;e=e.parent()}}function at(e,t){var n=Vn[t.toLowerCase()];return n&&$n[e.nodeName]&&n}function ft(e,n){var i=function(i,s){i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t);if(d(i.defaultPrevented)){var o=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,o.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){return i.defaultPrevented},r(n[s||i.type],function(t){t.call(e,i)}),Cn<=8?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(delete i.preventDefault,delete i.stopPropagation,delete i.isDefaultPrevented)};return i.elem=e,i}function lt(e){var t=typeof e,r;return t=="object"&&e!==null?typeof (r=e.$$hashKey)=="function"?r=e.$$hashKey():r===n&&(r=e.$$hashKey=u()):r=e,t+":"+r}function ct(e){r(e,this.put,this)}function ht(){}function pt(e){var t,n;return typeof e=="function"?(t=e.$inject)||(t=[],n=e.toString().replace(Gn,""),n=n.match(Jn),r(n[1].split(Kn),function(e){e.replace(Qn,function(e,n,r){t.push(r)})}),e.$inject=t):w(e)?(n=e.length-1,X(e[n],"fn"),t=e.slice(0,n)):X(e,"fn",!0),t}function dt(e){function t(e){return function(t,n){if(!m(t))return e(t,n);r(t,o(e))}}function n(e,t){if(E(t)||w(t))t=v.instantiate(t);if(!t.$get)throw Error("Provider "+e+" must define $get factory method.");return d[e+f]=t}function i(e,t){return n(e,{$get:t})}function s(e){var t=[];return r(e,function(e){if(!h.get(e))if(h.put(e,!0),g(e)){var n=Dn(e);t=t.concat(s(n.requires)).concat(n._runBlocks);try{for(var r=n._invokeQueue,n=0,i=r.length;n<i;n++){var o=r[n],u=o[0]=="$injector"?v:v.get(o[0]);u[o[1]].apply(u,o[2])}}catch(a){throw a.message&&(a.message+=" from "+e),a}}else if(E(e))try{t.push(v.invoke(e))}catch(f){throw f.message&&(f.message+=" from "+e),f}else if(w(e))try{t.push(v.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+String(e[e.length-1])),l}else X(e,"module")}),t}function u(e,t){function n(n){if(typeof n!="string")throw Error("Service name expected");if(e.hasOwnProperty(n)){if(e[n]===a)throw Error("Circular dependency: "+l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=a,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=pt(e),o,u,a;u=0;for(o=s.length;u<o;u++)a=s[u],i.push(r&&r.hasOwnProperty(a)?r[a]:n(a));e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(w(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),m(i)?i:n},get:n,annotate:pt}}var a={},f="Provider",l=[],h=new ct,d={$provide:{provider:t(n),factory:t(i),service:t(function(e,t){return i(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return i(e,p(t))}),constant:t(function(e,t){d[e]=t,y[e]=t}),decorator:function(e,t){var n=v.get(e+f),r=n.$get;n.$get=function(){var e=b.invoke(r,n);return b.invoke(t,null,{$delegate:e})}}}},v=u(d,function(){throw Error("Unknown provider: "+l.join(" <- "))}),y={},b=y.$injector=u(y,function(e){return e=v.get(e+f),b.invoke(e.$get,e)});return r(s(e),function(e){b.invoke(e||c)}),b}function vt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function s(e){var t=null;return r(e,function(e){!t&&Tn(e.nodeName)==="a"&&(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=s(u.getElementsByName(e)))?r.scrollIntoView():e==="top"&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(o)}),o}]}function mt(e,t,i,s){function o(e){try{e.apply(null,An.call(arguments,1))}finally{if(b--,b===0)for(;w.length;)try{w.pop()()}catch(t){i.error(t)}}}function u(e,t){(function n(){r(E,function(e){e()}),S=t(n,e)})()}function a(){x!=f.url()&&(x=f.url(),r(N,function(e){e(f.url())}))}var f=this,l=t[0],h=e.location,p=e.history,v=e.setTimeout,m=e.clearTimeout,y={};f.isMock=!1;var b=0,w=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){b++},f.notifyWhenNoOutstandingRequests=function(e){r(E,function(e){e()}),b===0?e():w.push(e)};var E=[],S;f.addPollFn=function(e){return d(S)&&u(100,v),E.push(e),e};var x=h.href,T=t.find("base");f.url=function(e,t){if(!e)return h.href.replace(/%27/g,"'");if(x!=e)return x=e,s.history?t?p.replaceState(null,"",e):(p.pushState(null,"",e),T.attr("href",T.attr("href"))):t?h.replace(e):h.href=e,f};var N=[],C=!1;f.onUrlChange=function(t){return C||(s.history&&kn(e).bind("popstate",a),s.hashchange?kn(e).bind("hashchange",a):f.addPollFn(a),C=!0),N.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var k={},L="",A=f.baseHref();f.cookies=function(e,t){var r,s,o,u;if(!e){if(l.cookie!==L){L=l.cookie,r=L.split("; "),k={};for(o=0;o<r.length;o++)s=r[o],u=s.indexOf("="),u>0&&(k[unescape(s.substring(0,u))]=unescape(s.substring(u+1)))}return k}t===n?l.cookie=escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":g(t)&&(r=(l.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return b++,n=v(function(){delete y[n],o(e)},t||0),y[n]=!0,n},f.defer.cancel=function(e){return y[e]?(delete y[e],m(e),o(c),!0):!1}}function gt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new mt(e,r,t,n)}]}function yt(){this.$get=function(){function e(e,n){function r(e){e!=c&&(h?h==e&&(h=e.n):h=e,i(e.n,e.p),i(e,c),c=e,c.n=null)}function i(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw Error("cacheId "+e+" taken");var s=0,o=a({},n,{id:e}),u={},f=n&&n.capacity||Number.MAX_VALUE,l={},c=null,h=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});r(n),d(t)||(e in u||s++,u[e]=t,s>f&&this.remove(h.key))},get:function(e){var t=l[e];if(t)return r(t),u[e]},remove:function(e){var t=l[e];t&&(t==c&&(c=t.p),t==h&&(h=t.n),i(t.n,t.p),delete l[e],delete u[e],s--)},removeAll:function(){u={},s=0,l={},c=h=null},destroy:function(){l=o=u=null,delete t[e]},info:function(){return a({},o,{size:s})}}}var t={};return e.info=function(){var e={};return r(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function bt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function wt(e){var i={},s="Directive",u=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,l="Template must have exactly one root element. was: ",c=/^\s*(https?|ftp|mailto|file):/;this.directive=function d(t,n){return g(t)?(W(n,"directive"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+s,["$injector","$exceptionHandler",function(e,n){var s=[];return r(i[t],function(r){try{var i=e.invoke(r);E(i)?i={compile:p(i)}:!i.compile&&i.link&&(i.compile=p(i.link)),i.priority=i.priority||0,i.name=i.name||t,i.require=i.require||i.controller&&i.name,i.restrict=i.restrict||"A",s.push(i)}catch(o){n(o)}}),s}])),i[t].push(n)):r(t,o(d)),this},this.urlSanitizationWhitelist=function(e){return v(e)?(c=e,this):c},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(e,o,d,v,y,b,S,T,N){function C(e,t,n){e instanceof kn||(e=kn(e)),r(e,function(t,n){t.nodeType==3&&t.nodeValue.match(/\S+/)&&(e[n]=kn(t).wrap("<span></span>").parent()[0])});var i=L(e,t,e,n);return function(t,n){W(t,"scope");for(var r=n?Xn.clone.call(e):e,s=0,o=r.length;s<o;s++){var u=r[s];(u.nodeType==1||u.nodeType==9)&&r.eq(s).data("$scope",t)}return k(r,"ng-scope"),n&&n(r,t),i&&i(t,r,r),r}}function k(e,t){try{e.addClass(t)}catch(n){}}function L(e,t,r,i){function s(e,r,i,s){var u,a,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=o.length;c<h;p++)a=d[p],r=o[c++],u=o[c++],r?(r.scope?(f=e.$new(m(r.scope)),kn(a).data("$scope",f)):f=e,(l=r.transclude)||!s&&t?r(u,f,a,i,function(t){return function(n){var r=e.$new();return r.$$transcluded=!0,t(r,n).bind("$destroy",M(r,r.$destroy))}}(l||t)):r(u,f,a,n,s)):u&&u(e,a.childNodes,n,s)}for(var o=[],u,a,f,l=0;l<e.length;l++)a=new U,u=O(e[l],[],a,i),a=(u=u.length?_(u,e[l],a,t,r):null)&&u.terminal||!e[l].childNodes||!e[l].childNodes.length?null:L(e[l].childNodes,u?u.transclude:t),o.push(u),o.push(a),f=f||u||a;return f?s:null}function O(e,t,n,r){var i=n.$attr,s;switch(e.nodeType){case 1:D(t,Et(Pn(e).toLowerCase()),"E",r);var o,a,l;s=e.attributes;for(var c=0,h=s&&s.length;c<h;c++)if(o=s[c],o.specified)a=o.name,l=Et(a.toLowerCase()),i[l]=a,n[l]=o=x(Cn&&a=="href"?decodeURIComponent(e.getAttribute(a,2)):o.value),at(e,l)&&(n[l]=!0),q(e,t,o,l),D(t,l,"A",r);e=e.className;if(g(e)&&e!=="")for(;s=f.exec(e);)l=Et(s[2]),D(t,l,"C",r)&&(n[l]=x(s[3])),e=e.substr(s.index+s[0].length);break;case 3:I(t,e.nodeValue);break;case 8:try{if(s=u.exec(e.nodeValue))l=Et(s[1]),D(t,l,"M",r)&&(n[l]=x(s[2]))}catch(p){}}return t.sort(j),t}function _(e,i,s,o,u){function a(e,t){e&&(e.require=M.require,p.push(e)),t&&(t.require=M.require,v.push(t))}function f(e,t){var n,i="data",s=!1;if(g(e)){for(;(n=e.charAt(0))=="^"||n=="?";)e=e.substr(1),n=="^"&&(i="inheritedData"),s=s||n=="?";n=t[i]("$"+e+"Controller");if(!n&&!s)throw Error("No controller: "+e)}else w(e)&&(n=[],r(e,function(e){n.push(f(e,t))}));return n}function c(e,t,o,u,a){var l,c,h,m,g;l=i===o?s:A(s,new U(kn(o),s.$attr)),c=l.$$element;if(T){var y=/^\s*([@=&])\s*(\w*)\s*$/,w=t.$parent||t;r(T.scope,function(e,n){var r=e.match(y)||[],i=r[2]||n,r=r[1],s,o,u;t.$$isolateBindings[n]=r+i;switch(r){case"@":l.$observe(i,function(e){t[n]=e}),l.$$observers[i].$$scope=w;break;case"=":o=b(l[i]),u=o.assign||function(){throw s=t[n]=o(w),Error(Yn+l[i]+" (directive: "+T.name+")")},s=t[n]=o(w),t.$watch(function(){var e=o(w);return e!==t[n]&&(e!==s?s=t[n]=e:u(w,e=s=t[n])),e});break;case"&":o=b(l[i]),t[n]=function(e){return o(w,e)};break;default:throw Error("Invalid isolate scope definition for directive "+T.name+": "+e)}})}q&&r(q,function(e){var n={$scope:t,$element:c,$attrs:l,$transclude:a};g=e.controller,g=="@"&&(g=l[e.name]),c.data("$"+e.name+"Controller",S(g,n))}),u=0;for(h=p.length;u<h;u++)try{m=p[u],m(t,c,l,m.require&&f(m.require,c))}catch(E){d(E,B(c))}e&&e(t,o.childNodes,n,a),u=0;for(h=v.length;u<h;u++)try{m=v[u],m(t,c,l,m.require&&f(m.require,c))}catch(x){d(x,B(c))}}for(var h=-Number.MAX_VALUE,p=[],v=[],y=null,T=null,N=null,L=s.$$element=kn(i),M,_,D,j,I=o,q,z,W,X=0,V=e.length;X<V;X++){M=e[X],D=n;if(h>M.priority)break;if(W=M.scope)F("isolated scope",T,M,L),m(W)&&(k(L,"ng-isolate-scope"),T=M),k(L,"ng-scope"),y=y||M;_=M.name;if(W=M.controller)q=q||{},F("'"+_+"' controller",q[_],M,L),q[_]=M;if(W=M.transclude)F("transclusion",j,M,L),j=M,h=M.priority,W=="element"?(D=kn(i),L=s.$$element=kn(t.createComment(" "+_+": "+s[_]+" ")),i=L[0],R(u,kn(D[0]),i),I=C(D,o,h)):(D=kn(Q(i)).contents(),L.html(""),I=C(D,o));if(W=M.template)if(F("template",N,M,L),N=M,W=J(W),M.replace){D=kn("<div>"+x(W)+"</div>").contents(),i=D[0];if(D.length!=1||i.nodeType!==1)throw Error(l+W);R(u,L,i),_={$attr:{}},e=e.concat(O(i,e.splice(X+1,e.length-(X+1)),_)),P(s,_),V=e.length}else L.html(W);if(M.templateUrl)F("template",N,M,L),N=M,c=H(e.splice(X,e.length-X),c,L,s,u,M.replace,I),V=e.length;else if(M.compile)try{z=M.compile(L,s,I),E(z)?a(null,z):z&&a(z.pre,z.post)}catch($){d($,B(L))}M.terminal&&(c.terminal=!0,h=Math.max(h,M.priority))}return c.scope=y&&y.scope,c.transclude=j&&I,c}function D(t,r,o,u){var a=!1;if(i.hasOwnProperty(r))for(var f,r=e.get(r+s),l=0,c=r.length;l<c;l++)try{if(f=r[l],(u===n||u>f.priority)&&f.restrict.indexOf(o)!=-1)t.push(f),a=!0}catch(h){d(h)}return a}function P(e,t){var n=t.$attr,i=e.$attr,s=e.$$element;r(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&(r+=(i==="style"?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){r=="class"?(k(s,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):r=="style"?s.attr("style",s.attr("style")+";"+t):r.charAt(0)!="$"&&!e.hasOwnProperty(r)&&(e[r]=t,i[r]=n[r])})}function H(e,t,n,r,i,s,o){var u=[],f,c,h=n[0],p=e.shift(),d=a({},p,{controller:null,templateUrl:null,transclude:null,scope:null});return n.html(""),v.get(p.templateUrl,{cache:y}).success(function(a){var p,v,a=J(a);if(s){v=kn("<div>"+x(a)+"</div>").contents(),p=v[0];if(v.length!=1||p.nodeType!==1)throw Error(l+a);a={$attr:{}},R(i,n,p),O(p,e,a),P(r,a)}else p=h,n.html(a);e.unshift(d),f=_(e,p,r,o);for(c=L(n[0].childNodes,o);u.length;){var m=u.pop(),a=u.pop();v=u.pop();var g=u.pop(),y=p;v!==h&&(y=Q(p),R(a,kn(v),y)),f(function(){t(c,g,y,i,m)},g,y,i,m)}u=null}).error(function(e,t,n,r){throw Error("Failed to load template: "+r.url)}),function(e,n,r,i,s){u?(u.push(n),u.push(r),u.push(i),u.push(s)):f(function(){t(c,n,r,i,s)},n,r,i,s)}}function j(e,t){return t.priority-e.priority}function F(e,t,n,r){if(t)throw Error("Multiple directives ["+t.name+", "+n.name+"] asking for "+e+" on: "+B(r))}function I(e,t){var n=o(t,!0);n&&e.push({priority:0,compile:p(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),k(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function q(e,t,r,i){var s=o(r,!0);s&&t.push({priority:100,compile:p(function(e,t,r){t=r.$$observers||(r.$$observers={}),i==="class"&&(s=o(r[i],!0)),r[i]=n,(t[i]||(t[i]=[])).$$inter=!0,(r.$$observers&&r.$$observers[i].$$scope||e).$watch(s,function(e){r.$set(i,e)})})})}function R(e,t,n){var r=t[0],i=r.parentNode,s,o;if(e){s=0;for(o=e.length;s<o;s++)if(e[s]==r){e[s]=n;break}}i&&i.replaceChild(n,r),n[kn.expando]=r[kn.expando],t[0]=n}var U=function(e,t){this.$$element=e,this.$attr=t||{}};U.prototype={$normalize:Et,$set:function(e,t,i,s){var o=at(this.$$element[0],e),u=this.$$observers;o&&(this.$$element.prop(e,t),s=o),this[e]=t,s?this.$attr[e]=s:(s=this.$attr[e])||(this.$attr[e]=s=z(e,"-")),Pn(this.$$element[0])==="A"&&e==="href"&&(X.setAttribute("href",t),o=X.href,o.match(c)||(this[e]=t="unsafe:"+o)),i!==!1&&(t===null||t===n?this.$$element.removeAttr(s):this.$$element.attr(s,t)),u&&r(u[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),T.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var X=N[0].createElement("a"),V=o.startSymbol(),$=o.endSymbol(),J=V=="{{"||$=="}}"?h:function(e){return e.replace(/\{\{/g,V).replace(/}}/g,$)};return C}]}function Et(e){return $(e.replace(Zn,""))}function St(){var e={};this.register=function(t,n){m(t)?a(e,t):e[t]=n},this.$get=["$injector","$window",function(t,n){return function(r,i){if(g(r)){var s=r,r=e.hasOwnProperty(s)?e[s]:Rt(i.$scope,s,!0)||Rt(n,s,!0);X(r,s,!0)}return t.instantiate(r,i)}}]}function xt(){this.$get=["$window",function(e){return kn(e.document)}]}function Tt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse",function(r){function i(i,u){for(var a,f,l=0,c=[],h=i.length,p=!1,d=[];l<h;)(a=i.indexOf(e,l))!=-1&&(f=i.indexOf(t,a+s))!=-1?(l!=a&&c.push(i.substring(l,a)),c.push(l=r(p=i.substring(a+s,f))),l.exp=p,l=f+o,p=!0):(l!=h&&c.push(i.substring(l)),l=h);(h=c.length)||(c.push(""),h=1);if(!u||p)return d.length=h,l=function(e){for(var t=0,r=h,i;t<r;t++)typeof (i=c[t])=="function"&&(i=i(e),i==null||i==n?i="":typeof i!="string"&&(i=D(i))),d[t]=i;return d.join("")},l.exp=i,l.parts=c,l}var s=e.length,o=t.length;return i.startSymbol=function(){return e},i.endSymbol=function(){return t},i}]}function Ct(e){for(var e=e.split("/"),t=e.length;t--;)e[t]=I(e[t]);return e.join("/")}function kt(e,t){var n=er.exec(e),n={protocol:n[1],host:n[3],port:f(n[5])||rr[n[1]]||null,path:n[6]||"/",search:n[8],hash:n[10]};return t&&(t.$$protocol=n.protocol,t.$$host=n.host,t.$$port=n.port),n}function Lt(e,t,n){return e+"://"+t+(n==rr[e]?"":":"+n)}function At(e,t,n){var r=kt(e);return decodeURIComponent(r.path)!=t||d(r.hash)||r.hash.indexOf(n)!==0?e:Lt(r.protocol,r.host,r.port)+t.substr(0,t.lastIndexOf("/"))+r.hash.substr(n.length)}function Ot(e,t,n){var r=kt(e);if(decodeURIComponent(r.path)==t&&!d(r.hash)&&r.hash.indexOf(n)===0)return e;var i=r.search&&"?"+r.search||"",s=r.hash&&"#"+r.hash||"",o=t.substr(0,t.lastIndexOf("/")),u=r.path.substr(o.length);if(r.path.indexOf(o)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+o+'" !');return Lt(r.protocol,r.host,r.port)+t+"#"+n+u+i+s}function Mt(e,t,n){t=t||"",this.$$parse=function(e){var n=kt(e,this);if(n.path.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+t+'" !');this.$$path=decodeURIComponent(n.path.substr(t.length)),this.$$search=j(n.search),this.$$hash=n.hash&&decodeURIComponent(n.hash)||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+t+this.$$url},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function _t(e,t,n){var r;this.$$parse=function(e){var n=kt(e,this);if(n.hash&&n.hash.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing hash prefix "'+t+'" !');r=n.path+(n.search?"?"+n.search:""),n=nr.exec((n.hash||"").substr(t.length)),this.$$path=n[1]?(n[1].charAt(0)=="/"?"":"/")+decodeURIComponent(n[1]):"",this.$$search=j(n[3]),this.$$hash=n[5]&&decodeURIComponent(n[5])||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+r+(this.$$url?"#"+t+this.$$url:"")},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function Dt(e,t,n,r){_t.apply(this,arguments),this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return n+r+"#"+t+e.substr(n.length)}}function Pt(e){return function(){return this[e]}}function Ht(e,t){return function(n){return d(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Bt(){var t="",n=!1;this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return v(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f,l,c=i.url(),h=kt(c);n?(f=i.baseHref()||"/",l=f.substr(0,f.lastIndexOf("/")),h=Lt(h.protocol,h.host,h.port)+l+"/",a=s.history?new Mt(At(c,f,t),l,h):new Dt(Ot(c,f,t),t,h,f.substr(l.length+1))):(h=Lt(h.protocol,h.host,h.port)+(h.path||"")+(h.search?"?"+h.search:"")+"#"+t+"/",a=new _t(c,t,h)),o.bind("click",function(t){if(!t.ctrlKey&&!t.metaKey&&t.which!=2){for(var n=kn(t.target);Tn(n[0].nodeName)!=="a";)if(n[0]===o[0]||!(n=n.parent())[0])return;var i=n.prop("href"),s=a.$$rewriteAppUrl(i);i&&!n.attr("target")&&s&&(a.$$parse(s),r.$apply(),t.preventDefault(),e.angular["ff-684208-preventDefault"]=!0)}}),a.absUrl()!=c&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest())});var p=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;if(!p||e!=a.absUrl())p++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))});return a.$$replace=!1,p}),a}]}function jt(){this.$get=["$window",function(e){function t(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function n(n){var i=e.console||{},s=i[n]||i.log||c;return s.apply?function(){var e=[];return r(arguments,function(n){e.push(t(n))}),s.apply(i,e)}:function(e,t){s(e,t)}}return{log:n("log"),warn:n("warn"),info:n("info"),error:n("error")}}]}function Ft(e,t){function n(e){return e.indexOf(y)!=-1}function r(){return m+1<e.length?e.charAt(m+1):!1}function i(e){return"0"<=e&&e<="9"}function s(e){return e==" "||e=="\r"||e==" "||e=="\n"||e==""||e==" "}function o(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"==e||e=="$"}function u(e){return e=="-"||e=="+"||i(e)}function f(t,n,r){throw r=r||m,Error("Lexer Error: "+t+" at column"+(v(n)?"s "+n+"-"+m+" ["+e.substring(n,r)+"]":" "+r)+" in expression ["+e+"].")}function l(){for(var t="",n=m;m<e.length;){var s=Tn(e.charAt(m));if(s=="."||i(s))t+=s;else{var o=r();if(s=="e"&&u(o))t+=s;else if(u(s)&&o&&i(o)&&t.charAt(t.length-1)=="e")t+=s;else{if(!u(s)||!!o&&!!i(o)||t.charAt(t.length-1)!="e")break;f("Invalid exponent")}}m++}t*=1,p.push({index:n,text:t,json:!0,fn:function(){return t}})}function c(){for(var n="",r=m,u,f,l;m<e.length;){var c=e.charAt(m);if(c!="."&&!o(c)&&!i(c))break;c=="."&&(u=m),n+=c,m++}if(u)for(f=m;f<e.length;){c=e.charAt(f);if(c=="("){l=n.substr(u-r+1),n=n.substr(0,u-r),m=f;break}if(!s(c))break;f++}r={index:r,text:n};if(ir.hasOwnProperty(n))r.fn=r.json=ir[n];else{var h=zt(n,t);r.fn=a(function(e,t){return h(e,t)},{assign:function(e,t){return qt(e,n,t)}})}p.push(r),l&&(p.push({index:u,text:".",json:!1}),p.push({index:u+1,text:l,json:!1}))}function h(t){var n=m;m++;for(var r="",i=t,s=!1;m<e.length;){var o=e.charAt(m);i+=o;if(s)o=="u"?(o=e.substring(m+1,m+5),o.match(/[\da-f]{4}/i)||f("Invalid unicode escape [\\u"+o+"]"),m+=4,r+=String.fromCharCode(parseInt(o,16))):(s=sr[o],r+=s?s:o),s=!1;else if(o=="\\")s=!0;else{if(o==t){m++,p.push({index:n,text:i,string:r,json:!0,fn:function(){return r}});return}r+=o}m++}f("Unterminated quote",n)}for(var p=[],d,m=0,g=[],y,b=":";m<e.length;){y=e.charAt(m);if(n("\"'"))h(y);else if(i(y)||n(".")&&i(r()))l();else if(o(y)){if(c(),"{,".indexOf(b)!=-1&&g[0]=="{"&&(d=p[p.length-1]))d.json=d.text.indexOf(".")==-1}else if(n("(){}[].,;:"))p.push({index:m,text:y,json:":[,".indexOf(b)!=-1&&n("{[")||n("}]:,")}),n("{[")&&g.unshift(y),n("}]")&&g.shift(),m++;else{if(s(y)){m++;continue}var w=y+r(),E=ir[y],S=ir[w];S?(p.push({index:m,text:w,fn:S}),m+=2):E?(p.push({index:m,text:y,fn:E,json:"[,:".indexOf(b)!=-1&&n("+-")}),m+=1):f("Unexpected next character ",m,m+1)}b=y}return p}function It(e,t,r,i){function s(t,n){throw Error("Syntax Error: Token '"+n.text+"' "+t+" at column "+(n.index+1)+" of the expression ["+e+"] starting at ["+e.substring(n.index)+"].")}function o(){if(L.length===0)throw Error("Unexpected end of expression: "+e);return L[0]}function u(e,t,n,r){if(L.length>0){var i=L[0],s=i.text;if(s==e||s==t||s==n||s==r||!e&&!t&&!n&&!r)return i}return!1}function f(e,n,r,i){return(e=u(e,n,r,i))?(t&&!e.json&&s("is not valid json",e),L.shift(),e):!1}function l(e){f(e)||s("is unexpected, expecting ["+e+"]",u())}function h(e,t){return function(n,r){return e(n,r,t)}}function d(e,t,n){return function(r,i){return t(r,i,e,n)}}function v(){for(var e=[];;)if(L.length>0&&!u("}",")",";","]")&&e.push(D()),!f(";"))return e.length==1?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}}function m(){for(var e=f(),t=r(e.text),n=[];;){if(!(e=f(":"))){var i=function(e,r,i){for(var i=[i],s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return i}}n.push(A())}}function g(){for(var e=y(),t;;){if(!(t=f("||")))return e;e=d(e,t.fn,y())}}function y(){var e=b(),t;if(t=f("&&"))e=d(e,t.fn,y());return e}function b(){var e=w(),t;if(t=f("==","!="))e=d(e,t.fn,b());return e}function w(){var e;e=E();for(var t;t=f("+","-");)e=d(e,t.fn,E());if(t=f("<",">","<=",">="))e=d(e,t.fn,w());return e}function E(){for(var e=S(),t;t=f("*","/","%");)e=d(e,t.fn,S());return e}function S(){var e;return f("+")?x():(e=f("-"))?d(C,e.fn,S()):(e=f("!"))?h(e.fn,S()):x()}function x(){var e;if(f("("))e=D(),l(")");else if(f("["))e=T();else if(f("{"))e=N();else{var t=f();(e=t.fn)||s("not a primary expression",t)}for(var n;t=f("(","[",".");)t.text==="("?(e=O(e,n),n=null):t.text==="["?(n=e,e=_(e)):t.text==="."?(n=e,e=M(e)):s("IMPOSSIBLE");return e}function T(){var e=[];if(o().text!="]")do e.push(A());while(f(","));return l("]"),function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r}}function N(){var e=[];if(o().text!="}")do{var t=f(),t=t.string||t.text;l(":");var n=A();e.push({key:t,value:n})}while(f(","));return l("}"),function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i],o=s.value(t,n);r[s.key]=o}return r}}var C=p(0),k,L=Ft(e,i),A=function(){var t=g(),n,r;return(r=f("="))?(t.assign||s("implies assignment but ["+e.substring(0,r.index)+"] can not be assigned to",r),n=g(),function(e,r){return t.assign(e,n(e,r),r)}):t},O=function(e,t){var n=[];if(o().text!=")")do n.push(A());while(f(","));return l(")"),function(r,i){for(var s=[],o=t?t(r,i):r,u=0;u<n.length;u++)s.push(n[u](r,i));return u=e(r,i)||c,u.apply?u.apply(o,s):u(s[0],s[1],s[2],s[3],s[4])}},M=function(e){var t=f().text,n=zt(t,i);return a(function(t,r){return n(e(t,r),r)},{assign:function(n,r,i){return qt(e(n,i),t,r)}})},_=function(e){var t=A();return l("]"),a(function(r,i){var s=e(r,i),o=t(r,i),u;return s?((s=s[o])&&s.then&&(u=s,"$$v"in s||(u.$$v=n,u.then(function(e){u.$$v=e})),s=s.$$v),s):n},{assign:function(n,r,i){return e(n,i)[t(n,i)]=r}})},D=function(){for(var e=A(),t;;){if(!(t=f("|")))return e;e=d(e,t.fn,m())}};return t?(A=g,O=M=_=D=function(){s("is not valid json",{text:e,index:0})},k=x()):k=v(),L.length!==0&&s("is an unexpected token",L[0]),k}function qt(e,t,n){for(var t=t.split("."),r=0;t.length>1;r++){var i=t.shift(),s=e[i];s||(s={},e[i]=s),e=s}return e[t.shift()]=n}function Rt(e,t,n){if(!t)return e;for(var t=t.split("."),r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&E(e)?M(i,e):e}function Ut(e,t,r,i,s){return function(o,u){var a=u&&u.hasOwnProperty(e)?u:o,f;return a===null||a===n?a:((a=a[e])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!t||a===null||a===n?a:((a=a[t])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!r||a===null||a===n?a:((a=a[r])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!i||a===null||a===n?a:((a=a[i])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!s||a===null||a===n?a:((a=a[s])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),a)))))}}function zt(e,t){if(or.hasOwnProperty(e))return or[e];var i=e.split("."),s=i.length,o;if(t)o=s<6?Ut(i[0],i[1],i[2],i[3],i[4]):function(e,t){var r=0,o;do o=Ut(i[r++],i[r++],i[r++],i[r++],i[r++])(e,t),t=n,e=o;while(r<s);return o};else{var u="var l, fn, p;\n";r(i,function(e,t){u+="if(s === null || s === undefined) return s;\nl=s;\ns="+(t?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'}),u+="return s;",o=Function("s","k",u),o.toString=function(){return u}}return or[e]=o}function Wt(){var e={};this.$get=["$filter","$sniffer",function(t,n){return function(r){switch(typeof r){case"string":return e.hasOwnProperty(r)?e[r]:e[r]=It(r,!1,t,n.csp);case"function":return r;default:return c}}}]}function Xt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Vt(function(t){e.$evalAsync(t)},t)}]}function Vt(e,t){function i(e){return e}function s(e){return a(e)}var o=function(){var r=[],f,l;return l={resolve:function(t){if(r){var i=r;r=n,f=u(t),i.length&&e(function(){for(var e,t=0,n=i.length;t<n;t++)e=i[t],f.then(e[0],e[1])})}},reject:function(e){l.resolve(a(e))},promise:{then:function(e,n){var u=o(),a=function(n){try{u.resolve((e||i)(n))}catch(r){t(r),u.reject(r)}},l=function(e){try{u.resolve((n||s)(e))}catch(r){t(r),u.reject(r)}};return r?r.push([a,l]):f.then(a,l),u.promise}}}},u=function(t){return t&&t.then?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(t){return{then:function(n,r){var i=o();return e(function(){i.resolve((r||s)(t))}),i.promise}}};return{defer:o,reject:a,when:function(n,r,f){var l=o(),c,h=function(e){try{return(r||i)(e)}catch(n){return t(n),a(n)}},p=function(e){try{return(f||s)(e)}catch(n){return t(n),a(n)}};return e(function(){u(n).then(function(e){c||(c=!0,l.resolve(u(e).then(h,p)))},function(e){c||(c=!0,l.resolve(p(e)))})}),l.promise},all:function(e){var t=o(),n=e.length,i=[];return n?r(e,function(e,r){u(e).then(function(e){r in i||(i[r]=e,--n||t.resolve(i))},function(e){r in i||t.reject(e)})}):t.resolve(i),t.promise}}}function $t(){var e={};this.when=function(t,n){e[t]=a({reloadOnSearch:!0},n);if(t){var r=t[t.length-1]=="/"?t.substr(0,t.length-1):t+"/";e[r]={redirectTo:t}}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(t,n,i,s,o,u,f){function c(e,t){for(var t="^"+t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",n="",i=[],s={},o=/:(\w+)/g,u,a=0;(u=o.exec(t))!==null;)n+=t.slice(a,u.index),n+="([^\\/]*)",i.push(u[1]),a=o.lastIndex;n+=t.substr(a);var f=e.match(RegExp(n));return f&&r(i,function(e,t){s[e]=f[t+1]}),f?s:null}function h(){var e=p(),a=y.current;if(e&&a&&e.$$route===a.$$route&&O(e.pathParams,a.pathParams)&&!e.reloadOnSearch&&!m)a.params=e.params,L(a.params,i),t.$broadcast("$routeUpdate",a);else if(e||a)m=!1,t.$broadcast("$routeChangeStart",e,a),(y.current=e)&&e.redirectTo&&(g(e.redirectTo)?n.path(d(e.redirectTo,e.params)).search(e.params).replace():n.url(e.redirectTo(e.pathParams,n.path(),n.search())).replace()),s.when(e).then(function(){if(e){var t=[],n=[],i;return r(e.resolve||{},function(e,r){t.push(r),n.push(g(e)?o.get(e):o.invoke(e))}),v(i=e.template)||v(i=e.templateUrl)&&(i=u.get(i,{cache:f}).then(function(e){return e.data})),v(i)&&(t.push("$template"),n.push(i)),s.all(n).then(function(e){var n={};return r(e,function(e,r){n[t[r]]=e}),n})}}).then(function(n){e==y.current&&(e&&(e.locals=n,L(e.params,i)),t.$broadcast("$routeChangeSuccess",e,a))},function(n){e==y.current&&t.$broadcast("$routeChangeError",e,a,n)})}function p(){var t,i;return r(e,function(e,r){!i&&(t=c(n.path(),r))&&(i=l(e,{params:a({},n.search(),t),pathParams:t}),i.$$route=e)}),i||e[null]&&l(e[null],{params:{},pathParams:{}})}function d(e,t){var n=[];return r((e||"").split(":"),function(e,r){if(r==0)n.push(e);else{var i=e.match(/(\w+)(.*)/),s=i[1];n.push(t[s]),n.push(i[2]||""),delete t[s]}}),n.join("")}var m=!1,y={routes:e,reload:function(){m=!0,t.$evalAsync(h)}};return t.$on("$locationChangeSuccess",h),y}]}function Jt(){this.$get=p({})}function Kt(){var e=10;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse",function(t,n,r){function i(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function s(e){if(f.$$phase)throw Error(f.$$phase+" already in progress");f.$$phase=e}function o(e,t){var n=r(e);return X(n,t),n}function a(){}i.prototype={$new:function(e){if(E(e))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return e?(e=new i,e.$root=this.$root):(e=function(){},e.prototype=this,e=new e,e.$id=u()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$asyncQueue=[],e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=o(e,"watch"),i=this.$$watchers,s={fn:t,last:a,get:r,exp:e,eq:!!n};if(!E(t)){var u=o(t||c,"listener");s.fn=function(e,t,n){u(n)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){k(i,s)}},$digest:function(){var t,r,i,o,u,l,c,h=e,p,d=[],v,m;s("$digest");do{c=!1,p=this;do{for(u=p.$$asyncQueue;u.length;)try{p.$eval(u.shift())}catch(g){n(g)}if(o=p.$$watchers)for(l=o.length;l--;)try{if(t=o[l],(r=t.get(p))!==(i=t.last)&&!(t.eq?O(r,i):typeof r=="number"&&typeof i=="number"&&isNaN(r)&&isNaN(i)))c=!0,t.last=t.eq?L(r):r,t.fn(r,i===a?r:i,p),h<5&&(v=4-h,d[v]||(d[v]=[]),m=E(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,m+="; newVal: "+D(r)+"; oldVal: "+D(i),d[v].push(m))}catch(y){n(y)}if(!(o=p.$$childHead||p!==this&&p.$$nextSibling))for(;p!==this&&!(o=p.$$nextSibling);)p=p.$parent}while(p=o);if(c&&!(h--))throw f.$$phase=null,Error(e+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+D(d))}while(c||u.length);f.$$phase=null},$destroy:function(){if(f!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return r(e)(this,t)},$evalAsync:function(e){this.$$asyncQueue.push(e)},$apply:function(e){try{return s("$apply"),this.$eval(e)}catch(t){n(t)}finally{f.$$phase=null;try{f.$digest()}catch(r){throw n(r),r}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[C(n,t)]=null}},$emit:function(e,t){var r=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(An.call(arguments,1)),f,l;do{i=s.$$listeners[e]||r,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{if(i[f].apply(null,a),o)return u}catch(c){n(c)}else i.splice(f,1),f--,l--;s=s.$parent}while(s);return u},$broadcast:function(e,t){var r=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(An.call(arguments,1)),u,a;do{r=i,s.currentScope=r,i=r.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){n(f)}else i.splice(u,1),u--,a--;if(!(i=r.$$childHead||r!==this&&r.$$nextSibling))for(;r!==this&&!(i=r.$$nextSibling);)r=r.$parent}while(r=i);return s}};var f=new i;return f}]}function Qt(){this.$get=["$window",function(e){var t={},n=f((/android (\d+)/.exec(Tn(e.navigator.userAgent))||[])[1]);return{history:!(!e.history||!e.history.pushState||n<4),hashchange:"onhashchange"in e&&(!e.document.documentMode||e.document.documentMode>7),hasEvent:function(n){if(n=="input"&&Cn==9)return!1;if(d(t[n])){var r=e.document.createElement("div");t[n]="on"+n in r}return t[n]},csp:!1}}]}function Gt(){this.$get=p(e)}function Yt(e){var t={},n,i,s;return e?(r(e.split("\n"),function(e){s=e.indexOf(":"),n=Tn(x(e.substr(0,s))),i=x(e.substr(s+1)),n&&(t[n]?t[n]+=", "+i:t[n]=i)}),t):t}function Zt(e){var t=m(e)?e:n;return function(n){return t||(t=Yt(e)),n?t[Tn(n)]||null:t}}function en(e,t,n){return E(n)?n(e,t):(r(n,function(n){e=n(e,t)}),e)}function tn(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,o=this.defaults={transformResponse:[function(n){return g(n)&&(n=n.replace(i,""),e.test(n)&&t.test(n)&&(n=P(n,!0))),n}],transformRequest:[function(e){return m(e)&&Mn.apply(e)!=="[object File]"?D(e):e}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},u=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,f,l,c){function h(e){function n(e){var t=a({},e,{data:en(e.data,e.headers,s)});return 200<=e.status&&e.status<300?t:l.reject(t)}e.method=Nn(e.method);var i=e.transformRequest||o.transformRequest,s=e.transformResponse||o.transformResponse,u=o.headers,u=a({"X-XSRF-TOKEN":t.cookies()["XSRF-TOKEN"]},u.common,u[Tn(e.method)],e.headers),i=en(e.data,Zt(u),i),f;return d(e.data)&&delete u["Content-Type"],f=p(e,i,u),f=f.then(n,n),r(b,function(e){f=e(f)}),f.success=function(t){return f.then(function(n){t(n.data,n.status,n.headers,e)}),f},f.error=function(t){return f.then(null,function(n){t(n.data,n.status,n.headers,e)}),f},f}function p(t,n,r){function i(e,t,n){c&&(200<=e&&e<300?c.put(d,[e,t,Yt(n)]):c.remove(d)),s(t,e,n),f.$apply()}function s(e,n,r){n=Math.max(n,0),(200<=n&&n<300?u.resolve:u.reject)({data:e,status:n,headers:Zt(r),config:t})}function o(){var e=C(h.pendingRequests,t);e!==-1&&h.pendingRequests.splice(e,1)}var u=l.defer(),a=u.promise,c,p,d=v(t.url,t.params);h.pendingRequests.push(t),a.then(o,o),t.cache&&t.method=="GET"&&(c=m(t.cache)?t.cache:y);if(c)if(p=c.get(d)){if(p.then)return p.then(o,o),p;w(p)?s(p[1],p[0],L(p[2])):s(p,200,{})}else c.put(d,a);return p||e(t.method,d,n,i,r,t.timeout,t.withCredentials),a}function v(e,t){if(!t)return e;var r=[];return s(t,function(e,t){e==null||e==n||(m(e)&&(e=D(e)),r.push(encodeURIComponent(t)+"="+encodeURIComponent(e)))}),e+(e.indexOf("?")==-1?"?":"&")+r.join("&")}var y=i("$http"),b=[];return r(u,function(e){b.push(g(e)?c.get(e):c.invoke(e))}),h.pendingRequests=[],function(e){r(arguments,function(e){h[e]=function(t,n){return h(a(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){r(arguments,function(e){h[e]=function(t,n,r){return h(a(r||{},{method:e,url:t,data:n}))}})}("post","put"),h.defaults=o,h}]}function nn(){this.$get=["$browser","$window","$document",function(e,t,n){return rn(e,ur,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function rn(e,t,n,i,s,o){function u(e,t){var n=s.createElement("script"),r=function(){s.body.removeChild(n),t&&t()};n.type="text/javascript",n.src=e,Cn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,s.body.appendChild(n)}return function(s,a,f,l,h,p,d){function v(t,n,r,i){n=(a.match(er)||["",o])[1]=="file"?r?200:404:n,t(n==1223?204:n,r,i),e.$$completeOutstandingRequest(c)}e.$$incOutstandingRequestCount(),a=a||e.url();if(Tn(s)=="jsonp"){var m="_"+(i.counter++).toString(36);i[m]=function(e){i[m].data=e},u(a.replace("JSON_CALLBACK","angular.callbacks."+m),function(){i[m].data?v(l,200,i[m].data):v(l,-2),delete i[m]})}else{var g=new t;g.open(s,a,!0),r(h,function(e,t){e&&g.setRequestHeader(t,e)});var y;g.onreadystatechange=function(){if(g.readyState==4){var e=g.getAllResponseHeaders(),t=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];e||(e="",r(t,function(t){var n=g.getResponseHeader(t);n&&(e+=t+": "+n+"\n")})),v(l,y||g.status,g.responseText,e)}},d&&(g.withCredentials=!0),g.send(f||""),p>0&&n(function(){y=-1,g.abort()},p)}}}function sn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return e===1?"one":"other"}}}}function on(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=v(u)&&!u,o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}l||e.$apply()},o),u=function(){delete s[f.$$timeoutId]};return f.$$timeoutId=o,s[o]=a,f.then(u,u),f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),t.defer.cancel(e.$$timeoutId)):!1},i}]}function un(e){function t(t,r){return e.factory(t+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",fn),t("date",vn),t("filter",an),t("json",mn),t("limitTo",gn),t("lowercase",hr),t("number",ln),t("orderBy",yn),t("uppercase",pr)}function an(){return function(e,t){if(!w(e))return e;var n=[];n.check=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};var r=function(e,t){if(t.charAt(0)==="!")return!r(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return(""+e).toLowerCase().indexOf(t)>-1;case"object":for(var n in e)if(n.charAt(0)!=="$"&&r(e[n],t))return!0;return!1;case"array":for(n=0;n<e.length;n++)if(r(e[n],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var i in t)i=="$"?function(){var e=(""+t[i]).toLowerCase();e&&n.push(function(t){return r(t,e)})}():function(){var e=i,s=(""+t[i]).toLowerCase();s&&n.push(function(t){return r(Rt(t,e),s)})}();break;case"function":n.push(t);break;default:return e}for(var s=[],o=0;o<e.length;o++){var u=e[o];n.check(u)&&s.push(u)}return s}}function fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return d(n)&&(n=t.CURRENCY_SYM),cn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function ln(e){var t=e.NUMBER_FORMATS;return function(e,n){return cn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function cn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=e<0,e=Math.abs(e),o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?o="0":(u=o,f=!0)}if(!f){o=(o.split(ar)[1]||"").length,d(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac));var o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(ar),o=e[0],e=e[1]||"",f=0,l=t.lgSize,c=t.gSize;if(o.length>=l+c)for(var f=o.length-l,h=0;h<f;h++)(f-h)%c===0&&h!==0&&(u+=n),u+=o.charAt(h);for(h=f;h<o.length;h++)(o.length-h)%l===0&&h!==0&&(u+=n),u+=o.charAt(h);for(;e.length<i;)e+="0";i&&i!=="0"&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function hn(e,t,n){var r="";e<0&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function pn(e,t,n,r){return function(i){i=i["get"+e]();if(n>0||i>-n)i+=n;return i===0&&n==-12&&(i=12),hn(i,t,r)}}function dn(e,t){return function(n,r){var i=n["get"+e](),s=Nn(t?"SHORT"+e:e);return r[s][i]}}function vn(e){function t(e){var t;if(t=e.match(n)){var e=new Date(0),r=0,i=0;t[9]&&(r=f(t[9]+t[10]),i=f(t[9]+t[11])),e.setUTCFullYear(f(t[1]),f(t[2])-1,f(t[3])),e.setUTCHours(f(t[4]||0)-r,f(t[5]||0)-i,f(t[6]||0),f(t[7]||0))}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i){var s="",o=[],u,a,i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i;g(n)&&(n=cr.test(n)?f(n):t(n)),y(n)&&(n=new Date(n));if(!b(n))return n;for(;i;)(a=lr.exec(i))?(o=o.concat(An.call(a,1)),i=o.pop()):(o.push(i),i=null);return r(o,function(t){u=fr[t],s+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function mn(){return function(e){return D(e,!0)}}function gn(){return function(e,t){if(e instanceof Array){var t=f(t),n=[],r,i;if(!!e&&e instanceof Array){t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}return n}return e}}function yn(e){return function(t,n,r){function i(e,t){return H(t)?function(t,n){return e(n,t)}:e}if(!w(t))return t;if(!n)return t;for(var n=w(n)?n:[n],n=N(n,function(t){var n=!1,r=t||h;if(g(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?(s=="string"&&(n=n.toLowerCase()),s=="string"&&(i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)}),s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0},r))}}function bn(e){return E(e)&&(e={link:e}),e.restrict=e.restrict||"AC",p(e)}function wn(e,t){function n(t,n){n=n?"-"+z(n,"-"):"",e.removeClass((t?Nr:Tr)+n).addClass((t?Tr:Nr)+n)}var i=this,s=e.parent().controller("form")||mr,o=0,u=i.$error={};i.$name=t.name,i.$dirty=!1,i.$pristine=!0,i.$valid=!0,i.$invalid=!1,s.$addControl(i),e.addClass(Cr),n(!0),i.$addControl=function(e){e.$name&&!i.hasOwnProperty(e.$name)&&(i[e.$name]=e)},i.$removeControl=function(e){e.$name&&i[e.$name]===e&&delete i[e.$name],r(u,function(t,n){i.$setValidity(n,!0,e)})},i.$setValidity=function(e,t,r){var a=u[e];if(t)a&&(k(a,r),!a.length)&&(o--,o||(n(t),i.$valid=!0,i.$invalid=!1),u[e]=!1,n(!0,e),s.$setValidity(e,!0,i));else{o||n(t);if(a){if(C(a,r)!=-1)return}else u[e]=a=[],o++,n(!1,e),s.$setValidity(e,!1,i);a.push(r),i.$valid=!1,i.$invalid=!0}},i.$setDirty=function(){e.removeClass(Cr).addClass(kr),i.$dirty=!0,i.$pristine=!1,s.$setDirty()}}function En(e){return d(e)||e===""||e===null||e!==e}function Sn(e,t,r,i,s,o){var u=function(){var n=x(t.val());i.$viewValue!==n&&e.$apply(function(){i.$setViewValue(n)})};if(s.hasEvent("input"))t.bind("input",u);else{var a;t.bind("keydown",function(e){e=e.keyCode,e===91||15<e&&e<19||37<=e&&e<=40||a||(a=o.defer(function(){u(),a=null}))}),t.bind("change",u)}i.$render=function(){t.val(En(i.$viewValue)?"":i.$viewValue)};var l=r.ngPattern,c=function(e,t){return En(t)||e.test(t)?(i.$setValidity("pattern",!0),t):(i.$setValidity("pattern",!1),n)};l&&(l.match(/^\/(.*)\/$/)?(l=RegExp(l.substr(1,l.length-2)),s=function(e){return c(l,e)}):s=function(t){var n=e.$eval(l);if(!n||!n.test)throw Error("Expected "+l+" to be a RegExp but was "+n);return c(n,t)},i.$formatters.push(s),i.$parsers.push(s));if(r.ngMinlength){var h=f(r.ngMinlength),s=function(e){return!En(e)&&e.length<h?(i.$setValidity("minlength",!1),n):(i.$setValidity("minlength",!0),e)};i.$parsers.push(s),i.$formatters.push(s)}if(r.ngMaxlength){var p=f(r.ngMaxlength),r=function(e){return!En(e)&&e.length>p?(i.$setValidity("maxlength",!1),n):(i.$setValidity("maxlength",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}}function xn(e,t){return e="ngClass"+e,bn(function(r,i,s){function o(e){if(t===!0||r.$index%2===t)f&&e!==f&&u(f),a(e);f=e}function u(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),i.removeClass(w(e)?e.join(" "):e)}function a(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),e&&i.addClass(w(e)?e.join(" "):e)}var f=n;r.$watch(s[e],o,!0),s.$observe("class",function(){var t=r.$eval(s[e]);o(t,t)}),e!=="ngClass"&&r.$watch("$index",function(n,i){var o=n%2;o!==i%2&&(o==t?a(r.$eval(s[e])):u(r.$eval(s[e])))})})}var Tn=function(e){return g(e)?e.toLowerCase():e},Nn=function(e){return g(e)?e.toUpperCase():e},Cn=f((/msie (\d+)/.exec(Tn(navigator.userAgent))||[])[1]),kn,Ln,An=[].slice,On=[].push,Mn=Object.prototype.toString,_n=e.angular||(e.angular={}),Dn,Pn,Hn=["0","0","0"];c.$inject=[],h.$inject=[],Pn=Cn<9?function(e){return e=e.nodeName?e:e[0],e.scopeName&&e.scopeName!="HTML"?Nn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Bn=/[A-Z]/g,jn={full:"1.0.6",major:1,minor:0,dot:6,codeName:"universal-irreversibility"},Fn=K.cache={},In=K.expando="ng-"+(new Date).getTime(),qn=1,Rn=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Un=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},zn=/([\:\-\_]+(.))/g,Wn=/^moz([A-Z])/,Xn=K.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;this.bind("DOMContentLoaded",n),K(e).bind("load",n)},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?kn(this[e]):kn(this[this.length+e])},length:0,push:On,sort:[].sort,splice:[].splice},Vn={};r("multiple,selected,checked,disabled,readOnly,required".split(","),function(e){Vn[Tn(e)]=e});var $n={};r("input,select,option,textarea,button,form".split(","),function(e){$n[Nn(e)]=!0}),r({data:tt,inheritedData:ut,scope:function(e){return ut(e,"$scope")},controller:ot,injector:function(e){return ut(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:nt,css:function(e,t,r){t=$(t);if(!v(r)){var i;return Cn<=8&&(i=e.currentStyle&&e.currentStyle[t],i===""&&(i="auto")),i=i||e.style[t],Cn<=8&&(i=i===""?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Tn(t);if(Vn[i]){if(!v(r))return e[t]||(e.attributes.getNamedItem(t)||c).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(v(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),e===null?n:e},prop:function(e,t,n){if(!v(n))return e[t];e[t]=n},text:a(Cn<9?function(e,t){if(e.nodeType==1){if(d(t))return e.innerText;e.innerText=t}else{if(d(t))return e.nodeValue;e.nodeValue=t}}:function(e,t){if(d(t))return e.textContent;e.textContent=t},{$dv:""}),val:function(e,t){if(d(t))return e.value;e.value=t},html:function(e,t){if(d(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)G(r[n]);e.innerHTML=t}},function(e,t){K.prototype[t]=function(t,r){var i,s;if((e.length==2&&e!==nt&&e!==ot?t:r)!==n){for(i=0;i<this.length;i++)e(this[i],t,r);return this}if(m(t)){for(i=0;i<this.length;i++)if(e===tt)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}return this.length?e(this[0],t,r):e.$dv}}),r({removeData:Z,dealoc:G,bind:function li(e,t,n){var i=et(e,"events"),s=et(e,"handle");i||et(e,"events",i={}),s||et(e,"handle",s=ft(e,i)),r(t.split(" "),function(t){var r=i[t];if(!r){if(t=="mouseenter"||t=="mouseleave"){var o=0;i.mouseenter=[],i.mouseleave=[],li(e,"mouseover",function(e){o++,o==1&&s(e,"mouseenter")}),li(e,"mouseout",function(e){o--,o==0&&s(e,"mouseleave")})}else Rn(e,t,s),i[t]=[];r=i[t]}r.push(n)})},unbind:Y,replaceWith:function(e,t){var n,i=e.parentNode;G(e),r(new K(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===1&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){r(new K(t),function(t){e.nodeType===1&&e.appendChild(t)})},prepend:function(e,t){if(e.nodeType===1){var n=e.firstChild;r(new K(t),function(t){n?e.insertBefore(t,n):(e.appendChild(t),n=t)})}},wrap:function(e,t){var t=kn(t)[0],n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){G(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,i=e.parentNode;r(new K(t),function(e){i.insertBefore(e,n.nextSibling),n=e})},addClass:it,removeClass:rt,toggleClass:function(e,t,n){d(n)&&(n=!nt(e,t)),(n?it:rt)(e,t)},parent:function(e){return(e=e.parentNode)&&e.nodeType!==11?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;e!=null&&e.nodeType!==1;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:Q,triggerHandler:function(e,t){var n=(et(e,"events")||{})[t];r(n,function(t){t.call(e,null)})}},function(e,t){K.prototype[t]=function(t,r){for(var i,s=0;s<this.length;s++)i==n?(i=e(this[s],t,r),i!==n&&(i=kn(i))):st(i,e(this[s],t,r));return i==n?this:i}}),ct.prototype={put:function(e,t){this[lt(e)]=t},get:function(e){return this[lt(e)]},remove:function(e){var t=this[e=lt(e)];return delete this[e],t}},ht.prototype={push:function(e,t){var n=this[e=lt(e)];n?n.push(t):this[e]=[t]},shift:function(e){var t=this[e=lt(e)];if(t)return t.length==1?(delete this[e],t[0]):t.shift()},peek:function(e){if(e=this[lt(e)])return e[0]}};var Jn=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Kn=/,/,Qn=/^\s*(_?)(\S+?)\1\s*$/,Gn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Yn="Non-assignable model expression: ";wt.$inject=["$provide"];var Zn=/^(x[\:\-_]|data[\:\-_])/i,er=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,tr=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,nr=tr,rr={http:80,https:443,ftp:21};Mt.prototype={$$replace:!1,absUrl:Pt("$$absUrl"),url:function(e,t){if(d(e))return this.$$url;var n=tr.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Pt("$$protocol"),host:Pt("$$host"),port:Pt("$$port"),path:Ht("$$path",function(e){return e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){return d(e)?this.$$search:(v(t)?t===null?delete this.$$search[e]:this.$$search[e]=t:this.$$search=g(e)?j(e):e,this.$$compose(),this)},hash:Ht("$$hash",h),replace:function(){return this.$$replace=!0,this}},_t.prototype=l(Mt.prototype),Dt.prototype=l(_t.prototype);var ir={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":c,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(v(n)?n:0)-(v(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":c,"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},sr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},or={},ur=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw Error("This browser does not support XMLHttpRequest.")};un.$inject=["$provide"],fn.$inject=["$locale"],ln.$inject=["$locale"];var ar=".",fr={yyyy:pn("FullYear",4),yy:pn("FullYear",2,0,!0),y:pn("FullYear",1),MMMM:dn("Month"),MMM:dn("Month",!0),MM:pn("Month",2,1),M:pn("Month",1,1),dd:pn("Date",2),d:pn("Date",1),HH:pn("Hours",2),H:pn("Hours",1),hh:pn("Hours",2,-12),h:pn("Hours",1,-12),mm:pn("Minutes",2),m:pn("Minutes",1),ss:pn("Seconds",2),s:pn("Seconds",1),EEEE:dn("Day"),EEE:dn("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){var e=-1*e.getTimezoneOffset(),t=e>=0?"+":"";return t+=hn(Math[e>0?"floor":"ceil"](e/60),2)+hn(Math.abs(e%60),2),t}},lr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,cr=/^\d+$/;vn.$inject=["$locale"];var hr=p(Tn),pr=p(Nn);yn.$inject=["$parse"];var dr=p({restrict:"E",compile:function(e,n){return Cn<=8&&(!n.href&&!n.name&&n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.bind("click",function(e){t.attr("href")||e.preventDefault()})}}}),vr={};r(Vn,function(e,t){var n=Et("ng-"+t);vr[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),r(["src","href"],function(e){var t=Et("ng-"+e);vr[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),Cn&&r.prop(e,i[e]))})}}}});var mr={$addControl:c,$removeControl:c,$setValidity:c,$setDirty:c};wn.$inject=["$element","$attrs","$scope"];var On=function(e){return["$timeout",function(t){var r={name:"form",restrict:"E",controller:wn,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Rn(r[0],"submit",o),r.bind("$destroy",function(){t(function(){Un(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),f=i.name||i.ngForm;f&&(e[f]=s),u&&r.bind("$destroy",function(){u.$removeControl(s),f&&(e[f]=n),a(s,mr)})}}}};return e?a(L(r),{restrict:"EAC"}):r}]},gr=On(),yr=On(!0),br=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,wr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,Er=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sr={text:Sn,number:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=En(e);return t||Er.test(e)?(i.$setValidity("number",!0),e===""?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return En(e)?"":""+e});if(r.min){var u=parseFloat(r.min),e=function(e){return!En(e)&&e<u?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)};i.$parsers.push(e),i.$formatters.push(e)}if(r.max){var a=parseFloat(r.max),r=function(e){return!En(e)&&e>a?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}i.$formatters.push(function(e){return En(e)||y(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||br.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||wr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){d(n.name)&&t.attr("name",u()),t.bind("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;g(i)||(i=!0),g(s)||(s=!1),t.bind("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:c,button:c,submit:c,reset:c},xr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Sr[Tn(i.type)]||Sr.text)(n,r,i,s,t,e)}}}],Tr="ng-valid",Nr="ng-invalid",Cr="ng-pristine",kr="ng-dirty",Lr=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,s){function o(e,t){t=t?"-"+z(t,"-"):"",i.removeClass((e?Nr:Tr)+t).addClass((e?Tr:Nr)+t)}this.$modelValue=this.$viewValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var u=s(n.ngModel),a=u.assign;if(!a)throw Error(Yn+n.ngModel+" ("+B(i)+")");this.$render=c;var f=i.inheritedData("$formController")||mr,l=0,h=this.$error={};i.addClass(Cr),o(!0),this.$setValidity=function(e,t){if(h[e]!==!t){if(t){if(h[e]&&l--,!l)o(!0),this.$valid=!0,this.$invalid=!1}else o(!1),this.$invalid=!0,this.$valid=!1,l++;h[e]=!t,o(t,e),f.$setValidity(e,t,this)}},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(Cr).addClass(kr),f.$setDirty()),r(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,a(e,n),r(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=u(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],Ar=function(){return{require:["ngModel","^?form"],controller:Lr,link:function(e,t,n,r){var i=r[0],s=r[1]||mr;s.$addControl(i),t.bind("$destroy",function(){s.$removeControl(i)})}}},Or=p({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Mr=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!En(e)&&e!==!1)return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},_r=function(){return{require:"ngModel",link:function(e,t,i,s){var o=(e=/\/(.*)\//.exec(i.ngList))&&RegExp(e[1])||i.ngList||",";s.$parsers.push(function(e){var t=[];return e&&r(e.split(o),function(e){e&&t.push(x(e))}),t}),s.$formatters.push(function(e){return w(e)?e.join(", "):n})}}},Dr=/^(true|false|\d+)$/,Pr=function(){return{priority:100,compile:function(e,t){return Dr.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,!1)})}}}},Hr=bn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),Br=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],jr=[function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.ngBindHtmlUnsafe),e.$watch(n.ngBindHtmlUnsafe,function(e){t.html(e||"")})}}],Fr=xn("",!0),Ir=xn("Odd",0),qr=xn("Even",1),Rr=bn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ur=[function(){return{scope:!0,controller:"@"}}],zr=["$sniffer",function(e){return{priority:1e3,compile:function(){e.csp=!0}}}],Wr={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(e){var t=Et("ng-"+e);Wr[t]=["$parse",function(n){return function(r,i,s){var o=n(s[t]);i.bind(Tn(e),function(e){r.$apply(function(){o(r,{$event:e})})})}}]});var Xr=bn(function(e,t,n){t.bind("submit",function(){e.$apply(n.ngSubmit)})}),Vr=["$http","$templateCache","$anchorScroll","$compile",function(e,t,n,r){return{restrict:"ECA",terminal:!0,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s){var f=0,l,c=function(){l&&(l.$destroy(),l=null),s.html("")};i.$watch(o,function(o){var h=++f;o?e.get(o,{cache:t}).success(function(e){h===f&&(l&&l.$destroy(),l=i.$new(),s.html(e),r(s.contents())(l),v(a)&&(!a||i.$eval(a))&&n(),l.$emit("$includeContentLoaded"),i.$eval(u))}).error(function(){h===f&&c()}):c()})}}}}],$r=bn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Jr=bn({terminal:!0,priority:1e3}),Kr=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,s,o){var u=o.count,a=s.attr(o.$attr.when),f=o.offset||0,l=i.$eval(a),c={},h=t.startSymbol(),p=t.endSymbol();r(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),i.$watch(function(){var t=parseFloat(i.$eval(u));return isNaN(t)?"":(l[t]||(t=e.pluralCat(t-f)),c[t](i,s,!0))},function(e){s.text(e)})}}}],Qr=bn({transclude:"element",priority:1e3,terminal:!0,compile:function(e,t,n){return function(e,t,r){var i=r.ngRepeat,r=i.match(/^\s*(.+)\s+in\s+(.*)\s*$/),s,o,u;if(!r)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+i+"'.");i=r[1],s=r[2],r=i.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!r)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+i+"'.");o=r[3]||r[1],u=r[2];var a=new ht;e.$watch(function(e){var r,i,f=e.$eval(s),l=t,c=new ht,h,p,d,v,m,g;if(w(f))m=f||[];else{m=[];for(d in f)f.hasOwnProperty(d)&&d.charAt(0)!="$"&&m.push(d);m.sort()}h=m.length-1,r=0;for(i=m.length;r<i;r++)d=f===m?r:m[r],v=f[d],(g=a.shift(v))?(p=g.scope,c.push(v,g),r!==g.index&&(g.index=r,l.after(g.element)),l=g.element):p=e.$new(),p[o]=v,u&&(p[u]=d),p.$index=r,p.$first=r===0,p.$last=r===h,p.$middle=!p.$first&&!p.$last,g||n(p,function(e){l.after(e),g={scope:p,element:l=e,index:r},c.push(v,g)});for(d in a)if(a.hasOwnProperty(d))for(m=a[d];m.length;)v=m.pop(),v.element.remove(),v.scope.$destroy();a=c})}}}),Gr=bn(function(e,t,n){e.$watch(n.ngShow,function(e){t.css("display",H(e)?"":"none")})}),Yr=bn(function(e,t,n){e.$watch(n.ngHide,function(e){t.css("display",H(e)?"none":"")})}),Zr=bn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ei=p({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,r){var i,s,o;e.$watch(n.ngSwitch||n.on,function(u){s&&(o.$destroy(),s.remove(),s=o=null);if(i=r.cases["!"+u]||r.cases["?"])e.$eval(n.change),o=e.$new(),i(o,function(e){s=e,t.append(e)})})}}),ti=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,r,i,s){s.cases["!"+t.ngSwitchWhen]=n}}}),ni=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,t,r,i){i.cases["?"]=n}}}),ri=bn({controller:["$transclude","$element",function(e,t){e(function(e){t.append(e)})}]}),ii=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(e,t,n,r,i,s){return{restrict:"ECA",terminal:!0,link:function(e,t,o){function u(){var o=n.current&&n.current.locals,u=o&&o.$template;if(u){t.html(u),a&&(a.$destroy(),a=null);var u=i(t.contents()),l=n.current;a=l.scope=e.$new(),l.controller&&(o.$scope=a,o=s(l.controller,o),t.children().data("$ngControllerController",o)),u(a),a.$emit("$viewContentLoaded"),a.$eval(f),r()}else t.html(""),a&&(a.$destroy(),a=null)}var a,f=o.onload||"";e.$on("$routeChangeSuccess",u),u()}}}],si=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){n.type=="text/ng-template"&&e.put(n.id,t[0].text)}}}],oi=p({terminal:!0}),ui=["$compile","$parse",function(e,s){var o=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,u={$setViewValue:c};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+lt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=c})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(T.parent()&&T.remove(),t.val(e),e===""&&E.prop("selected",!0)):d(e)&&E?t.val(""):r.renderUnknownOption(e)},t.bind("change",function(){e.$apply(function(){T.parent()&&T.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var i;n.$render=function(){var e=new ct(n.$viewValue);r(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=L(n.$viewValue),n.$render())}),t.bind("change",function(){e.$apply(function(){var e=[];r(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,r,u){function a(){var e={"":[]},s=[""],o,a,f,g,b;f=u.$modelValue,g=v(t)||[];var E=h?i(g):g,T,N,C;N={},b=!1;var k,L;if(y)b=new ct(f);else if(f===null||w)e[""].push({selected:f===null,id:"",label:""}),b=!0;for(C=0;T=E.length,C<T;C++)N[c]=g[h?N[h]=E[C]:C],o=p(t,N)||"",(a=e[o])||(a=e[o]=[],s.push(o)),y?o=b.remove(d(t,N))!=n:(o=f===d(t,N),b=b||o),k=l(t,N),k=k===n?"":k,a.push({id:h?E[C]:C,label:k,selected:o});!y&&!b&&e[""].unshift({id:"?",label:"",selected:!0}),N=0;for(E=s.length;N<E;N++){o=s[N],a=e[o],m.length<=N?(f={element:x.clone().attr("label",o),label:a.label},g=[f],m.push(g),r.append(f.element)):(g=m[N],f=g[0],f.label!=o)&&f.element.attr("label",f.label=o),k=null,C=0;for(T=a.length;C<T;C++)(o=a[C],b=g[C+1])?(k=b.element,b.label!==o.label&&k.text(b.label=o.label),b.id!==o.id&&k.val(b.id=o.id),b.element.selected!==o.selected&&k.prop("selected",b.selected=o.selected)):(o.id===""&&w?L=w:(L=S.clone()).val(o.id).attr("selected",o.selected).text(o.label),g.push({element:L,label:o.label,id:o.id,selected:o.selected}),k?k.after(L):f.element.append(L),k=L);for(C++;g.length>C;)g.pop().element.remove()}for(;m.length>N;)m.pop()[0].element.remove()}var f;if(!(f=b.match(o)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+b+"'.");var l=s(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=s(f[3]||""),d=s(f[2]?f[1]:c),v=s(f[7]),m=[[{element:r,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),r.html(""),r.bind("change",function(){t.$apply(function(){var e,i=v(t)||[],s={},o,a,f,l,p,g;if(y){a=[],l=0;for(g=m.length;l<g;l++){e=m[l],f=1;for(p=e.length;f<p;f++)(o=e[f].element)[0].selected&&(o=o.val(),h&&(s[h]=o),s[c]=i[o],a.push(d(t,s)))}}else o=r.val(),o=="?"?a=n:o==""?a=null:(s[c]=i[o],h&&(s[h]=o),a=d(t,s));u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){for(var m=l[0],g=l[1],y=f.multiple,b=f.ngOptions,w=!1,E,S=kn(t.createElement("option")),x=kn(t.createElement("optgroup")),T=S.clone(),l=0,N=a.children(),C=N.length;l<C;l++)if(N[l].value==""){E=w=N.eq(l);break}m.init(g,w,T);if(y&&(f.required||f.ngRequired)){var k=function(e){return g.$setValidity("required",!f.required||e&&e.length),e};g.$parsers.push(k),g.$formatters.unshift(k),f.$observe("required",function(){k(g.$viewValue)})}b?p(u,a,g):y?h(u,a,g):c(u,a,g,m)}}}}],ai=["$interpolate",function(e){var t={addOption:c,removeOption:c};return{restrict:"E",priority:100,compile:function(n,r){if(d(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.bind("$destroy",function(){o.removeOption(r.value)})}}}}],fi=p({restrict:"E",terminal:!0});(Ln=e.jQuery)?(kn=Ln,a(Ln.fn,{scope:Xn.scope,controller:Xn.controller,injector:Xn.injector,inheritedData:Xn.inheritedData}),J("remove",!0),J("empty"),J("html")):kn=K,_n.element=kn,function(t){a(t,{bootstrap:U,copy:L,extend:a,equals:O,element:kn,forEach:r,injector:dt,noop:c,bind:M,toJson:D,fromJson:P,identity:h,isUndefined:d,isDefined:v,isString:g,isFunction:E,isObject:m,isNumber:y,isElement:T,isArray:w,version:jn,isDate:b,lowercase:Tn,uppercase:Nn,callbacks:{counter:0}}),Dn=V(e);try{Dn("ngLocale")}catch(n){Dn("ngLocale",[]).provider("$locale",sn)}Dn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",wt).directive({a:dr,input:xr,textarea:xr,form:gr,script:si,select:ui,style:fi,option:ai,ngBind:Hr,ngBindHtmlUnsafe:jr,ngBindTemplate:Br,ngClass:Fr,ngClassEven:qr,ngClassOdd:Ir,ngCsp:zr,ngCloak:Rr,ngController:Ur,ngForm:yr,ngHide:Yr,ngInclude:Vr,ngInit:$r,ngNonBindable:Jr,ngPluralize:Kr,ngRepeat:Qr,ngShow:Gr,ngSubmit:Xr,ngStyle:Zr,ngSwitch:ei,ngSwitchWhen:ti,ngSwitchDefault:ni,ngOptions:oi,ngView:ii,ngTransclude:ri,ngModel:Ar,ngList:_r,ngChange:Or,required:Mr,ngRequired:Mr,ngValue:Pr}).directive(vr).directive(Wr),e.provider({$anchorScroll:vt,$browser:gt,$cacheFactory:yt,$controller:St,$document:xt,$exceptionHandler:Tt,$filter:un,$interpolate:Nt,$http:tn,$httpBackend:nn,$location:Bt,$log:jt,$parse:Wt,$route:$t,$routeParams:Jt,$rootScope:Kt,$q:Xt,$sniffer:Qt,$templateCache:bt,$timeout:on,$window:Gt})}])}(_n),kn(t).ready(function(){R(t,U)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>'),n("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!csmain",["require","cs!jquery","angular"],function(e,t,n){t(window).load(function(){e(["cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e){n.bootstrap(t(".wrap"),[e.name])})})})}.call(this),t({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),n("main",function(){}),function(e,t,n){t.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(e,r){function i(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function s(e,t){this.template=e+="#",this.defaults=t||{};var n=this.urlParams={};f(e.split(/\W/),function(t){t&&RegExp("(^|[^\\\\]):"+t+"\\W").test(e)&&(n[t]=!0)}),this.template=e.replace(/\\:/g,":")}function o(i,m,g){function b(e,t){var n={},t=l({},m,t);return f(t,function(t,i){var s;t.charAt&&t.charAt(0)=="@"?(s=t.substr(1),s=r(s)(e)):s=t,n[i]=s}),n}function E(e){c(e||{},this)}var S=new s(i),g=l({},u,g);return f(g,function(r,i){r.method=t.uppercase(r.method);var s=r.method=="POST"||r.method=="PUT"||r.method=="PATCH";E[i]=function(t,n,i,o){var u={},d,m=a,g=null;switch(arguments.length){case 4:g=o,m=i;case 3:case 2:if(!h(n)){u=t,d=n,m=i;break}if(h(t)){m=t,g=n;break}m=n,g=i;case 1:h(t)?m=t:s?d=t:u=t;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments."}var y=this instanceof E?this:r.isArray?[]:new E(d);return e({method:r.method,url:S.url(l({},b(d,r.params||{}),u)),data:d}).then(function(e){var t=e.data;t&&(r.isArray?(y.length=0,f(t,function(e){y.push(new E(e))})):c(t,y)),(m||a)(y,e.headers)},g),y},E.prototype["$"+i]=function(e,t,r){var o=b(this),u=a,f;switch(arguments.length){case 3:o=e,u=t,f=r;break;case 2:case 1:h(e)?(u=e,f=t):(o=e,u=t||a);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments."}E[i].call(this,o,s?this:n,u,f)}}),E.bind=function(e){return o(i,l({},m,e),g)},E}var u={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},a=t.noop,f=t.forEach,l=t.extend,c=t.copy,h=t.isFunction;return s.prototype={url:function(e){var n=this,r=this.template,s,o,e=e||{};f(this.urlParams,function(u,a){s=e.hasOwnProperty(a)?e[a]:n.defaults[a],t.isDefined(s)&&s!==null?(o=i(s,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),r=r.replace(RegExp(":"+a+"(\\W)","g"),o+"$1")):r=r.replace(RegExp("(/?):"+a+"(\\W)","g"),function(e,t,n){return n.charAt(0)=="/"?n:t+n})});var r=r.replace(/\/?#$/,""),u=[];return f(e,function(e,t){n.urlParams[t]||u.push(i(t)+"="+i(e))}),u.sort(),r=r.replace(/\/*$/,""),r+(u.length?"?"+u.join("&"):"")}},o}])}(window,window.angular),n("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){n("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){n("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={crop:!0,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.updateOptions=function(e){var t;e["pte-action"]="change-options",o.log("Updating Options",e),t=n.thumbnailResource.get(e,function(){return o.log("Updated options")})},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate?n.view(i):f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){return l(),t.forEach(n.thumbnails,function(e){return n.trash(e)})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(r.size===t){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){e.name=t,this.thumbnails.push(e),a(e)},n),n.updateSelected()}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1},n.anySelected=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.selected)return!0}return!1},n.$watch("currentThumbnailBarPosition",function(e,t){if(e===t)return;n.updateOptions({pte_thumbnail_bar:n.currentThumbnailBarPosition})}),n.toggleCurrentThumbnailBarPosition=function(){var e;e=["vertical","horizontal"],n.currentThumbnailBarPosition===e[0]?n.currentThumbnailBarPosition=e[1]:n.currentThumbnailBarPosition=e[0]}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),n("jcrop",function(){}),function(){n("cs!jcrop-api",["cs!jquery","cs!settings","jcrop"],function(e,t){var n,r,i;return i=function(e,t){var n,r,i,s,o,u,a;return a=[],r=a[0],n=a[1],u=a[2],o=a[3],s=0,i=function(){return s=new Date,u=null,o=e.apply(r,n),null},function(){var a,f;return a=new Date,f=t-(a-s),r=this,n=arguments,f<=0?(clearTimeout(u),u=null,s=a,o=e.apply(r,n)):u||(u=setTimeout(i,f)),o}},r=null,n={onChange:i(function(){var e,t,n,i,s,o,u,a,f,l;t=function(t){t!==e&&r.setOptions({bgColor:t})},u=function(){var e;return e=function(e,t){return e==null?!0:e===0?!1:e<t},a&&e(s,f)&&e(i,o)?!1:!a&&e(s,f)||e(i,o)?!1:!0},n=this.getOptions().cropConstraints;if(!n){t("black");return}s=n[0],i=n[1],a=n[2],e=this.getOptions().bgColor,l=this.tellSelect(),f=l.w,o=l.h,u()?t("red"):t("green")},50),onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(isNaN(n))return;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){n("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){if(t===n)return;e.updateOptions({pte_crop_save:e.pteCropSave?"true":"false"})}),e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null,!1],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.updateSelected())},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;t=null,i=[null,null,!1];try{l=!1,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],n=c.crop,p=c.width,a=c.height,n=+n,p=+p,a=+a,h=p/a;if(c.selected){o=i[0],s=i[1],f=i[2];if(!o||0<p&&o<p)o=p;if(!s||0<a&&s<a)s=a;f=f||n,i=[o,s,f],l=!0}if(c.selected&&n>0){if(t!==null&&t!==h)throw"PTE_EXCEPTION";t=h}}t===null&&l===!1&&(t=r.width/r.height)}catch(g){u=g,e.setInfoMessage(e.i18n.crop_problems),t=null}e.aspectRatio=t,e.cropConstraints=i},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d;if(e.cropInProgress)return;e.cropInProgress=!0,a=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(a.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}d=t.tellSelect(),l=d.x,h=d.y,f=d.w,u=d.h,c=d.x2,p=d.y2;if(l===0&&h===0&&f===0&&u===0&&c===0&&p===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}s={"pte-action":"resize-images",id:r.id,"pte-sizes":a,w:f,h:u,x:l,y:h},e.pteCropSave&&(s.save="true"),o=e.thumbnailResource.get(s,function(){e.cropInProgress=!1;if(o!=null?o.immediate:void 0)return e.confirmResults(o);e.setNonces({"pte-nonce":o["pte-nonce"],"pte-delete-nonce":o["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;o.thumbnails[t.name]&&(n={url:o.thumbnails[t.name].url,file:o.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){n("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),t(["main"])})();
|
17 |
* https://github.com/tapmodo/Jcrop
|
18 |
*/
|
19 |
|
20 |
+
(function(){var e,t,n;(function(r){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(e){if(d(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!d(a,e)&&!d(c,e))throw new Error("No "+e);return a[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(e,t,n,i){var s,l,h,p,v,g=[],w;i=i||e;if(typeof n=="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(v=0;v<t.length;v+=1){p=o(t[v],i),l=p.f;if(l==="require")g[v]=u.require(e);else if(l==="exports")g[v]=u.exports(e),w=!0;else if(l==="module")s=g[v]=u.module(e);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=n.apply(a[e],g);if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!w)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){return typeof e=="string"?u[e]?u[e](t):b(o(e,t).f):(e.splice||(l=e,t.splice?(e=t,t=n,n=null):e=r),t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},n=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}})(),n("../apps/requirejs/almond",function(){}),n("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){n("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e,t,n){var i;if(e)if(E(e))for(i in e)i!="prototype"&&i!="length"&&i!="name"&&e.hasOwnProperty(i)&&t.call(n,e[i],i);else if(e.forEach&&e.forEach!==r)e.forEach(t,n);else if(!e||typeof e.length!="number"?0:typeof e.hasOwnProperty!="function"&&typeof e.constructor!="function"||e instanceof K||Ln&&e instanceof Ln||Mn.call(e)!=="[object Object]"||typeof e.callee=="function")for(i=0;i<e.length;i++)t.call(n,e[i],i);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i);return e}function i(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=i(e),s=0;s<r.length;s++)t.call(n,e[r[s]],r[s]);return r}function o(e){return function(t,n){e(n,t)}}function u(){for(var e=Hn.length,t;e;){e--,t=Hn[e].charCodeAt(0);if(t==57)return Hn[e]="A",Hn.join("");if(t!=90)return Hn[e]=String.fromCharCode(t+1),Hn.join("");Hn[e]="0"}return Hn.unshift("0"),Hn.join("")}function a(e){return r(arguments,function(t){t!==e&&r(t,function(t,n){e[n]=t})}),e}function f(e){return parseInt(e,10)}function l(e,t){return a(new(a(function(){},{prototype:e})),t)}function c(){}function h(e){return e}function p(e){return function(){return e}}function d(e){return typeof e=="undefined"}function v(e){return typeof e!="undefined"}function m(e){return e!=null&&typeof e=="object"}function g(e){return typeof e=="string"}function y(e){return typeof e=="number"}function b(e){return Mn.apply(e)=="[object Date]"}function w(e){return Mn.apply(e)=="[object Array]"}function E(e){return typeof e=="function"}function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function x(e){return g(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}function T(e){return e&&(e.nodeName||e.bind&&e.find)}function N(e,t,n){var i=[];return r(e,function(e,r,s){i.push(t.call(n,e,r,s))}),i}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function k(e,t){var n=C(e,t);return n>=0&&e.splice(n,1),t}function L(e,t){if(S(e)||e&&e.$evalAsync&&e.$watch)throw Error("Can't copy Window or Scope");if(t){if(e===t)throw Error("Can't copy equivalent objects or arrays");if(w(e))for(var n=t.length=0;n<e.length;n++)t.push(L(e[n]));else for(n in r(t,function(e,n){delete t[n]}),e)t[n]=L(e[n])}else(t=e)&&(w(e)?t=L(e,[]):b(e)?t=new Date(e.getTime()):m(e)&&(t=L(e,{})));return t}function A(e,t){var t=t||{},n;for(n in e)e.hasOwnProperty(n)&&n.substr(0,2)!=="$$"&&(t[n]=e[n]);return t}function O(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&r=="object"){if(!w(e)){if(b(e))return b(t)&&e.getTime()==t.getTime();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||S(e)||S(t))return!1;r={};for(i in e)if(i.charAt(0)!=="$"&&!E(e[i])){if(!O(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&i.charAt(0)!=="$"&&t[i]!==n&&!E(t[i]))return!1;return!0}if((r=e.length)==t.length){for(i=0;i<r;i++)if(!O(e[i],t[i]))return!1;return!0}}return!1}function M(e,t){var n=arguments.length>2?An.call(arguments,2):[];return!E(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(An.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function _(e,r){var i=r;return/^\$+/.test(e)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function D(e,t){return JSON.stringify(e,_,t?" ":null)}function P(e){return g(e)?JSON.parse(e):e}function H(e){return e&&e.length!==0?(e=Tn(""+e),e=e!="f"&&e!="0"&&e!="false"&&e!="no"&&e!="n"&&e!="[]"):e=!1,e}function B(e){e=kn(e).clone();try{e.html("")}catch(t){}var n=kn("<div>").append(e).html();try{return e[0].nodeType===3?Tn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tn(t)})}catch(r){return Tn(n)}}function j(e){var t={},n,i;return r((e||"").split("&"),function(e){e&&(n=e.split("="),i=decodeURIComponent(n[0]),t[i]=v(n[1])?decodeURIComponent(n[1]):!0)}),t}function F(e){var t=[];return r(e,function(e,n){t.push(q(n,!0)+(e===!0?"":"="+q(e,!0)))}),t.length?t.join("&"):""}function I(e){return q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function R(e,n){function i(e){e&&s.push(e)}var s=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(a,function(n){a[n]=!0,i(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(r(e.querySelectorAll("."+n),i),r(e.querySelectorAll("."+n+"\\:"),i),r(e.querySelectorAll("["+n+"]"),i))}),r(s,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):r(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function U(t,n){var i=function(){t=kn(t),n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),n.unshift("ng");var e=dt(n);return e.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},s=/^NG_DEFER_BOOTSTRAP!/;if(e&&!s.test(e.name))return i();e.name=e.name.replace(s,""),_n.resumeBootstrap=function(e){r(e,function(e){n.push(e)}),i()}}function z(e,t){return t=t||"_",e.replace(Bn,function(e,n){return(n?t:"")+e.toLowerCase()})}function W(e,t,n){if(!e)throw Error("Argument '"+(t||"?")+"' is "+(n||"required"));return e}function X(e,t,n){return n&&w(e)&&(e=e[e.length-1]),W(E(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function V(e){function t(e,t,n){return e[t]||(e[t]=n())}return t(t(e,"angular",Object),"module",function(){var e={};return function(n,r,i){return r&&e.hasOwnProperty(n)&&(e[n]=null),t(e,n,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),u}}if(!r)throw Error("No module: "+n);var t=[],s=[],o=e("$injector","invoke"),u={_invokeQueue:t,_runBlocks:s,requires:r,name:n,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:o,run:function(e){return s.push(e),this}};return i&&o(i),u})}})}function $(e){return e.replace(zn,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Wn,"Moz$1")}function J(e,t){function n(){var e;for(var n=[this],i=t,s,o,u,a,f,l;n.length;){s=n.shift(),o=0;for(u=s.length;o<u;o++){a=kn(s[o]),i?a.triggerHandler("$destroy"):i=!i,f=0;for(e=(l=a.children()).length,a=e;f<a;f++)n.push(Ln(l[f]))}}return r.apply(this,arguments)}var r=Ln.fn[e],r=r.$original||r;n.$original=r,Ln.fn[e]=n}function K(e){if(e instanceof K)return e;if(!(this instanceof K)){if(g(e)&&e.charAt(0)!="<")throw Error("selectors not implemented");return new K(e)}if(g(e)){var n=t.createElement("div");n.innerHTML="<div> </div>"+e,n.removeChild(n.firstChild),st(this,n.childNodes),this.remove()}else st(this,e)}function Q(e){return e.cloneNode(!0)}function G(e){Z(e);for(var t=0,e=e.childNodes||[];t<e.length;t++)G(e[t])}function Y(e,t,n){var i=et(e,"events");et(e,"handle")&&(d(t)?r(i,function(t,n){Un(e,n,t),delete i[n]}):d(n)?(Un(e,t,i[t]),delete i[t]):k(i[t],n))}function Z(e){var t=e[In],r=Fn[t];r&&(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Y(e)),delete Fn[t],e[In]=n)}function et(e,t,n){var r=e[In],r=Fn[r||-1];if(!v(n))return r&&r[t];r||(e[In]=r=++qn,r=Fn[r]={}),r[t]=n}function tt(e,t,n){var r=et(e,"data"),i=v(n),s=!i&&v(t),o=s&&!m(t);!r&&!o&&et(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];a(r,t)}}function nt(e,t){return(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function rt(e,t){t&&r(t.split(" "),function(t){e.className=x((" "+e.className+" ").replace(/[\n\t]/g," ").replace(" "+x(t)+" "," "))})}function it(e,t){t&&r(t.split(" "),function(t){nt(e,t)||(e.className=x(e.className+" "+x(t)))})}function st(e,t){if(t)for(var t=!t.nodeName&&v(t.length)&&!S(t)?t:[t],n=0;n<t.length;n++)e.push(t[n])}function ot(e,t){return ut(e,"$"+(t||"ngController")+"Controller")}function ut(e,t,n){e=kn(e);for(e[0].nodeType==9&&(e=e.find("html"));e.length;){if(n=e.data(t))return n;e=e.parent()}}function at(e,t){var n=Vn[t.toLowerCase()];return n&&$n[e.nodeName]&&n}function ft(e,n){var i=function(i,s){i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t);if(d(i.defaultPrevented)){var o=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,o.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){return i.defaultPrevented},r(n[s||i.type],function(t){t.call(e,i)}),Cn<=8?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(delete i.preventDefault,delete i.stopPropagation,delete i.isDefaultPrevented)};return i.elem=e,i}function lt(e){var t=typeof e,r;return t=="object"&&e!==null?typeof (r=e.$$hashKey)=="function"?r=e.$$hashKey():r===n&&(r=e.$$hashKey=u()):r=e,t+":"+r}function ct(e){r(e,this.put,this)}function ht(){}function pt(e){var t,n;return typeof e=="function"?(t=e.$inject)||(t=[],n=e.toString().replace(Gn,""),n=n.match(Jn),r(n[1].split(Kn),function(e){e.replace(Qn,function(e,n,r){t.push(r)})}),e.$inject=t):w(e)?(n=e.length-1,X(e[n],"fn"),t=e.slice(0,n)):X(e,"fn",!0),t}function dt(e){function t(e){return function(t,n){if(!m(t))return e(t,n);r(t,o(e))}}function n(e,t){if(E(t)||w(t))t=v.instantiate(t);if(!t.$get)throw Error("Provider "+e+" must define $get factory method.");return d[e+f]=t}function i(e,t){return n(e,{$get:t})}function s(e){var t=[];return r(e,function(e){if(!h.get(e))if(h.put(e,!0),g(e)){var n=Dn(e);t=t.concat(s(n.requires)).concat(n._runBlocks);try{for(var r=n._invokeQueue,n=0,i=r.length;n<i;n++){var o=r[n],u=o[0]=="$injector"?v:v.get(o[0]);u[o[1]].apply(u,o[2])}}catch(a){throw a.message&&(a.message+=" from "+e),a}}else if(E(e))try{t.push(v.invoke(e))}catch(f){throw f.message&&(f.message+=" from "+e),f}else if(w(e))try{t.push(v.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+String(e[e.length-1])),l}else X(e,"module")}),t}function u(e,t){function n(n){if(typeof n!="string")throw Error("Service name expected");if(e.hasOwnProperty(n)){if(e[n]===a)throw Error("Circular dependency: "+l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=a,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=pt(e),o,u,a;u=0;for(o=s.length;u<o;u++)a=s[u],i.push(r&&r.hasOwnProperty(a)?r[a]:n(a));e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(w(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),m(i)?i:n},get:n,annotate:pt}}var a={},f="Provider",l=[],h=new ct,d={$provide:{provider:t(n),factory:t(i),service:t(function(e,t){return i(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return i(e,p(t))}),constant:t(function(e,t){d[e]=t,y[e]=t}),decorator:function(e,t){var n=v.get(e+f),r=n.$get;n.$get=function(){var e=b.invoke(r,n);return b.invoke(t,null,{$delegate:e})}}}},v=u(d,function(){throw Error("Unknown provider: "+l.join(" <- "))}),y={},b=y.$injector=u(y,function(e){return e=v.get(e+f),b.invoke(e.$get,e)});return r(s(e),function(e){b.invoke(e||c)}),b}function vt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function s(e){var t=null;return r(e,function(e){!t&&Tn(e.nodeName)==="a"&&(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=s(u.getElementsByName(e)))?r.scrollIntoView():e==="top"&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(o)}),o}]}function mt(e,t,i,s){function o(e){try{e.apply(null,An.call(arguments,1))}finally{if(b--,b===0)for(;w.length;)try{w.pop()()}catch(t){i.error(t)}}}function u(e,t){(function n(){r(E,function(e){e()}),S=t(n,e)})()}function a(){x!=f.url()&&(x=f.url(),r(N,function(e){e(f.url())}))}var f=this,l=t[0],h=e.location,p=e.history,v=e.setTimeout,m=e.clearTimeout,y={};f.isMock=!1;var b=0,w=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){b++},f.notifyWhenNoOutstandingRequests=function(e){r(E,function(e){e()}),b===0?e():w.push(e)};var E=[],S;f.addPollFn=function(e){return d(S)&&u(100,v),E.push(e),e};var x=h.href,T=t.find("base");f.url=function(e,t){if(!e)return h.href.replace(/%27/g,"'");if(x!=e)return x=e,s.history?t?p.replaceState(null,"",e):(p.pushState(null,"",e),T.attr("href",T.attr("href"))):t?h.replace(e):h.href=e,f};var N=[],C=!1;f.onUrlChange=function(t){return C||(s.history&&kn(e).bind("popstate",a),s.hashchange?kn(e).bind("hashchange",a):f.addPollFn(a),C=!0),N.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var k={},L="",A=f.baseHref();f.cookies=function(e,t){var r,s,o,u;if(!e){if(l.cookie!==L){L=l.cookie,r=L.split("; "),k={};for(o=0;o<r.length;o++)s=r[o],u=s.indexOf("="),u>0&&(k[unescape(s.substring(0,u))]=unescape(s.substring(u+1)))}return k}t===n?l.cookie=escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":g(t)&&(r=(l.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return b++,n=v(function(){delete y[n],o(e)},t||0),y[n]=!0,n},f.defer.cancel=function(e){return y[e]?(delete y[e],m(e),o(c),!0):!1}}function gt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new mt(e,r,t,n)}]}function yt(){this.$get=function(){function e(e,n){function r(e){e!=c&&(h?h==e&&(h=e.n):h=e,i(e.n,e.p),i(e,c),c=e,c.n=null)}function i(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw Error("cacheId "+e+" taken");var s=0,o=a({},n,{id:e}),u={},f=n&&n.capacity||Number.MAX_VALUE,l={},c=null,h=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});r(n),d(t)||(e in u||s++,u[e]=t,s>f&&this.remove(h.key))},get:function(e){var t=l[e];if(t)return r(t),u[e]},remove:function(e){var t=l[e];t&&(t==c&&(c=t.p),t==h&&(h=t.n),i(t.n,t.p),delete l[e],delete u[e],s--)},removeAll:function(){u={},s=0,l={},c=h=null},destroy:function(){l=o=u=null,delete t[e]},info:function(){return a({},o,{size:s})}}}var t={};return e.info=function(){var e={};return r(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function bt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function wt(e){var i={},s="Directive",u=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,l="Template must have exactly one root element. was: ",c=/^\s*(https?|ftp|mailto|file):/;this.directive=function d(t,n){return g(t)?(W(n,"directive"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+s,["$injector","$exceptionHandler",function(e,n){var s=[];return r(i[t],function(r){try{var i=e.invoke(r);E(i)?i={compile:p(i)}:!i.compile&&i.link&&(i.compile=p(i.link)),i.priority=i.priority||0,i.name=i.name||t,i.require=i.require||i.controller&&i.name,i.restrict=i.restrict||"A",s.push(i)}catch(o){n(o)}}),s}])),i[t].push(n)):r(t,o(d)),this},this.urlSanitizationWhitelist=function(e){return v(e)?(c=e,this):c},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(e,o,d,v,y,b,S,T,N){function C(e,t,n){e instanceof kn||(e=kn(e)),r(e,function(t,n){t.nodeType==3&&t.nodeValue.match(/\S+/)&&(e[n]=kn(t).wrap("<span></span>").parent()[0])});var i=L(e,t,e,n);return function(t,n){W(t,"scope");for(var r=n?Xn.clone.call(e):e,s=0,o=r.length;s<o;s++){var u=r[s];(u.nodeType==1||u.nodeType==9)&&r.eq(s).data("$scope",t)}return k(r,"ng-scope"),n&&n(r,t),i&&i(t,r,r),r}}function k(e,t){try{e.addClass(t)}catch(n){}}function L(e,t,r,i){function s(e,r,i,s){var u,a,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=o.length;c<h;p++)a=d[p],r=o[c++],u=o[c++],r?(r.scope?(f=e.$new(m(r.scope)),kn(a).data("$scope",f)):f=e,(l=r.transclude)||!s&&t?r(u,f,a,i,function(t){return function(n){var r=e.$new();return r.$$transcluded=!0,t(r,n).bind("$destroy",M(r,r.$destroy))}}(l||t)):r(u,f,a,n,s)):u&&u(e,a.childNodes,n,s)}for(var o=[],u,a,f,l=0;l<e.length;l++)a=new U,u=O(e[l],[],a,i),a=(u=u.length?_(u,e[l],a,t,r):null)&&u.terminal||!e[l].childNodes||!e[l].childNodes.length?null:L(e[l].childNodes,u?u.transclude:t),o.push(u),o.push(a),f=f||u||a;return f?s:null}function O(e,t,n,r){var i=n.$attr,s;switch(e.nodeType){case 1:D(t,Et(Pn(e).toLowerCase()),"E",r);var o,a,l;s=e.attributes;for(var c=0,h=s&&s.length;c<h;c++)if(o=s[c],o.specified)a=o.name,l=Et(a.toLowerCase()),i[l]=a,n[l]=o=x(Cn&&a=="href"?decodeURIComponent(e.getAttribute(a,2)):o.value),at(e,l)&&(n[l]=!0),q(e,t,o,l),D(t,l,"A",r);e=e.className;if(g(e)&&e!=="")for(;s=f.exec(e);)l=Et(s[2]),D(t,l,"C",r)&&(n[l]=x(s[3])),e=e.substr(s.index+s[0].length);break;case 3:I(t,e.nodeValue);break;case 8:try{if(s=u.exec(e.nodeValue))l=Et(s[1]),D(t,l,"M",r)&&(n[l]=x(s[2]))}catch(p){}}return t.sort(j),t}function _(e,i,s,o,u){function a(e,t){e&&(e.require=M.require,p.push(e)),t&&(t.require=M.require,v.push(t))}function f(e,t){var n,i="data",s=!1;if(g(e)){for(;(n=e.charAt(0))=="^"||n=="?";)e=e.substr(1),n=="^"&&(i="inheritedData"),s=s||n=="?";n=t[i]("$"+e+"Controller");if(!n&&!s)throw Error("No controller: "+e)}else w(e)&&(n=[],r(e,function(e){n.push(f(e,t))}));return n}function c(e,t,o,u,a){var l,c,h,m,g;l=i===o?s:A(s,new U(kn(o),s.$attr)),c=l.$$element;if(T){var y=/^\s*([@=&])\s*(\w*)\s*$/,w=t.$parent||t;r(T.scope,function(e,n){var r=e.match(y)||[],i=r[2]||n,r=r[1],s,o,u;t.$$isolateBindings[n]=r+i;switch(r){case"@":l.$observe(i,function(e){t[n]=e}),l.$$observers[i].$$scope=w;break;case"=":o=b(l[i]),u=o.assign||function(){throw s=t[n]=o(w),Error(Yn+l[i]+" (directive: "+T.name+")")},s=t[n]=o(w),t.$watch(function(){var e=o(w);return e!==t[n]&&(e!==s?s=t[n]=e:u(w,e=s=t[n])),e});break;case"&":o=b(l[i]),t[n]=function(e){return o(w,e)};break;default:throw Error("Invalid isolate scope definition for directive "+T.name+": "+e)}})}q&&r(q,function(e){var n={$scope:t,$element:c,$attrs:l,$transclude:a};g=e.controller,g=="@"&&(g=l[e.name]),c.data("$"+e.name+"Controller",S(g,n))}),u=0;for(h=p.length;u<h;u++)try{m=p[u],m(t,c,l,m.require&&f(m.require,c))}catch(E){d(E,B(c))}e&&e(t,o.childNodes,n,a),u=0;for(h=v.length;u<h;u++)try{m=v[u],m(t,c,l,m.require&&f(m.require,c))}catch(x){d(x,B(c))}}for(var h=-Number.MAX_VALUE,p=[],v=[],y=null,T=null,N=null,L=s.$$element=kn(i),M,_,D,j,I=o,q,z,W,X=0,V=e.length;X<V;X++){M=e[X],D=n;if(h>M.priority)break;if(W=M.scope)F("isolated scope",T,M,L),m(W)&&(k(L,"ng-isolate-scope"),T=M),k(L,"ng-scope"),y=y||M;_=M.name;if(W=M.controller)q=q||{},F("'"+_+"' controller",q[_],M,L),q[_]=M;if(W=M.transclude)F("transclusion",j,M,L),j=M,h=M.priority,W=="element"?(D=kn(i),L=s.$$element=kn(t.createComment(" "+_+": "+s[_]+" ")),i=L[0],R(u,kn(D[0]),i),I=C(D,o,h)):(D=kn(Q(i)).contents(),L.html(""),I=C(D,o));if(W=M.template)if(F("template",N,M,L),N=M,W=J(W),M.replace){D=kn("<div>"+x(W)+"</div>").contents(),i=D[0];if(D.length!=1||i.nodeType!==1)throw Error(l+W);R(u,L,i),_={$attr:{}},e=e.concat(O(i,e.splice(X+1,e.length-(X+1)),_)),P(s,_),V=e.length}else L.html(W);if(M.templateUrl)F("template",N,M,L),N=M,c=H(e.splice(X,e.length-X),c,L,s,u,M.replace,I),V=e.length;else if(M.compile)try{z=M.compile(L,s,I),E(z)?a(null,z):z&&a(z.pre,z.post)}catch($){d($,B(L))}M.terminal&&(c.terminal=!0,h=Math.max(h,M.priority))}return c.scope=y&&y.scope,c.transclude=j&&I,c}function D(t,r,o,u){var a=!1;if(i.hasOwnProperty(r))for(var f,r=e.get(r+s),l=0,c=r.length;l<c;l++)try{if(f=r[l],(u===n||u>f.priority)&&f.restrict.indexOf(o)!=-1)t.push(f),a=!0}catch(h){d(h)}return a}function P(e,t){var n=t.$attr,i=e.$attr,s=e.$$element;r(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&(r+=(i==="style"?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){r=="class"?(k(s,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):r=="style"?s.attr("style",s.attr("style")+";"+t):r.charAt(0)!="$"&&!e.hasOwnProperty(r)&&(e[r]=t,i[r]=n[r])})}function H(e,t,n,r,i,s,o){var u=[],f,c,h=n[0],p=e.shift(),d=a({},p,{controller:null,templateUrl:null,transclude:null,scope:null});return n.html(""),v.get(p.templateUrl,{cache:y}).success(function(a){var p,v,a=J(a);if(s){v=kn("<div>"+x(a)+"</div>").contents(),p=v[0];if(v.length!=1||p.nodeType!==1)throw Error(l+a);a={$attr:{}},R(i,n,p),O(p,e,a),P(r,a)}else p=h,n.html(a);e.unshift(d),f=_(e,p,r,o);for(c=L(n[0].childNodes,o);u.length;){var m=u.pop(),a=u.pop();v=u.pop();var g=u.pop(),y=p;v!==h&&(y=Q(p),R(a,kn(v),y)),f(function(){t(c,g,y,i,m)},g,y,i,m)}u=null}).error(function(e,t,n,r){throw Error("Failed to load template: "+r.url)}),function(e,n,r,i,s){u?(u.push(n),u.push(r),u.push(i),u.push(s)):f(function(){t(c,n,r,i,s)},n,r,i,s)}}function j(e,t){return t.priority-e.priority}function F(e,t,n,r){if(t)throw Error("Multiple directives ["+t.name+", "+n.name+"] asking for "+e+" on: "+B(r))}function I(e,t){var n=o(t,!0);n&&e.push({priority:0,compile:p(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),k(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function q(e,t,r,i){var s=o(r,!0);s&&t.push({priority:100,compile:p(function(e,t,r){t=r.$$observers||(r.$$observers={}),i==="class"&&(s=o(r[i],!0)),r[i]=n,(t[i]||(t[i]=[])).$$inter=!0,(r.$$observers&&r.$$observers[i].$$scope||e).$watch(s,function(e){r.$set(i,e)})})})}function R(e,t,n){var r=t[0],i=r.parentNode,s,o;if(e){s=0;for(o=e.length;s<o;s++)if(e[s]==r){e[s]=n;break}}i&&i.replaceChild(n,r),n[kn.expando]=r[kn.expando],t[0]=n}var U=function(e,t){this.$$element=e,this.$attr=t||{}};U.prototype={$normalize:Et,$set:function(e,t,i,s){var o=at(this.$$element[0],e),u=this.$$observers;o&&(this.$$element.prop(e,t),s=o),this[e]=t,s?this.$attr[e]=s:(s=this.$attr[e])||(this.$attr[e]=s=z(e,"-")),Pn(this.$$element[0])==="A"&&e==="href"&&(X.setAttribute("href",t),o=X.href,o.match(c)||(this[e]=t="unsafe:"+o)),i!==!1&&(t===null||t===n?this.$$element.removeAttr(s):this.$$element.attr(s,t)),u&&r(u[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),T.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var X=N[0].createElement("a"),V=o.startSymbol(),$=o.endSymbol(),J=V=="{{"||$=="}}"?h:function(e){return e.replace(/\{\{/g,V).replace(/}}/g,$)};return C}]}function Et(e){return $(e.replace(Zn,""))}function St(){var e={};this.register=function(t,n){m(t)?a(e,t):e[t]=n},this.$get=["$injector","$window",function(t,n){return function(r,i){if(g(r)){var s=r,r=e.hasOwnProperty(s)?e[s]:Rt(i.$scope,s,!0)||Rt(n,s,!0);X(r,s,!0)}return t.instantiate(r,i)}}]}function xt(){this.$get=["$window",function(e){return kn(e.document)}]}function Tt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse",function(r){function i(i,u){for(var a,f,l=0,c=[],h=i.length,p=!1,d=[];l<h;)(a=i.indexOf(e,l))!=-1&&(f=i.indexOf(t,a+s))!=-1?(l!=a&&c.push(i.substring(l,a)),c.push(l=r(p=i.substring(a+s,f))),l.exp=p,l=f+o,p=!0):(l!=h&&c.push(i.substring(l)),l=h);(h=c.length)||(c.push(""),h=1);if(!u||p)return d.length=h,l=function(e){for(var t=0,r=h,i;t<r;t++)typeof (i=c[t])=="function"&&(i=i(e),i==null||i==n?i="":typeof i!="string"&&(i=D(i))),d[t]=i;return d.join("")},l.exp=i,l.parts=c,l}var s=e.length,o=t.length;return i.startSymbol=function(){return e},i.endSymbol=function(){return t},i}]}function Ct(e){for(var e=e.split("/"),t=e.length;t--;)e[t]=I(e[t]);return e.join("/")}function kt(e,t){var n=er.exec(e),n={protocol:n[1],host:n[3],port:f(n[5])||rr[n[1]]||null,path:n[6]||"/",search:n[8],hash:n[10]};return t&&(t.$$protocol=n.protocol,t.$$host=n.host,t.$$port=n.port),n}function Lt(e,t,n){return e+"://"+t+(n==rr[e]?"":":"+n)}function At(e,t,n){var r=kt(e);return decodeURIComponent(r.path)!=t||d(r.hash)||r.hash.indexOf(n)!==0?e:Lt(r.protocol,r.host,r.port)+t.substr(0,t.lastIndexOf("/"))+r.hash.substr(n.length)}function Ot(e,t,n){var r=kt(e);if(decodeURIComponent(r.path)==t&&!d(r.hash)&&r.hash.indexOf(n)===0)return e;var i=r.search&&"?"+r.search||"",s=r.hash&&"#"+r.hash||"",o=t.substr(0,t.lastIndexOf("/")),u=r.path.substr(o.length);if(r.path.indexOf(o)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+o+'" !');return Lt(r.protocol,r.host,r.port)+t+"#"+n+u+i+s}function Mt(e,t,n){t=t||"",this.$$parse=function(e){var n=kt(e,this);if(n.path.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+t+'" !');this.$$path=decodeURIComponent(n.path.substr(t.length)),this.$$search=j(n.search),this.$$hash=n.hash&&decodeURIComponent(n.hash)||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+t+this.$$url},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function _t(e,t,n){var r;this.$$parse=function(e){var n=kt(e,this);if(n.hash&&n.hash.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing hash prefix "'+t+'" !');r=n.path+(n.search?"?"+n.search:""),n=nr.exec((n.hash||"").substr(t.length)),this.$$path=n[1]?(n[1].charAt(0)=="/"?"":"/")+decodeURIComponent(n[1]):"",this.$$search=j(n[3]),this.$$hash=n[5]&&decodeURIComponent(n[5])||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+r+(this.$$url?"#"+t+this.$$url:"")},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function Dt(e,t,n,r){_t.apply(this,arguments),this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return n+r+"#"+t+e.substr(n.length)}}function Pt(e){return function(){return this[e]}}function Ht(e,t){return function(n){return d(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Bt(){var t="",n=!1;this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return v(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f,l,c=i.url(),h=kt(c);n?(f=i.baseHref()||"/",l=f.substr(0,f.lastIndexOf("/")),h=Lt(h.protocol,h.host,h.port)+l+"/",a=s.history?new Mt(At(c,f,t),l,h):new Dt(Ot(c,f,t),t,h,f.substr(l.length+1))):(h=Lt(h.protocol,h.host,h.port)+(h.path||"")+(h.search?"?"+h.search:"")+"#"+t+"/",a=new _t(c,t,h)),o.bind("click",function(t){if(!t.ctrlKey&&!t.metaKey&&t.which!=2){for(var n=kn(t.target);Tn(n[0].nodeName)!=="a";)if(n[0]===o[0]||!(n=n.parent())[0])return;var i=n.prop("href"),s=a.$$rewriteAppUrl(i);i&&!n.attr("target")&&s&&(a.$$parse(s),r.$apply(),t.preventDefault(),e.angular["ff-684208-preventDefault"]=!0)}}),a.absUrl()!=c&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest())});var p=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;if(!p||e!=a.absUrl())p++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))});return a.$$replace=!1,p}),a}]}function jt(){this.$get=["$window",function(e){function t(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function n(n){var i=e.console||{},s=i[n]||i.log||c;return s.apply?function(){var e=[];return r(arguments,function(n){e.push(t(n))}),s.apply(i,e)}:function(e,t){s(e,t)}}return{log:n("log"),warn:n("warn"),info:n("info"),error:n("error")}}]}function Ft(e,t){function n(e){return e.indexOf(y)!=-1}function r(){return m+1<e.length?e.charAt(m+1):!1}function i(e){return"0"<=e&&e<="9"}function s(e){return e==" "||e=="\r"||e==" "||e=="\n"||e==""||e==" "}function o(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"==e||e=="$"}function u(e){return e=="-"||e=="+"||i(e)}function f(t,n,r){throw r=r||m,Error("Lexer Error: "+t+" at column"+(v(n)?"s "+n+"-"+m+" ["+e.substring(n,r)+"]":" "+r)+" in expression ["+e+"].")}function l(){for(var t="",n=m;m<e.length;){var s=Tn(e.charAt(m));if(s=="."||i(s))t+=s;else{var o=r();if(s=="e"&&u(o))t+=s;else if(u(s)&&o&&i(o)&&t.charAt(t.length-1)=="e")t+=s;else{if(!u(s)||!!o&&!!i(o)||t.charAt(t.length-1)!="e")break;f("Invalid exponent")}}m++}t*=1,p.push({index:n,text:t,json:!0,fn:function(){return t}})}function c(){for(var n="",r=m,u,f,l;m<e.length;){var c=e.charAt(m);if(c!="."&&!o(c)&&!i(c))break;c=="."&&(u=m),n+=c,m++}if(u)for(f=m;f<e.length;){c=e.charAt(f);if(c=="("){l=n.substr(u-r+1),n=n.substr(0,u-r),m=f;break}if(!s(c))break;f++}r={index:r,text:n};if(ir.hasOwnProperty(n))r.fn=r.json=ir[n];else{var h=zt(n,t);r.fn=a(function(e,t){return h(e,t)},{assign:function(e,t){return qt(e,n,t)}})}p.push(r),l&&(p.push({index:u,text:".",json:!1}),p.push({index:u+1,text:l,json:!1}))}function h(t){var n=m;m++;for(var r="",i=t,s=!1;m<e.length;){var o=e.charAt(m);i+=o;if(s)o=="u"?(o=e.substring(m+1,m+5),o.match(/[\da-f]{4}/i)||f("Invalid unicode escape [\\u"+o+"]"),m+=4,r+=String.fromCharCode(parseInt(o,16))):(s=sr[o],r+=s?s:o),s=!1;else if(o=="\\")s=!0;else{if(o==t){m++,p.push({index:n,text:i,string:r,json:!0,fn:function(){return r}});return}r+=o}m++}f("Unterminated quote",n)}for(var p=[],d,m=0,g=[],y,b=":";m<e.length;){y=e.charAt(m);if(n("\"'"))h(y);else if(i(y)||n(".")&&i(r()))l();else if(o(y)){if(c(),"{,".indexOf(b)!=-1&&g[0]=="{"&&(d=p[p.length-1]))d.json=d.text.indexOf(".")==-1}else if(n("(){}[].,;:"))p.push({index:m,text:y,json:":[,".indexOf(b)!=-1&&n("{[")||n("}]:,")}),n("{[")&&g.unshift(y),n("}]")&&g.shift(),m++;else{if(s(y)){m++;continue}var w=y+r(),E=ir[y],S=ir[w];S?(p.push({index:m,text:w,fn:S}),m+=2):E?(p.push({index:m,text:y,fn:E,json:"[,:".indexOf(b)!=-1&&n("+-")}),m+=1):f("Unexpected next character ",m,m+1)}b=y}return p}function It(e,t,r,i){function s(t,n){throw Error("Syntax Error: Token '"+n.text+"' "+t+" at column "+(n.index+1)+" of the expression ["+e+"] starting at ["+e.substring(n.index)+"].")}function o(){if(L.length===0)throw Error("Unexpected end of expression: "+e);return L[0]}function u(e,t,n,r){if(L.length>0){var i=L[0],s=i.text;if(s==e||s==t||s==n||s==r||!e&&!t&&!n&&!r)return i}return!1}function f(e,n,r,i){return(e=u(e,n,r,i))?(t&&!e.json&&s("is not valid json",e),L.shift(),e):!1}function l(e){f(e)||s("is unexpected, expecting ["+e+"]",u())}function h(e,t){return function(n,r){return e(n,r,t)}}function d(e,t,n){return function(r,i){return t(r,i,e,n)}}function v(){for(var e=[];;)if(L.length>0&&!u("}",")",";","]")&&e.push(D()),!f(";"))return e.length==1?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}}function m(){for(var e=f(),t=r(e.text),n=[];;){if(!(e=f(":"))){var i=function(e,r,i){for(var i=[i],s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return i}}n.push(A())}}function g(){for(var e=y(),t;;){if(!(t=f("||")))return e;e=d(e,t.fn,y())}}function y(){var e=b(),t;if(t=f("&&"))e=d(e,t.fn,y());return e}function b(){var e=w(),t;if(t=f("==","!="))e=d(e,t.fn,b());return e}function w(){var e;e=E();for(var t;t=f("+","-");)e=d(e,t.fn,E());if(t=f("<",">","<=",">="))e=d(e,t.fn,w());return e}function E(){for(var e=S(),t;t=f("*","/","%");)e=d(e,t.fn,S());return e}function S(){var e;return f("+")?x():(e=f("-"))?d(C,e.fn,S()):(e=f("!"))?h(e.fn,S()):x()}function x(){var e;if(f("("))e=D(),l(")");else if(f("["))e=T();else if(f("{"))e=N();else{var t=f();(e=t.fn)||s("not a primary expression",t)}for(var n;t=f("(","[",".");)t.text==="("?(e=O(e,n),n=null):t.text==="["?(n=e,e=_(e)):t.text==="."?(n=e,e=M(e)):s("IMPOSSIBLE");return e}function T(){var e=[];if(o().text!="]")do e.push(A());while(f(","));return l("]"),function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r}}function N(){var e=[];if(o().text!="}")do{var t=f(),t=t.string||t.text;l(":");var n=A();e.push({key:t,value:n})}while(f(","));return l("}"),function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i],o=s.value(t,n);r[s.key]=o}return r}}var C=p(0),k,L=Ft(e,i),A=function(){var t=g(),n,r;return(r=f("="))?(t.assign||s("implies assignment but ["+e.substring(0,r.index)+"] can not be assigned to",r),n=g(),function(e,r){return t.assign(e,n(e,r),r)}):t},O=function(e,t){var n=[];if(o().text!=")")do n.push(A());while(f(","));return l(")"),function(r,i){for(var s=[],o=t?t(r,i):r,u=0;u<n.length;u++)s.push(n[u](r,i));return u=e(r,i)||c,u.apply?u.apply(o,s):u(s[0],s[1],s[2],s[3],s[4])}},M=function(e){var t=f().text,n=zt(t,i);return a(function(t,r){return n(e(t,r),r)},{assign:function(n,r,i){return qt(e(n,i),t,r)}})},_=function(e){var t=A();return l("]"),a(function(r,i){var s=e(r,i),o=t(r,i),u;return s?((s=s[o])&&s.then&&(u=s,"$$v"in s||(u.$$v=n,u.then(function(e){u.$$v=e})),s=s.$$v),s):n},{assign:function(n,r,i){return e(n,i)[t(n,i)]=r}})},D=function(){for(var e=A(),t;;){if(!(t=f("|")))return e;e=d(e,t.fn,m())}};return t?(A=g,O=M=_=D=function(){s("is not valid json",{text:e,index:0})},k=x()):k=v(),L.length!==0&&s("is an unexpected token",L[0]),k}function qt(e,t,n){for(var t=t.split("."),r=0;t.length>1;r++){var i=t.shift(),s=e[i];s||(s={},e[i]=s),e=s}return e[t.shift()]=n}function Rt(e,t,n){if(!t)return e;for(var t=t.split("."),r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&E(e)?M(i,e):e}function Ut(e,t,r,i,s){return function(o,u){var a=u&&u.hasOwnProperty(e)?u:o,f;return a===null||a===n?a:((a=a[e])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!t||a===null||a===n?a:((a=a[t])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!r||a===null||a===n?a:((a=a[r])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!i||a===null||a===n?a:((a=a[i])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!s||a===null||a===n?a:((a=a[s])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),a)))))}}function zt(e,t){if(or.hasOwnProperty(e))return or[e];var i=e.split("."),s=i.length,o;if(t)o=s<6?Ut(i[0],i[1],i[2],i[3],i[4]):function(e,t){var r=0,o;do o=Ut(i[r++],i[r++],i[r++],i[r++],i[r++])(e,t),t=n,e=o;while(r<s);return o};else{var u="var l, fn, p;\n";r(i,function(e,t){u+="if(s === null || s === undefined) return s;\nl=s;\ns="+(t?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'}),u+="return s;",o=Function("s","k",u),o.toString=function(){return u}}return or[e]=o}function Wt(){var e={};this.$get=["$filter","$sniffer",function(t,n){return function(r){switch(typeof r){case"string":return e.hasOwnProperty(r)?e[r]:e[r]=It(r,!1,t,n.csp);case"function":return r;default:return c}}}]}function Xt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Vt(function(t){e.$evalAsync(t)},t)}]}function Vt(e,t){function i(e){return e}function s(e){return a(e)}var o=function(){var r=[],f,l;return l={resolve:function(t){if(r){var i=r;r=n,f=u(t),i.length&&e(function(){for(var e,t=0,n=i.length;t<n;t++)e=i[t],f.then(e[0],e[1])})}},reject:function(e){l.resolve(a(e))},promise:{then:function(e,n){var u=o(),a=function(n){try{u.resolve((e||i)(n))}catch(r){t(r),u.reject(r)}},l=function(e){try{u.resolve((n||s)(e))}catch(r){t(r),u.reject(r)}};return r?r.push([a,l]):f.then(a,l),u.promise}}}},u=function(t){return t&&t.then?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(t){return{then:function(n,r){var i=o();return e(function(){i.resolve((r||s)(t))}),i.promise}}};return{defer:o,reject:a,when:function(n,r,f){var l=o(),c,h=function(e){try{return(r||i)(e)}catch(n){return t(n),a(n)}},p=function(e){try{return(f||s)(e)}catch(n){return t(n),a(n)}};return e(function(){u(n).then(function(e){c||(c=!0,l.resolve(u(e).then(h,p)))},function(e){c||(c=!0,l.resolve(p(e)))})}),l.promise},all:function(e){var t=o(),n=e.length,i=[];return n?r(e,function(e,r){u(e).then(function(e){r in i||(i[r]=e,--n||t.resolve(i))},function(e){r in i||t.reject(e)})}):t.resolve(i),t.promise}}}function $t(){var e={};this.when=function(t,n){e[t]=a({reloadOnSearch:!0},n);if(t){var r=t[t.length-1]=="/"?t.substr(0,t.length-1):t+"/";e[r]={redirectTo:t}}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(t,n,i,s,o,u,f){function c(e,t){for(var t="^"+t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",n="",i=[],s={},o=/:(\w+)/g,u,a=0;(u=o.exec(t))!==null;)n+=t.slice(a,u.index),n+="([^\\/]*)",i.push(u[1]),a=o.lastIndex;n+=t.substr(a);var f=e.match(RegExp(n));return f&&r(i,function(e,t){s[e]=f[t+1]}),f?s:null}function h(){var e=p(),a=y.current;if(e&&a&&e.$$route===a.$$route&&O(e.pathParams,a.pathParams)&&!e.reloadOnSearch&&!m)a.params=e.params,L(a.params,i),t.$broadcast("$routeUpdate",a);else if(e||a)m=!1,t.$broadcast("$routeChangeStart",e,a),(y.current=e)&&e.redirectTo&&(g(e.redirectTo)?n.path(d(e.redirectTo,e.params)).search(e.params).replace():n.url(e.redirectTo(e.pathParams,n.path(),n.search())).replace()),s.when(e).then(function(){if(e){var t=[],n=[],i;return r(e.resolve||{},function(e,r){t.push(r),n.push(g(e)?o.get(e):o.invoke(e))}),v(i=e.template)||v(i=e.templateUrl)&&(i=u.get(i,{cache:f}).then(function(e){return e.data})),v(i)&&(t.push("$template"),n.push(i)),s.all(n).then(function(e){var n={};return r(e,function(e,r){n[t[r]]=e}),n})}}).then(function(n){e==y.current&&(e&&(e.locals=n,L(e.params,i)),t.$broadcast("$routeChangeSuccess",e,a))},function(n){e==y.current&&t.$broadcast("$routeChangeError",e,a,n)})}function p(){var t,i;return r(e,function(e,r){!i&&(t=c(n.path(),r))&&(i=l(e,{params:a({},n.search(),t),pathParams:t}),i.$$route=e)}),i||e[null]&&l(e[null],{params:{},pathParams:{}})}function d(e,t){var n=[];return r((e||"").split(":"),function(e,r){if(r==0)n.push(e);else{var i=e.match(/(\w+)(.*)/),s=i[1];n.push(t[s]),n.push(i[2]||""),delete t[s]}}),n.join("")}var m=!1,y={routes:e,reload:function(){m=!0,t.$evalAsync(h)}};return t.$on("$locationChangeSuccess",h),y}]}function Jt(){this.$get=p({})}function Kt(){var e=10;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse",function(t,n,r){function i(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function s(e){if(f.$$phase)throw Error(f.$$phase+" already in progress");f.$$phase=e}function o(e,t){var n=r(e);return X(n,t),n}function a(){}i.prototype={$new:function(e){if(E(e))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return e?(e=new i,e.$root=this.$root):(e=function(){},e.prototype=this,e=new e,e.$id=u()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$asyncQueue=[],e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=o(e,"watch"),i=this.$$watchers,s={fn:t,last:a,get:r,exp:e,eq:!!n};if(!E(t)){var u=o(t||c,"listener");s.fn=function(e,t,n){u(n)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){k(i,s)}},$digest:function(){var t,r,i,o,u,l,c,h=e,p,d=[],v,m;s("$digest");do{c=!1,p=this;do{for(u=p.$$asyncQueue;u.length;)try{p.$eval(u.shift())}catch(g){n(g)}if(o=p.$$watchers)for(l=o.length;l--;)try{if(t=o[l],(r=t.get(p))!==(i=t.last)&&!(t.eq?O(r,i):typeof r=="number"&&typeof i=="number"&&isNaN(r)&&isNaN(i)))c=!0,t.last=t.eq?L(r):r,t.fn(r,i===a?r:i,p),h<5&&(v=4-h,d[v]||(d[v]=[]),m=E(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,m+="; newVal: "+D(r)+"; oldVal: "+D(i),d[v].push(m))}catch(y){n(y)}if(!(o=p.$$childHead||p!==this&&p.$$nextSibling))for(;p!==this&&!(o=p.$$nextSibling);)p=p.$parent}while(p=o);if(c&&!(h--))throw f.$$phase=null,Error(e+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+D(d))}while(c||u.length);f.$$phase=null},$destroy:function(){if(f!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return r(e)(this,t)},$evalAsync:function(e){this.$$asyncQueue.push(e)},$apply:function(e){try{return s("$apply"),this.$eval(e)}catch(t){n(t)}finally{f.$$phase=null;try{f.$digest()}catch(r){throw n(r),r}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[C(n,t)]=null}},$emit:function(e,t){var r=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(An.call(arguments,1)),f,l;do{i=s.$$listeners[e]||r,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{if(i[f].apply(null,a),o)return u}catch(c){n(c)}else i.splice(f,1),f--,l--;s=s.$parent}while(s);return u},$broadcast:function(e,t){var r=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(An.call(arguments,1)),u,a;do{r=i,s.currentScope=r,i=r.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){n(f)}else i.splice(u,1),u--,a--;if(!(i=r.$$childHead||r!==this&&r.$$nextSibling))for(;r!==this&&!(i=r.$$nextSibling);)r=r.$parent}while(r=i);return s}};var f=new i;return f}]}function Qt(){this.$get=["$window",function(e){var t={},n=f((/android (\d+)/.exec(Tn(e.navigator.userAgent))||[])[1]);return{history:!(!e.history||!e.history.pushState||n<4),hashchange:"onhashchange"in e&&(!e.document.documentMode||e.document.documentMode>7),hasEvent:function(n){if(n=="input"&&Cn==9)return!1;if(d(t[n])){var r=e.document.createElement("div");t[n]="on"+n in r}return t[n]},csp:!1}}]}function Gt(){this.$get=p(e)}function Yt(e){var t={},n,i,s;return e?(r(e.split("\n"),function(e){s=e.indexOf(":"),n=Tn(x(e.substr(0,s))),i=x(e.substr(s+1)),n&&(t[n]?t[n]+=", "+i:t[n]=i)}),t):t}function Zt(e){var t=m(e)?e:n;return function(n){return t||(t=Yt(e)),n?t[Tn(n)]||null:t}}function en(e,t,n){return E(n)?n(e,t):(r(n,function(n){e=n(e,t)}),e)}function tn(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,o=this.defaults={transformResponse:[function(n){return g(n)&&(n=n.replace(i,""),e.test(n)&&t.test(n)&&(n=P(n,!0))),n}],transformRequest:[function(e){return m(e)&&Mn.apply(e)!=="[object File]"?D(e):e}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},u=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,f,l,c){function h(e){function n(e){var t=a({},e,{data:en(e.data,e.headers,s)});return 200<=e.status&&e.status<300?t:l.reject(t)}e.method=Nn(e.method);var i=e.transformRequest||o.transformRequest,s=e.transformResponse||o.transformResponse,u=o.headers,u=a({"X-XSRF-TOKEN":t.cookies()["XSRF-TOKEN"]},u.common,u[Tn(e.method)],e.headers),i=en(e.data,Zt(u),i),f;return d(e.data)&&delete u["Content-Type"],f=p(e,i,u),f=f.then(n,n),r(b,function(e){f=e(f)}),f.success=function(t){return f.then(function(n){t(n.data,n.status,n.headers,e)}),f},f.error=function(t){return f.then(null,function(n){t(n.data,n.status,n.headers,e)}),f},f}function p(t,n,r){function i(e,t,n){c&&(200<=e&&e<300?c.put(d,[e,t,Yt(n)]):c.remove(d)),s(t,e,n),f.$apply()}function s(e,n,r){n=Math.max(n,0),(200<=n&&n<300?u.resolve:u.reject)({data:e,status:n,headers:Zt(r),config:t})}function o(){var e=C(h.pendingRequests,t);e!==-1&&h.pendingRequests.splice(e,1)}var u=l.defer(),a=u.promise,c,p,d=v(t.url,t.params);h.pendingRequests.push(t),a.then(o,o),t.cache&&t.method=="GET"&&(c=m(t.cache)?t.cache:y);if(c)if(p=c.get(d)){if(p.then)return p.then(o,o),p;w(p)?s(p[1],p[0],L(p[2])):s(p,200,{})}else c.put(d,a);return p||e(t.method,d,n,i,r,t.timeout,t.withCredentials),a}function v(e,t){if(!t)return e;var r=[];return s(t,function(e,t){e==null||e==n||(m(e)&&(e=D(e)),r.push(encodeURIComponent(t)+"="+encodeURIComponent(e)))}),e+(e.indexOf("?")==-1?"?":"&")+r.join("&")}var y=i("$http"),b=[];return r(u,function(e){b.push(g(e)?c.get(e):c.invoke(e))}),h.pendingRequests=[],function(e){r(arguments,function(e){h[e]=function(t,n){return h(a(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){r(arguments,function(e){h[e]=function(t,n,r){return h(a(r||{},{method:e,url:t,data:n}))}})}("post","put"),h.defaults=o,h}]}function nn(){this.$get=["$browser","$window","$document",function(e,t,n){return rn(e,ur,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function rn(e,t,n,i,s,o){function u(e,t){var n=s.createElement("script"),r=function(){s.body.removeChild(n),t&&t()};n.type="text/javascript",n.src=e,Cn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,s.body.appendChild(n)}return function(s,a,f,l,h,p,d){function v(t,n,r,i){n=(a.match(er)||["",o])[1]=="file"?r?200:404:n,t(n==1223?204:n,r,i),e.$$completeOutstandingRequest(c)}e.$$incOutstandingRequestCount(),a=a||e.url();if(Tn(s)=="jsonp"){var m="_"+(i.counter++).toString(36);i[m]=function(e){i[m].data=e},u(a.replace("JSON_CALLBACK","angular.callbacks."+m),function(){i[m].data?v(l,200,i[m].data):v(l,-2),delete i[m]})}else{var g=new t;g.open(s,a,!0),r(h,function(e,t){e&&g.setRequestHeader(t,e)});var y;g.onreadystatechange=function(){if(g.readyState==4){var e=g.getAllResponseHeaders(),t=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];e||(e="",r(t,function(t){var n=g.getResponseHeader(t);n&&(e+=t+": "+n+"\n")})),v(l,y||g.status,g.responseText,e)}},d&&(g.withCredentials=!0),g.send(f||""),p>0&&n(function(){y=-1,g.abort()},p)}}}function sn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return e===1?"one":"other"}}}}function on(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=v(u)&&!u,o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}l||e.$apply()},o),u=function(){delete s[f.$$timeoutId]};return f.$$timeoutId=o,s[o]=a,f.then(u,u),f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),t.defer.cancel(e.$$timeoutId)):!1},i}]}function un(e){function t(t,r){return e.factory(t+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",fn),t("date",vn),t("filter",an),t("json",mn),t("limitTo",gn),t("lowercase",hr),t("number",ln),t("orderBy",yn),t("uppercase",pr)}function an(){return function(e,t){if(!w(e))return e;var n=[];n.check=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};var r=function(e,t){if(t.charAt(0)==="!")return!r(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return(""+e).toLowerCase().indexOf(t)>-1;case"object":for(var n in e)if(n.charAt(0)!=="$"&&r(e[n],t))return!0;return!1;case"array":for(n=0;n<e.length;n++)if(r(e[n],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var i in t)i=="$"?function(){var e=(""+t[i]).toLowerCase();e&&n.push(function(t){return r(t,e)})}():function(){var e=i,s=(""+t[i]).toLowerCase();s&&n.push(function(t){return r(Rt(t,e),s)})}();break;case"function":n.push(t);break;default:return e}for(var s=[],o=0;o<e.length;o++){var u=e[o];n.check(u)&&s.push(u)}return s}}function fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return d(n)&&(n=t.CURRENCY_SYM),cn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function ln(e){var t=e.NUMBER_FORMATS;return function(e,n){return cn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function cn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=e<0,e=Math.abs(e),o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?o="0":(u=o,f=!0)}if(!f){o=(o.split(ar)[1]||"").length,d(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac));var o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(ar),o=e[0],e=e[1]||"",f=0,l=t.lgSize,c=t.gSize;if(o.length>=l+c)for(var f=o.length-l,h=0;h<f;h++)(f-h)%c===0&&h!==0&&(u+=n),u+=o.charAt(h);for(h=f;h<o.length;h++)(o.length-h)%l===0&&h!==0&&(u+=n),u+=o.charAt(h);for(;e.length<i;)e+="0";i&&i!=="0"&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function hn(e,t,n){var r="";e<0&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function pn(e,t,n,r){return function(i){i=i["get"+e]();if(n>0||i>-n)i+=n;return i===0&&n==-12&&(i=12),hn(i,t,r)}}function dn(e,t){return function(n,r){var i=n["get"+e](),s=Nn(t?"SHORT"+e:e);return r[s][i]}}function vn(e){function t(e){var t;if(t=e.match(n)){var e=new Date(0),r=0,i=0;t[9]&&(r=f(t[9]+t[10]),i=f(t[9]+t[11])),e.setUTCFullYear(f(t[1]),f(t[2])-1,f(t[3])),e.setUTCHours(f(t[4]||0)-r,f(t[5]||0)-i,f(t[6]||0),f(t[7]||0))}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i){var s="",o=[],u,a,i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i;g(n)&&(n=cr.test(n)?f(n):t(n)),y(n)&&(n=new Date(n));if(!b(n))return n;for(;i;)(a=lr.exec(i))?(o=o.concat(An.call(a,1)),i=o.pop()):(o.push(i),i=null);return r(o,function(t){u=fr[t],s+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function mn(){return function(e){return D(e,!0)}}function gn(){return function(e,t){if(e instanceof Array){var t=f(t),n=[],r,i;if(!!e&&e instanceof Array){t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}return n}return e}}function yn(e){return function(t,n,r){function i(e,t){return H(t)?function(t,n){return e(n,t)}:e}if(!w(t))return t;if(!n)return t;for(var n=w(n)?n:[n],n=N(n,function(t){var n=!1,r=t||h;if(g(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?(s=="string"&&(n=n.toLowerCase()),s=="string"&&(i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)}),s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0},r))}}function bn(e){return E(e)&&(e={link:e}),e.restrict=e.restrict||"AC",p(e)}function wn(e,t){function n(t,n){n=n?"-"+z(n,"-"):"",e.removeClass((t?Nr:Tr)+n).addClass((t?Tr:Nr)+n)}var i=this,s=e.parent().controller("form")||mr,o=0,u=i.$error={};i.$name=t.name,i.$dirty=!1,i.$pristine=!0,i.$valid=!0,i.$invalid=!1,s.$addControl(i),e.addClass(Cr),n(!0),i.$addControl=function(e){e.$name&&!i.hasOwnProperty(e.$name)&&(i[e.$name]=e)},i.$removeControl=function(e){e.$name&&i[e.$name]===e&&delete i[e.$name],r(u,function(t,n){i.$setValidity(n,!0,e)})},i.$setValidity=function(e,t,r){var a=u[e];if(t)a&&(k(a,r),!a.length)&&(o--,o||(n(t),i.$valid=!0,i.$invalid=!1),u[e]=!1,n(!0,e),s.$setValidity(e,!0,i));else{o||n(t);if(a){if(C(a,r)!=-1)return}else u[e]=a=[],o++,n(!1,e),s.$setValidity(e,!1,i);a.push(r),i.$valid=!1,i.$invalid=!0}},i.$setDirty=function(){e.removeClass(Cr).addClass(kr),i.$dirty=!0,i.$pristine=!1,s.$setDirty()}}function En(e){return d(e)||e===""||e===null||e!==e}function Sn(e,t,r,i,s,o){var u=function(){var n=x(t.val());i.$viewValue!==n&&e.$apply(function(){i.$setViewValue(n)})};if(s.hasEvent("input"))t.bind("input",u);else{var a;t.bind("keydown",function(e){e=e.keyCode,e===91||15<e&&e<19||37<=e&&e<=40||a||(a=o.defer(function(){u(),a=null}))}),t.bind("change",u)}i.$render=function(){t.val(En(i.$viewValue)?"":i.$viewValue)};var l=r.ngPattern,c=function(e,t){return En(t)||e.test(t)?(i.$setValidity("pattern",!0),t):(i.$setValidity("pattern",!1),n)};l&&(l.match(/^\/(.*)\/$/)?(l=RegExp(l.substr(1,l.length-2)),s=function(e){return c(l,e)}):s=function(t){var n=e.$eval(l);if(!n||!n.test)throw Error("Expected "+l+" to be a RegExp but was "+n);return c(n,t)},i.$formatters.push(s),i.$parsers.push(s));if(r.ngMinlength){var h=f(r.ngMinlength),s=function(e){return!En(e)&&e.length<h?(i.$setValidity("minlength",!1),n):(i.$setValidity("minlength",!0),e)};i.$parsers.push(s),i.$formatters.push(s)}if(r.ngMaxlength){var p=f(r.ngMaxlength),r=function(e){return!En(e)&&e.length>p?(i.$setValidity("maxlength",!1),n):(i.$setValidity("maxlength",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}}function xn(e,t){return e="ngClass"+e,bn(function(r,i,s){function o(e){if(t===!0||r.$index%2===t)f&&e!==f&&u(f),a(e);f=e}function u(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),i.removeClass(w(e)?e.join(" "):e)}function a(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),e&&i.addClass(w(e)?e.join(" "):e)}var f=n;r.$watch(s[e],o,!0),s.$observe("class",function(){var t=r.$eval(s[e]);o(t,t)}),e!=="ngClass"&&r.$watch("$index",function(n,i){var o=n%2;o!==i%2&&(o==t?a(r.$eval(s[e])):u(r.$eval(s[e])))})})}var Tn=function(e){return g(e)?e.toLowerCase():e},Nn=function(e){return g(e)?e.toUpperCase():e},Cn=f((/msie (\d+)/.exec(Tn(navigator.userAgent))||[])[1]),kn,Ln,An=[].slice,On=[].push,Mn=Object.prototype.toString,_n=e.angular||(e.angular={}),Dn,Pn,Hn=["0","0","0"];c.$inject=[],h.$inject=[],Pn=Cn<9?function(e){return e=e.nodeName?e:e[0],e.scopeName&&e.scopeName!="HTML"?Nn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Bn=/[A-Z]/g,jn={full:"1.0.6",major:1,minor:0,dot:6,codeName:"universal-irreversibility"},Fn=K.cache={},In=K.expando="ng-"+(new Date).getTime(),qn=1,Rn=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Un=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},zn=/([\:\-\_]+(.))/g,Wn=/^moz([A-Z])/,Xn=K.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;this.bind("DOMContentLoaded",n),K(e).bind("load",n)},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?kn(this[e]):kn(this[this.length+e])},length:0,push:On,sort:[].sort,splice:[].splice},Vn={};r("multiple,selected,checked,disabled,readOnly,required".split(","),function(e){Vn[Tn(e)]=e});var $n={};r("input,select,option,textarea,button,form".split(","),function(e){$n[Nn(e)]=!0}),r({data:tt,inheritedData:ut,scope:function(e){return ut(e,"$scope")},controller:ot,injector:function(e){return ut(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:nt,css:function(e,t,r){t=$(t);if(!v(r)){var i;return Cn<=8&&(i=e.currentStyle&&e.currentStyle[t],i===""&&(i="auto")),i=i||e.style[t],Cn<=8&&(i=i===""?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Tn(t);if(Vn[i]){if(!v(r))return e[t]||(e.attributes.getNamedItem(t)||c).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(v(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),e===null?n:e},prop:function(e,t,n){if(!v(n))return e[t];e[t]=n},text:a(Cn<9?function(e,t){if(e.nodeType==1){if(d(t))return e.innerText;e.innerText=t}else{if(d(t))return e.nodeValue;e.nodeValue=t}}:function(e,t){if(d(t))return e.textContent;e.textContent=t},{$dv:""}),val:function(e,t){if(d(t))return e.value;e.value=t},html:function(e,t){if(d(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)G(r[n]);e.innerHTML=t}},function(e,t){K.prototype[t]=function(t,r){var i,s;if((e.length==2&&e!==nt&&e!==ot?t:r)!==n){for(i=0;i<this.length;i++)e(this[i],t,r);return this}if(m(t)){for(i=0;i<this.length;i++)if(e===tt)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}return this.length?e(this[0],t,r):e.$dv}}),r({removeData:Z,dealoc:G,bind:function li(e,t,n){var i=et(e,"events"),s=et(e,"handle");i||et(e,"events",i={}),s||et(e,"handle",s=ft(e,i)),r(t.split(" "),function(t){var r=i[t];if(!r){if(t=="mouseenter"||t=="mouseleave"){var o=0;i.mouseenter=[],i.mouseleave=[],li(e,"mouseover",function(e){o++,o==1&&s(e,"mouseenter")}),li(e,"mouseout",function(e){o--,o==0&&s(e,"mouseleave")})}else Rn(e,t,s),i[t]=[];r=i[t]}r.push(n)})},unbind:Y,replaceWith:function(e,t){var n,i=e.parentNode;G(e),r(new K(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===1&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){r(new K(t),function(t){e.nodeType===1&&e.appendChild(t)})},prepend:function(e,t){if(e.nodeType===1){var n=e.firstChild;r(new K(t),function(t){n?e.insertBefore(t,n):(e.appendChild(t),n=t)})}},wrap:function(e,t){var t=kn(t)[0],n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){G(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,i=e.parentNode;r(new K(t),function(e){i.insertBefore(e,n.nextSibling),n=e})},addClass:it,removeClass:rt,toggleClass:function(e,t,n){d(n)&&(n=!nt(e,t)),(n?it:rt)(e,t)},parent:function(e){return(e=e.parentNode)&&e.nodeType!==11?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;e!=null&&e.nodeType!==1;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:Q,triggerHandler:function(e,t){var n=(et(e,"events")||{})[t];r(n,function(t){t.call(e,null)})}},function(e,t){K.prototype[t]=function(t,r){for(var i,s=0;s<this.length;s++)i==n?(i=e(this[s],t,r),i!==n&&(i=kn(i))):st(i,e(this[s],t,r));return i==n?this:i}}),ct.prototype={put:function(e,t){this[lt(e)]=t},get:function(e){return this[lt(e)]},remove:function(e){var t=this[e=lt(e)];return delete this[e],t}},ht.prototype={push:function(e,t){var n=this[e=lt(e)];n?n.push(t):this[e]=[t]},shift:function(e){var t=this[e=lt(e)];if(t)return t.length==1?(delete this[e],t[0]):t.shift()},peek:function(e){if(e=this[lt(e)])return e[0]}};var Jn=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Kn=/,/,Qn=/^\s*(_?)(\S+?)\1\s*$/,Gn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Yn="Non-assignable model expression: ";wt.$inject=["$provide"];var Zn=/^(x[\:\-_]|data[\:\-_])/i,er=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,tr=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,nr=tr,rr={http:80,https:443,ftp:21};Mt.prototype={$$replace:!1,absUrl:Pt("$$absUrl"),url:function(e,t){if(d(e))return this.$$url;var n=tr.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Pt("$$protocol"),host:Pt("$$host"),port:Pt("$$port"),path:Ht("$$path",function(e){return e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){return d(e)?this.$$search:(v(t)?t===null?delete this.$$search[e]:this.$$search[e]=t:this.$$search=g(e)?j(e):e,this.$$compose(),this)},hash:Ht("$$hash",h),replace:function(){return this.$$replace=!0,this}},_t.prototype=l(Mt.prototype),Dt.prototype=l(_t.prototype);var ir={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":c,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(v(n)?n:0)-(v(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":c,"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},sr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},or={},ur=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw Error("This browser does not support XMLHttpRequest.")};un.$inject=["$provide"],fn.$inject=["$locale"],ln.$inject=["$locale"];var ar=".",fr={yyyy:pn("FullYear",4),yy:pn("FullYear",2,0,!0),y:pn("FullYear",1),MMMM:dn("Month"),MMM:dn("Month",!0),MM:pn("Month",2,1),M:pn("Month",1,1),dd:pn("Date",2),d:pn("Date",1),HH:pn("Hours",2),H:pn("Hours",1),hh:pn("Hours",2,-12),h:pn("Hours",1,-12),mm:pn("Minutes",2),m:pn("Minutes",1),ss:pn("Seconds",2),s:pn("Seconds",1),EEEE:dn("Day"),EEE:dn("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){var e=-1*e.getTimezoneOffset(),t=e>=0?"+":"";return t+=hn(Math[e>0?"floor":"ceil"](e/60),2)+hn(Math.abs(e%60),2),t}},lr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,cr=/^\d+$/;vn.$inject=["$locale"];var hr=p(Tn),pr=p(Nn);yn.$inject=["$parse"];var dr=p({restrict:"E",compile:function(e,n){return Cn<=8&&(!n.href&&!n.name&&n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.bind("click",function(e){t.attr("href")||e.preventDefault()})}}}),vr={};r(Vn,function(e,t){var n=Et("ng-"+t);vr[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),r(["src","href"],function(e){var t=Et("ng-"+e);vr[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),Cn&&r.prop(e,i[e]))})}}}});var mr={$addControl:c,$removeControl:c,$setValidity:c,$setDirty:c};wn.$inject=["$element","$attrs","$scope"];var On=function(e){return["$timeout",function(t){var r={name:"form",restrict:"E",controller:wn,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Rn(r[0],"submit",o),r.bind("$destroy",function(){t(function(){Un(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),f=i.name||i.ngForm;f&&(e[f]=s),u&&r.bind("$destroy",function(){u.$removeControl(s),f&&(e[f]=n),a(s,mr)})}}}};return e?a(L(r),{restrict:"EAC"}):r}]},gr=On(),yr=On(!0),br=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,wr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,Er=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sr={text:Sn,number:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=En(e);return t||Er.test(e)?(i.$setValidity("number",!0),e===""?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return En(e)?"":""+e});if(r.min){var u=parseFloat(r.min),e=function(e){return!En(e)&&e<u?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)};i.$parsers.push(e),i.$formatters.push(e)}if(r.max){var a=parseFloat(r.max),r=function(e){return!En(e)&&e>a?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}i.$formatters.push(function(e){return En(e)||y(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||br.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||wr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){d(n.name)&&t.attr("name",u()),t.bind("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;g(i)||(i=!0),g(s)||(s=!1),t.bind("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:c,button:c,submit:c,reset:c},xr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Sr[Tn(i.type)]||Sr.text)(n,r,i,s,t,e)}}}],Tr="ng-valid",Nr="ng-invalid",Cr="ng-pristine",kr="ng-dirty",Lr=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,s){function o(e,t){t=t?"-"+z(t,"-"):"",i.removeClass((e?Nr:Tr)+t).addClass((e?Tr:Nr)+t)}this.$modelValue=this.$viewValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var u=s(n.ngModel),a=u.assign;if(!a)throw Error(Yn+n.ngModel+" ("+B(i)+")");this.$render=c;var f=i.inheritedData("$formController")||mr,l=0,h=this.$error={};i.addClass(Cr),o(!0),this.$setValidity=function(e,t){if(h[e]!==!t){if(t){if(h[e]&&l--,!l)o(!0),this.$valid=!0,this.$invalid=!1}else o(!1),this.$invalid=!0,this.$valid=!1,l++;h[e]=!t,o(t,e),f.$setValidity(e,t,this)}},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(Cr).addClass(kr),f.$setDirty()),r(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,a(e,n),r(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=u(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],Ar=function(){return{require:["ngModel","^?form"],controller:Lr,link:function(e,t,n,r){var i=r[0],s=r[1]||mr;s.$addControl(i),t.bind("$destroy",function(){s.$removeControl(i)})}}},Or=p({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Mr=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!En(e)&&e!==!1)return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},_r=function(){return{require:"ngModel",link:function(e,t,i,s){var o=(e=/\/(.*)\//.exec(i.ngList))&&RegExp(e[1])||i.ngList||",";s.$parsers.push(function(e){var t=[];return e&&r(e.split(o),function(e){e&&t.push(x(e))}),t}),s.$formatters.push(function(e){return w(e)?e.join(", "):n})}}},Dr=/^(true|false|\d+)$/,Pr=function(){return{priority:100,compile:function(e,t){return Dr.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,!1)})}}}},Hr=bn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),Br=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],jr=[function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.ngBindHtmlUnsafe),e.$watch(n.ngBindHtmlUnsafe,function(e){t.html(e||"")})}}],Fr=xn("",!0),Ir=xn("Odd",0),qr=xn("Even",1),Rr=bn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ur=[function(){return{scope:!0,controller:"@"}}],zr=["$sniffer",function(e){return{priority:1e3,compile:function(){e.csp=!0}}}],Wr={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(e){var t=Et("ng-"+e);Wr[t]=["$parse",function(n){return function(r,i,s){var o=n(s[t]);i.bind(Tn(e),function(e){r.$apply(function(){o(r,{$event:e})})})}}]});var Xr=bn(function(e,t,n){t.bind("submit",function(){e.$apply(n.ngSubmit)})}),Vr=["$http","$templateCache","$anchorScroll","$compile",function(e,t,n,r){return{restrict:"ECA",terminal:!0,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s){var f=0,l,c=function(){l&&(l.$destroy(),l=null),s.html("")};i.$watch(o,function(o){var h=++f;o?e.get(o,{cache:t}).success(function(e){h===f&&(l&&l.$destroy(),l=i.$new(),s.html(e),r(s.contents())(l),v(a)&&(!a||i.$eval(a))&&n(),l.$emit("$includeContentLoaded"),i.$eval(u))}).error(function(){h===f&&c()}):c()})}}}}],$r=bn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Jr=bn({terminal:!0,priority:1e3}),Kr=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,s,o){var u=o.count,a=s.attr(o.$attr.when),f=o.offset||0,l=i.$eval(a),c={},h=t.startSymbol(),p=t.endSymbol();r(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),i.$watch(function(){var t=parseFloat(i.$eval(u));return isNaN(t)?"":(l[t]||(t=e.pluralCat(t-f)),c[t](i,s,!0))},function(e){s.text(e)})}}}],Qr=bn({transclude:"element",priority:1e3,terminal:!0,compile:function(e,t,n){return function(e,t,r){var i=r.ngRepeat,r=i.match(/^\s*(.+)\s+in\s+(.*)\s*$/),s,o,u;if(!r)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+i+"'.");i=r[1],s=r[2],r=i.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!r)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+i+"'.");o=r[3]||r[1],u=r[2];var a=new ht;e.$watch(function(e){var r,i,f=e.$eval(s),l=t,c=new ht,h,p,d,v,m,g;if(w(f))m=f||[];else{m=[];for(d in f)f.hasOwnProperty(d)&&d.charAt(0)!="$"&&m.push(d);m.sort()}h=m.length-1,r=0;for(i=m.length;r<i;r++)d=f===m?r:m[r],v=f[d],(g=a.shift(v))?(p=g.scope,c.push(v,g),r!==g.index&&(g.index=r,l.after(g.element)),l=g.element):p=e.$new(),p[o]=v,u&&(p[u]=d),p.$index=r,p.$first=r===0,p.$last=r===h,p.$middle=!p.$first&&!p.$last,g||n(p,function(e){l.after(e),g={scope:p,element:l=e,index:r},c.push(v,g)});for(d in a)if(a.hasOwnProperty(d))for(m=a[d];m.length;)v=m.pop(),v.element.remove(),v.scope.$destroy();a=c})}}}),Gr=bn(function(e,t,n){e.$watch(n.ngShow,function(e){t.css("display",H(e)?"":"none")})}),Yr=bn(function(e,t,n){e.$watch(n.ngHide,function(e){t.css("display",H(e)?"none":"")})}),Zr=bn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ei=p({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,r){var i,s,o;e.$watch(n.ngSwitch||n.on,function(u){s&&(o.$destroy(),s.remove(),s=o=null);if(i=r.cases["!"+u]||r.cases["?"])e.$eval(n.change),o=e.$new(),i(o,function(e){s=e,t.append(e)})})}}),ti=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,r,i,s){s.cases["!"+t.ngSwitchWhen]=n}}}),ni=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,t,r,i){i.cases["?"]=n}}}),ri=bn({controller:["$transclude","$element",function(e,t){e(function(e){t.append(e)})}]}),ii=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(e,t,n,r,i,s){return{restrict:"ECA",terminal:!0,link:function(e,t,o){function u(){var o=n.current&&n.current.locals,u=o&&o.$template;if(u){t.html(u),a&&(a.$destroy(),a=null);var u=i(t.contents()),l=n.current;a=l.scope=e.$new(),l.controller&&(o.$scope=a,o=s(l.controller,o),t.children().data("$ngControllerController",o)),u(a),a.$emit("$viewContentLoaded"),a.$eval(f),r()}else t.html(""),a&&(a.$destroy(),a=null)}var a,f=o.onload||"";e.$on("$routeChangeSuccess",u),u()}}}],si=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){n.type=="text/ng-template"&&e.put(n.id,t[0].text)}}}],oi=p({terminal:!0}),ui=["$compile","$parse",function(e,s){var o=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,u={$setViewValue:c};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+lt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=c})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(T.parent()&&T.remove(),t.val(e),e===""&&E.prop("selected",!0)):d(e)&&E?t.val(""):r.renderUnknownOption(e)},t.bind("change",function(){e.$apply(function(){T.parent()&&T.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var i;n.$render=function(){var e=new ct(n.$viewValue);r(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=L(n.$viewValue),n.$render())}),t.bind("change",function(){e.$apply(function(){var e=[];r(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,r,u){function a(){var e={"":[]},s=[""],o,a,f,g,b;f=u.$modelValue,g=v(t)||[];var E=h?i(g):g,T,N,C;N={},b=!1;var k,L;if(y)b=new ct(f);else if(f===null||w)e[""].push({selected:f===null,id:"",label:""}),b=!0;for(C=0;T=E.length,C<T;C++)N[c]=g[h?N[h]=E[C]:C],o=p(t,N)||"",(a=e[o])||(a=e[o]=[],s.push(o)),y?o=b.remove(d(t,N))!=n:(o=f===d(t,N),b=b||o),k=l(t,N),k=k===n?"":k,a.push({id:h?E[C]:C,label:k,selected:o});!y&&!b&&e[""].unshift({id:"?",label:"",selected:!0}),N=0;for(E=s.length;N<E;N++){o=s[N],a=e[o],m.length<=N?(f={element:x.clone().attr("label",o),label:a.label},g=[f],m.push(g),r.append(f.element)):(g=m[N],f=g[0],f.label!=o)&&f.element.attr("label",f.label=o),k=null,C=0;for(T=a.length;C<T;C++)(o=a[C],b=g[C+1])?(k=b.element,b.label!==o.label&&k.text(b.label=o.label),b.id!==o.id&&k.val(b.id=o.id),b.element.selected!==o.selected&&k.prop("selected",b.selected=o.selected)):(o.id===""&&w?L=w:(L=S.clone()).val(o.id).attr("selected",o.selected).text(o.label),g.push({element:L,label:o.label,id:o.id,selected:o.selected}),k?k.after(L):f.element.append(L),k=L);for(C++;g.length>C;)g.pop().element.remove()}for(;m.length>N;)m.pop()[0].element.remove()}var f;if(!(f=b.match(o)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+b+"'.");var l=s(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=s(f[3]||""),d=s(f[2]?f[1]:c),v=s(f[7]),m=[[{element:r,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),r.html(""),r.bind("change",function(){t.$apply(function(){var e,i=v(t)||[],s={},o,a,f,l,p,g;if(y){a=[],l=0;for(g=m.length;l<g;l++){e=m[l],f=1;for(p=e.length;f<p;f++)(o=e[f].element)[0].selected&&(o=o.val(),h&&(s[h]=o),s[c]=i[o],a.push(d(t,s)))}}else o=r.val(),o=="?"?a=n:o==""?a=null:(s[c]=i[o],h&&(s[h]=o),a=d(t,s));u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){for(var m=l[0],g=l[1],y=f.multiple,b=f.ngOptions,w=!1,E,S=kn(t.createElement("option")),x=kn(t.createElement("optgroup")),T=S.clone(),l=0,N=a.children(),C=N.length;l<C;l++)if(N[l].value==""){E=w=N.eq(l);break}m.init(g,w,T);if(y&&(f.required||f.ngRequired)){var k=function(e){return g.$setValidity("required",!f.required||e&&e.length),e};g.$parsers.push(k),g.$formatters.unshift(k),f.$observe("required",function(){k(g.$viewValue)})}b?p(u,a,g):y?h(u,a,g):c(u,a,g,m)}}}}],ai=["$interpolate",function(e){var t={addOption:c,removeOption:c};return{restrict:"E",priority:100,compile:function(n,r){if(d(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.bind("$destroy",function(){o.removeOption(r.value)})}}}}],fi=p({restrict:"E",terminal:!0});(Ln=e.jQuery)?(kn=Ln,a(Ln.fn,{scope:Xn.scope,controller:Xn.controller,injector:Xn.injector,inheritedData:Xn.inheritedData}),J("remove",!0),J("empty"),J("html")):kn=K,_n.element=kn,function(t){a(t,{bootstrap:U,copy:L,extend:a,equals:O,element:kn,forEach:r,injector:dt,noop:c,bind:M,toJson:D,fromJson:P,identity:h,isUndefined:d,isDefined:v,isString:g,isFunction:E,isObject:m,isNumber:y,isElement:T,isArray:w,version:jn,isDate:b,lowercase:Tn,uppercase:Nn,callbacks:{counter:0}}),Dn=V(e);try{Dn("ngLocale")}catch(n){Dn("ngLocale",[]).provider("$locale",sn)}Dn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",wt).directive({a:dr,input:xr,textarea:xr,form:gr,script:si,select:ui,style:fi,option:ai,ngBind:Hr,ngBindHtmlUnsafe:jr,ngBindTemplate:Br,ngClass:Fr,ngClassEven:qr,ngClassOdd:Ir,ngCsp:zr,ngCloak:Rr,ngController:Ur,ngForm:yr,ngHide:Yr,ngInclude:Vr,ngInit:$r,ngNonBindable:Jr,ngPluralize:Kr,ngRepeat:Qr,ngShow:Gr,ngSubmit:Xr,ngStyle:Zr,ngSwitch:ei,ngSwitchWhen:ti,ngSwitchDefault:ni,ngOptions:oi,ngView:ii,ngTransclude:ri,ngModel:Ar,ngList:_r,ngChange:Or,required:Mr,ngRequired:Mr,ngValue:Pr}).directive(vr).directive(Wr),e.provider({$anchorScroll:vt,$browser:gt,$cacheFactory:yt,$controller:St,$document:xt,$exceptionHandler:Tt,$filter:un,$interpolate:Nt,$http:tn,$httpBackend:nn,$location:Bt,$log:jt,$parse:Wt,$route:$t,$routeParams:Jt,$rootScope:Kt,$q:Xt,$sniffer:Qt,$templateCache:bt,$timeout:on,$window:Gt})}])}(_n),kn(t).ready(function(){R(t,U)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>'),n("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!csmain",["require","cs!jquery","angular"],function(e,t,n){var r,i,s;r=function(e){var t,n;return n=!1,t=null,function(){return n?t:(n=!0,t=e.apply(this,arguments),e=null,t)}},i=r(function(){e(["cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e){n.bootstrap(t(".wrap"),[e.name])})}),document.readyState==="complete"||document.readyState==="loaded"?i():t(window).load(function(){return i()}),s=3e3,window.setTimeout(function(){return i()},s)})}.call(this),t({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),n("main",function(){}),function(e,t,n){t.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(e,r){function i(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function s(e,t){this.template=e+="#",this.defaults=t||{};var n=this.urlParams={};f(e.split(/\W/),function(t){t&&RegExp("(^|[^\\\\]):"+t+"\\W").test(e)&&(n[t]=!0)}),this.template=e.replace(/\\:/g,":")}function o(i,m,g){function b(e,t){var n={},t=l({},m,t);return f(t,function(t,i){var s;t.charAt&&t.charAt(0)=="@"?(s=t.substr(1),s=r(s)(e)):s=t,n[i]=s}),n}function E(e){c(e||{},this)}var S=new s(i),g=l({},u,g);return f(g,function(r,i){r.method=t.uppercase(r.method);var s=r.method=="POST"||r.method=="PUT"||r.method=="PATCH";E[i]=function(t,n,i,o){var u={},d,m=a,g=null;switch(arguments.length){case 4:g=o,m=i;case 3:case 2:if(!h(n)){u=t,d=n,m=i;break}if(h(t)){m=t,g=n;break}m=n,g=i;case 1:h(t)?m=t:s?d=t:u=t;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments."}var y=this instanceof E?this:r.isArray?[]:new E(d);return e({method:r.method,url:S.url(l({},b(d,r.params||{}),u)),data:d}).then(function(e){var t=e.data;t&&(r.isArray?(y.length=0,f(t,function(e){y.push(new E(e))})):c(t,y)),(m||a)(y,e.headers)},g),y},E.prototype["$"+i]=function(e,t,r){var o=b(this),u=a,f;switch(arguments.length){case 3:o=e,u=t,f=r;break;case 2:case 1:h(e)?(u=e,f=t):(o=e,u=t||a);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments."}E[i].call(this,o,s?this:n,u,f)}}),E.bind=function(e){return o(i,l({},m,e),g)},E}var u={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},a=t.noop,f=t.forEach,l=t.extend,c=t.copy,h=t.isFunction;return s.prototype={url:function(e){var n=this,r=this.template,s,o,e=e||{};f(this.urlParams,function(u,a){s=e.hasOwnProperty(a)?e[a]:n.defaults[a],t.isDefined(s)&&s!==null?(o=i(s,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),r=r.replace(RegExp(":"+a+"(\\W)","g"),o+"$1")):r=r.replace(RegExp("(/?):"+a+"(\\W)","g"),function(e,t,n){return n.charAt(0)=="/"?n:t+n})});var r=r.replace(/\/?#$/,""),u=[];return f(e,function(e,t){n.urlParams[t]||u.push(i(t)+"="+i(e))}),u.sort(),r=r.replace(/\/*$/,""),r+(u.length?"?"+u.join("&"):"")}},o}])}(window,window.angular),n("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){n("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){n("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={crop:!0,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.updateOptions=function(e){var t;e["pte-action"]="change-options",o.log("Updating Options",e),t=n.thumbnailResource.get(e,function(){return o.log("Updated options")})},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate?n.view(i):f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){return l(),t.forEach(n.thumbnails,function(e){return n.trash(e)})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(r.size===t){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){e.name=t,this.thumbnails.push(e),a(e)},n),n.updateSelected()}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1},n.anySelected=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.selected)return!0}return!1},n.$watch("currentThumbnailBarPosition",function(e,t){if(e===t)return;n.updateOptions({pte_thumbnail_bar:n.currentThumbnailBarPosition})}),n.toggleCurrentThumbnailBarPosition=function(){var e;e=["vertical","horizontal"],n.currentThumbnailBarPosition===e[0]?n.currentThumbnailBarPosition=e[1]:n.currentThumbnailBarPosition=e[0]}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),n("jcrop",function(){}),function(){n("cs!jcrop-api",["cs!jquery","cs!settings","jcrop"],function(e,t){var n,r,i;return i=function(e,t){var n,r,i,s,o,u,a;return a=[],r=a[0],n=a[1],u=a[2],o=a[3],s=0,i=function(){return s=new Date,u=null,o=e.apply(r,n),null},function(){var a,f;return a=new Date,f=t-(a-s),r=this,n=arguments,f<=0?(clearTimeout(u),u=null,s=a,o=e.apply(r,n)):u||(u=setTimeout(i,f)),o}},r=null,n={onChange:i(function(){var e,t,n,i,s,o,u,a,f,l;t=function(t){t!==e&&r.setOptions({bgColor:t})},u=function(){var e;return e=function(e,t){return e==null?!0:e===0?!1:e<t},a&&e(s,f)&&e(i,o)?!1:!a&&e(s,f)||e(i,o)?!1:!0},n=this.getOptions().cropConstraints;if(!n){t("black");return}s=n[0],i=n[1],a=n[2],e=this.getOptions().bgColor,l=this.tellSelect(),f=l.w,o=l.h,u()?t("red"):t("green")},50),onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(isNaN(n))return;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){n("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){if(t===n)return;e.updateOptions({pte_crop_save:e.pteCropSave?"true":"false"})}),e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null,!1],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.updateSelected())},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;t=null,i=[null,null,!1];try{l=!1,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],n=c.crop,p=c.width,a=c.height,n=+n,p=+p,a=+a,h=p/a;if(c.selected){o=i[0],s=i[1],f=i[2];if(!o||0<p&&o<p)o=p;if(!s||0<a&&s<a)s=a;f=f||n,i=[o,s,f],l=!0}if(c.selected&&n>0){if(t!==null&&t!==h)throw"PTE_EXCEPTION";t=h}}t===null&&l===!1&&(t=r.width/r.height)}catch(g){u=g,e.setInfoMessage(e.i18n.crop_problems),t=null}e.aspectRatio=t,e.cropConstraints=i},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d;if(e.cropInProgress)return;e.cropInProgress=!0,a=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(a.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}d=t.tellSelect(),l=d.x,h=d.y,f=d.w,u=d.h,c=d.x2,p=d.y2;if(l===0&&h===0&&f===0&&u===0&&c===0&&p===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}s={"pte-action":"resize-images",id:r.id,"pte-sizes":a,w:f,h:u,x:l,y:h},e.pteCropSave&&(s.save="true"),o=e.thumbnailResource.get(s,function(){e.cropInProgress=!1;if(o!=null?o.immediate:void 0)return e.confirmResults(o);e.setNonces({"pte-nonce":o["pte-nonce"],"pte-delete-nonce":o["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;o.thumbnails[t.name]&&(n={url:o.thumbnails[t.name].url,file:o.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){n("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),t(["main"])})();
|
js-build/main.js.gz
CHANGED
Binary file
|
js/csmain.coffee
CHANGED
@@ -3,7 +3,19 @@ define [
|
|
3 |
'cs!jquery'
|
4 |
'angular'
|
5 |
], (require, $, angular) ->
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
require [
|
8 |
'cs!apps/pteApp'
|
9 |
'cs!controllers/PteCtrl'
|
@@ -14,4 +26,22 @@ define [
|
|
14 |
angular.bootstrap $(".wrap"), [pteApp.name]
|
15 |
return
|
16 |
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
return
|
3 |
'cs!jquery'
|
4 |
'angular'
|
5 |
], (require, $, angular) ->
|
6 |
+
# COFFEESCRIPT VERSION OF UNDERSCORE ONCE:
|
7 |
+
once = (func) ->
|
8 |
+
ran = false
|
9 |
+
memo = null
|
10 |
+
return ->
|
11 |
+
if ran
|
12 |
+
return memo
|
13 |
+
ran = true
|
14 |
+
memo = func.apply this, arguments
|
15 |
+
func = null
|
16 |
+
return memo
|
17 |
+
|
18 |
+
startupFunction = once ->
|
19 |
require [
|
20 |
'cs!apps/pteApp'
|
21 |
'cs!controllers/PteCtrl'
|
26 |
angular.bootstrap $(".wrap"), [pteApp.name]
|
27 |
return
|
28 |
return
|
29 |
+
|
30 |
+
|
31 |
+
# If the page is already loaded then just run the startup
|
32 |
+
# otherwise, set the load callback
|
33 |
+
#
|
34 |
+
#console.log document.readyState
|
35 |
+
if document.readyState is 'complete' or document.readyState is 'loaded'
|
36 |
+
startupFunction()
|
37 |
+
else
|
38 |
+
$(window).load ->
|
39 |
+
startupFunction()
|
40 |
+
|
41 |
+
# Provide failsafe
|
42 |
+
timeout = 3000
|
43 |
+
window.setTimeout ->
|
44 |
+
startupFunction()
|
45 |
+
, timeout
|
46 |
+
|
47 |
return
|
post-thumbnail-editor.php
CHANGED
@@ -4,7 +4,7 @@ Plugin name: Post Thumbnail Editor
|
|
4 |
Plugin URI: http://sewpafly.github.io/post-thumbnail-editor/
|
5 |
Author: sewpafly
|
6 |
Author URI: http://sewpafly.github.io/post-thumbnail-editor/
|
7 |
-
Version: 2.2.
|
8 |
Description: Individually manage your post thumbnails
|
9 |
|
10 |
LICENSE
|
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
34 |
define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
|
35 |
define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
|
36 |
define( 'PTE_DOMAIN', "post-thumbnail-editor");
|
37 |
-
define( 'PTE_VERSION', "2.2.
|
38 |
|
39 |
/*
|
40 |
* Option Functionality
|
4 |
Plugin URI: http://sewpafly.github.io/post-thumbnail-editor/
|
5 |
Author: sewpafly
|
6 |
Author URI: http://sewpafly.github.io/post-thumbnail-editor/
|
7 |
+
Version: 2.2.1
|
8 |
Description: Individually manage your post thumbnails
|
9 |
|
10 |
LICENSE
|
34 |
define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
|
35 |
define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
|
36 |
define( 'PTE_DOMAIN', "post-thumbnail-editor");
|
37 |
+
define( 'PTE_VERSION', "2.2.1");
|
38 |
|
39 |
/*
|
40 |
* Option Functionality
|