Line 7: | Line 7: | ||
var e=na.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:jn("$$protocol"),host:jn("$$host"),port:jn("$$port"),path:Nn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(b(t)||w(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw ia("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=D(t,{}),a(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:g(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Nn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};a([En,On,An],function(t){t.prototype=Object.create(aa),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==An||!this.$$html5)throw ia("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=g(e)?null:e,this}});var oa=r("$parse"),sa=Function.prototype.call,ua=Function.prototype.apply,la=Function.prototype.bind,ca=le();a({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,ca[e]=t}),ca["this"]=function(t){return t},ca["this"].sharedGetter=!0;var fa=f(le(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(v(n)?n:0)-(v(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),da={n:"\n",f:"\f",r:"\r",t:" ",v:"�","'":"'",'"':'"'},ha=function(t){this.options=t};ha.prototype={constructor:ha,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=fa[e],a=fa[n],o=fa[r];if(i||a||o){var s=o?r:a?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"�"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=v(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw oa("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Wr(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var s=da[a];n+=s||a}i=!1}else if("\\"===a)i=!0;else{if(a===t)return this.index++,this.tokens.push({index:e,text:r,constant:!0,value:n}),void 0;n+=a}this.index++}this.throwError("Unterminated quote",e)}};var pa=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};pa.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),pa.prototype={constructor:pa,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in ca?t=ca[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw oa("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===n||o===r||o===i||!e&&!n&&!r&&!i)return a}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=fa[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=fa[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Ln(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,a=t.length;a>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var a=[t].concat(e||[]);return f(function(a,o){var s=t(a,o);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](a,o);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&a.every(Dn),inputs:!i.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(pa.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,a){var o=a||t(r,i);return null==o?n:e(o)},{assign:function(n,r,i){var a=t(n,i);return a||t.assign(n,a={},i),e.assign(a,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,a){var o,s=t(i,a),u=r(i,a);return Pn(u,e),s?o=Vn(s[u],e):n},{assign:function(n,i,a){var o=Pn(r(n,a),e),s=Vn(t(n,a),e);return s||t.assign(n,s={},a),s[o]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,a=r.length?[]:null;return function(o,s){var u=e?e(o,s):v(e)?n:o,l=t(o,s,u)||p;if(a)for(var c=r.length;c--;)a[c]=Vn(r[c](o,s),i);Vn(u,i),qn(l,i);var f=l.apply?l.apply(u,a):l(a[0],a[1],a[2],a[3],a[4]);return a&&(a.length=0),Vn(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,a=t.length;a>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Dn),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},a=0,o=e.length;o>a;a++)i[t[a]]=e[a](n,r);return i},{literal:!0,constant:e.every(Dn),inputs:e})}};var $a=le(),ma=le(),ga=Object.prototype.valueOf,va=r("$sce"),ya={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Wi=r("$compile"),ba=e.createElement("a"),wa=ir(t.location.href);sr.$inject=["$provide"],fr.$inject=["$locale"],dr.$inject=["$locale"];var xa=".",ka={yyyy:$r("FullYear",4),yy:$r("FullYear",2,0,!0),y:$r("FullYear",1),MMMM:mr("Month"),MMM:mr("Month",!0),MM:$r("Month",2,1),M:$r("Month",1,1),dd:$r("Date",2),d:$r("Date",1),HH:$r("Hours",2),H:$r("Hours",1),hh:$r("Hours",2,-12),h:$r("Hours",1,-12),mm:$r("Minutes",2),m:$r("Minutes",1),ss:$r("Seconds",2),s:$r("Seconds",1),sss:$r("Milliseconds",3),EEEE:mr("Day"),EEE:mr("Day",!0),a:wr,Z:gr,ww:br(2),w:br(1)},Sa=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Ca=/^\-?\d+$/;xr.$inject=["$locale"];var Aa=m(Wr),Oa=m(Yr);Cr.$inject=["$parse"];var Ea=m({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ai.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),ja={};a(Ri,function(t,e){if("multiple"!=t){var n=Xe("ng-"+e);ja[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),a(_i,function(t,e){ja[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(zr);if(i)return r.$set("ngPattern",new RegExp(i[1],i[2])),void 0}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),a(["src","srcset","href"],function(t){var e=Xe("ng-"+t);ja[e]=function(){return{priority:99,link:function(n,r,i){var a=t,o=t;"href"===t&&"[object SVGAnimatedString]"===ai.call(r.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",a=null),i.$observe(e,function(e){return e?(i.$set(o,e),Xr&&a&&r.prop(a,i[o]),void 0):("href"===t&&i.$set(o,null),void 0)})}}}});var Na={$addControl:p,$$renameControl:Or,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ta="ng-submitted";Er.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ma=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Er,compile:function(t){return t.addClass(ho).addClass(co),{pre:function(t,r,i,a){if(!("action"in i)){var o=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Ci(r[0],"submit",o),r.on("$destroy",function(){e(function(){Ai(r[0],"submit",o)},0,!1)})}var s=a.$$parentForm,u=a.$name;u&&(Rn(t,null,u,a,u),i.$observe(i.name?"name":"ngForm",function(e){u!==e&&(Rn(t,null,u,n,u),u=e,Rn(t,null,u,a,u),s.$$renameControl(a,u))})),r.on("$destroy",function(){s.$removeControl(a),u&&Rn(t,null,u,n,u),f(a,Na)})}}}};return r}]},Pa=Ma(),Va=Ma(!0),qa=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Da=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ra=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ia=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,_a=/^(\d{4})-(\d{2})-(\d{2})$/,Ua=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,La=/^(\d{4})-W(\d\d)$/,Fa=/^(\d{4})-(\d\d)$/,Ha=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ba={text:Nr,date:Vr("date",_a,Pr(_a,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Vr("datetimelocal",Ua,Pr(Ua,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Vr("time",Ha,Pr(Ha,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Vr("week",La,Mr,"yyyy-Www"),month:Vr("month",Fa,Pr(Fa,["yyyy","MM"]),"yyyy-MM"),number:Dr,url:Rr,email:Ir,radio:_r,checkbox:Lr,hidden:p,button:p,submit:p,reset:p,file:p},za=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,a,o,s){s[0]&&(Ba[Wr(o.type)]||Ba.text)(i,a,o,s[0],e,t,n,r)}}}}],Ga=/^(true|false|\d+)$/,Wa=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ga.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Ja=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Ya=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,a){var o=t(i.attr(a.$attr.ngBindTemplate));e.$$addBindingInfo(i,o.expressions),i=i[0],a.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],Za=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var a=e(i.ngBindHtml),o=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(o,function(){r.html(t.getTrustedHtml(a(e))||"")})}}}}],Ka=m({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),Xa=Fr("",!0),Qa=Fr("Odd",0),to=Fr("Even",1),eo=Ar({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),no=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ro={},io={blur:!0,focus:!0};a("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xe("ng-"+t);ro[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,a){var o=n(a[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){o(e,{$event:n})};io[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var ao=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,a,o){var s,u,l;n.$watch(i.ngIf,function(n){n?u||o(function(n,a){u=a,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=ue(s.clone),t.leave(l).then(function(){l=null}),s=null))})}}}],oo=["$templateRequest","$anchorScroll","$animate","$sce",function(t,e,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:si.noop,compile:function(i,a){var o=a.ngInclude||a.src,s=a.onload||"",u=a.autoscroll;return function(i,a,l,c,f){var d,h,p,$=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(r.parseAsResourceUrl(o),function(r){var o=function(){!v(u)||u&&!i.$eval(u)||e()},l=++$;r?(t(r,!0).then(function(t){if(l===$){var e=i.$new();c.template=t;var u=f(e,function(t){m(),n.enter(t,null,a).then(o)});d=e,p=u,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){l===$&&(m(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(m(),c.template=null)})}}}}],so=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,a){return/SVG/.test(r[0].toString())?(r.empty(),t(ve(a.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r}),void 0):(r.html(a.template),t(r.contents())(n),void 0)}}}],uo=Ar({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),lo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var o=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?fi(o):o,l=function(t){if(!g(t)){var e=[];return t&&a(t.split(u),function(t){t&&e.push(s?fi(t):t)}),e}};i.$parsers.push(l),i.$formatters.push(function(t){return ci(t)?t.join(o):n}),i.$isEmpty=function(t){return!t||!t.length}}}},co="ng-valid",fo="ng-invalid",ho="ng-pristine",po="ng-dirty",$o="ng-untouched",mo="ng-touched",go="ng-pending",vo=new r("ngModel"),yo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,o,s,u,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(t);var d=o(r.ngModel),h=d.assign,$=d,m=h,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var e=o(r.ngModel+"()"),n=o(r.ngModel+"($$$p)");$=function(t){var n=d(t);return k(n)&&(n=e(t)),n},m=function(t){k(d(t))?n(t,{$$$p:b.$modelValue}):h(t,b.$modelValue)}}else if(!d.assign)throw vo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return g(t)||""===t||null===t||t!==t};var x=i.inheritedData("$formController")||Na,S=0;Hr({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:x,$animate:s}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,s.removeClass(i,po),s.addClass(i,ho)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,s.removeClass(i,ho),s.addClass(i,po),x.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,s.setClass(i,$o,mo)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,s.setClass(i,mo,$o)},this.$rollbackViewValue=function(){u.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!w(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,e=b.$$rawModelValue,r=b.$$parserName||"parse",i=b.$error[r]?!1:n,a=b.$valid,o=b.$modelValue,s=b.$options&&b.$options.allowInvalid;b.$$runValidators(i,e,t,function(t){s||a===t||(b.$modelValue=t?e:n,b.$modelValue!==o&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r,i){function o(t){var e=b.$$parserName||"parse";if(t===n)l(e,null);else if(l(e,t),!t)return a(b.$validators,function(t,e){l(e,null)}),a(b.$asyncValidators,function(t,e){l(e,null)}),!1;return!0}function s(){var t=!0;return a(b.$validators,function(n,i){var a=n(e,r);t=t&&a,l(i,a)}),t?!0:(a(b.$asyncValidators,function(t,e){l(e,null)}),!1)}function u(){var t=[],i=!0;a(b.$asyncValidators,function(a,o){var s=a(e,r);if(!T(s))throw vo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(o,n),t.push(s.then(function(){l(o,!0)},function(){i=!1,l(o,!1)}))}),t.length?c.all(t).then(function(){f(i)},p):f(!0)}function l(t,e){d===S&&b.$setValidity(t,e)}function f(t){d===S&&i(t)}S++;var d=S;return o(t)?s()?(u(),void 0):(f(!1),void 0):(f(!1),void 0)},this.$commitViewValue=function(){var t=b.$viewValue;u.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){b.$modelValue!==s&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r,a=g(i)?n:!0;if(a)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),g(i)){a=!1;break}w(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=$(t));var s=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,e()),b.$$runValidators(a,i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),a(b.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){b.$viewValue=t,(!b.$options||b.$options.updateOnDefault)&&b.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=b.$options;i&&v(i.debounce)&&(n=i.debounce,w(n)?r=n:w(n[e])?r=n[e]:w(n["default"])&&(r=n["default"])),u.cancel(y),r?y=u(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var e=$(t);if(e!==b.$modelValue){b.$modelValue=b.$$rawModelValue=e;for(var r=b.$formatters,i=r.length,a=e;i--;)a=r[i](a);b.$viewValue!==a&&(b.$viewValue=b.$$lastCommittedViewValue=a,b.$render(),b.$$runValidators(n,e,a,p))}return e})}],bo=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yo,priority:1,compile:function(e){return e.addClass(ho).addClass($o).addClass(co),{pre:function(t,e,n,r){var i=r[0],a=r[1]||Na;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(t){i.$name!==t&&a.$$renameControl(i,t)}),t.$on("$destroy",function(){a.$removeControl(i)})},post:function(e,n,r,i){var a=i[0];a.$options&&a.$options.updateOn&&n.on(a.$options.updateOn,function(t){a.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){a.$touched||(t.$$phase?e.$evalAsync(a.$setTouched):e.$apply(a.$setTouched))})}}}}}],wo=/(\s+|^)default(\s+|$)/,xo=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=fi(this.$options.updateOn.replace(wo,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ko=Ar({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,o,s){function u(t){o.text(t||"")}var l,c=s.count,f=s.$attr.when&&o.attr(s.$attr.when),d=s.offset||0,h=i.$eval(f)||{},p={},$=e.startSymbol(),m=e.endSymbol(),g=$+c+"-"+d+m,v=si.noop;a(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Wr(n[2]);h[i]=o.attr(s.$attr[e])}}),a(h,function(t,r){p[r]=e(t.replace(n,g))}),i.$watch(c,function(e){var n=parseFloat(e),r=isNaN(n);r||n in h||(n=t.pluralCat(n-d)),n===l||r&&isNaN(l)||(v(),v=i.$watch(p[n],u),l=n)})}}}],Co=["$parse","$animate",function(t,o){var s="$$NG_REMOVED",u=r("ngRepeat"),l=function(t,e,n,r,i,a,o){t[n]=r,i&&(t[i]=a),t.$index=e,t.$first=0===e,t.$last=e===o-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var h=d.ngRepeat,p=e.createComment(" end ngRepeat: "+h+" "),$=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var m=$[1],g=$[2],v=$[3],y=$[4];if($=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!$)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var b=$[3]||$[1],w=$[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var x,k,S,C,A={$id:Ue};return y?x=t(y):(S=function(t,e){return Ue(e)},C=function(t){return t}),function(t,e,r,d,$){x&&(k=function(e,n,r){return w&&(A[w]=e),A[b]=n,A.$index=r,x(t,A)});var m=le();t.$watchCollection(g,function(r){var d,g,y,x,A,O,E,j,N,T,M,P,V=e[0],q=le();if(v&&(t[v]=r),i(r))N=r,j=k||S;else{j=k||C,N=[];for(var D in r)r.hasOwnProperty(D)&&"$"!=D.charAt(0)&&N.push(D);N.sort()}for(x=N.length,M=new Array(x),d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],E=j(A,O,d),m[E])T=m[E],delete m[E],q[E]=T,M[d]=T;else{if(q[E])throw a(M,function(t){t&&t.scope&&(m[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,E,O);M[d]={id:E,scope:n,clone:n},q[E]=!0}for(var R in m){if(T=m[R],P=ue(T.clone),o.leave(P),P[0].parentNode)for(d=0,g=P.length;g>d;d++)P[d][s]=!0;T.scope.$destroy()}for(d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],T=M[d],T.scope){y=V;do y=y.nextSibling;while(y&&y[s]);c(T)!=y&&o.move(ue(T.clone),null,Qr(V)),V=f(T),l(T.scope,d,b,O,w,A,x)}else $(function(t,e){T.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,o.enter(t,null,Qr(V)),V=n,T.clone=t,q[T.id]=T,l(T.scope,d,b,O,w,A,x)});m=q})}}}}],Ao="ng-hide",Oo="ng-hide-animate",Eo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ao,{tempClasses:Oo})})}}}],jo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ao,{tempClasses:Oo})})}}}],No=Ar(function(t,e,n){t.$watchCollection(n.ngStyle,function(t,n){n&&t!==n&&a(n,function(t,n){e.css(n,"")}),t&&e.css(t)})}),To=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,o){var s=i.ngSwitch||i.on,u=[],l=[],c=[],f=[],d=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=ue(l[r].clone);f[r].$destroy();var h=c[r]=t.leave(s);h.then(d(c,r))}l.length=0,f.length=0,(u=o.cases["!"+n]||o.cases["?"])&&a(u,function(n){n.transclude(function(r,i){f.push(i);var a=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var o={clone:r};l.push(o),t.enter(r,a.parent(),a)})})})}}}],Mo=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),Po=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Vo=Ar({restrict:"EAC",link:function(t,e,n,i,a){if(!a)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));a(function(t){e.empty(),e.append(t)})}}),qo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Do=r("ngOptions"),Ro=m({restrict:"A",terminal:!0}),Io=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,a=this,o={},u=s;a.databound=n.ngModel,a.init=function(t,e,n){u=t,r=e,i=n},a.addOption=function(e,n){oe(e,'"option value"'),o[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},a.removeOption=function(t){this.hasOption(t)&&(delete o[t],u.$viewValue===t&&this.renderUnknownOption(t))},a.renderUnknownOption=function(e){var n="? "+Ue(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},a.hasOption=function(t){return o.hasOwnProperty(t)},e.$on("$destroy",function(){a.renderUnknownOption=p})}],link:function(s,u,l,c){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):g(t)&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function d(t,e,n){var r;n.$render=function(){var t=new Le(n.$viewValue);a(e.find("option"),function(e){e.selected=v(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=R(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];a(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function h(e,s,u){function l(t,n,r){return I[O]=r,N&&(I[N]=n),t(e,I)}function c(){e.$apply(function(){var t,n=P(e)||[];if(y)t=[],a(s.val(),function(e){e=q?D[e]:e,t.push(f(e,n[e]))});else{var r=q?D[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),g()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=j?j:M;return l(r,t,e)}function d(){var t,n=P(e);if(n&&ci(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=l(A,r,n[r]);return t}if(n){t={};for(var a in n)n.hasOwnProperty(a)&&(t[a]=l(A,a,n[a]))}return t}function h(t){var e;if(y)if(q&&ci(t)){e=new Le([]);for(var n=0;n<t.length;n++)e.put(l(q,null,t[n]),!0)}else e=new Le(t);else q&&(t=l(q,null,t));return function(n,r){var i;return i=q?q:j?j:M,y?v(e.remove(l(i,n,r))):t===l(i,n,r)}}function p(){x||(e.$$postDigest(g),x=!0)}function m(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function g(){x=!1;var t,n,r,i,c,f,d,p,g,b,C,O,E,j,M,V,_,U={"":[]},L=[""],F=u.$viewValue,H=P(e)||[],B=N?o(H):H,z={},G=h(F),W=!1;for(D={},O=0;b=B.length,b>O;O++)d=O,N&&(d=B[O],"$"===d.charAt(0))||(p=H[d],t=l(T,d,p)||"",(n=U[t])||(n=U[t]=[],L.push(t)),E=G(d,p),W=W||E,V=l(A,d,p),V=v(V)?V:"",_=q?q(e,I):N?B[O]:O,q&&(D[_]=d),n.push({id:_,label:V,selected:E})); | var e=na.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:jn("$$protocol"),host:jn("$$host"),port:jn("$$port"),path:Nn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(b(t)||w(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw ia("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=D(t,{}),a(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:g(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Nn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};a([En,On,An],function(t){t.prototype=Object.create(aa),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==An||!this.$$html5)throw ia("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=g(e)?null:e,this}});var oa=r("$parse"),sa=Function.prototype.call,ua=Function.prototype.apply,la=Function.prototype.bind,ca=le();a({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,ca[e]=t}),ca["this"]=function(t){return t},ca["this"].sharedGetter=!0;var fa=f(le(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(v(n)?n:0)-(v(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),da={n:"\n",f:"\f",r:"\r",t:" ",v:"�","'":"'",'"':'"'},ha=function(t){this.options=t};ha.prototype={constructor:ha,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=fa[e],a=fa[n],o=fa[r];if(i||a||o){var s=o?r:a?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"�"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=v(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw oa("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Wr(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var s=da[a];n+=s||a}i=!1}else if("\\"===a)i=!0;else{if(a===t)return this.index++,this.tokens.push({index:e,text:r,constant:!0,value:n}),void 0;n+=a}this.index++}this.throwError("Unterminated quote",e)}};var pa=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};pa.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),pa.prototype={constructor:pa,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in ca?t=ca[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw oa("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===n||o===r||o===i||!e&&!n&&!r&&!i)return a}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=fa[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=fa[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Ln(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,a=t.length;a>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var a=[t].concat(e||[]);return f(function(a,o){var s=t(a,o);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](a,o);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&a.every(Dn),inputs:!i.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(pa.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,a){var o=a||t(r,i);return null==o?n:e(o)},{assign:function(n,r,i){var a=t(n,i);return a||t.assign(n,a={},i),e.assign(a,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,a){var o,s=t(i,a),u=r(i,a);return Pn(u,e),s?o=Vn(s[u],e):n},{assign:function(n,i,a){var o=Pn(r(n,a),e),s=Vn(t(n,a),e);return s||t.assign(n,s={},a),s[o]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,a=r.length?[]:null;return function(o,s){var u=e?e(o,s):v(e)?n:o,l=t(o,s,u)||p;if(a)for(var c=r.length;c--;)a[c]=Vn(r[c](o,s),i);Vn(u,i),qn(l,i);var f=l.apply?l.apply(u,a):l(a[0],a[1],a[2],a[3],a[4]);return a&&(a.length=0),Vn(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,a=t.length;a>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Dn),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},a=0,o=e.length;o>a;a++)i[t[a]]=e[a](n,r);return i},{literal:!0,constant:e.every(Dn),inputs:e})}};var $a=le(),ma=le(),ga=Object.prototype.valueOf,va=r("$sce"),ya={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Wi=r("$compile"),ba=e.createElement("a"),wa=ir(t.location.href);sr.$inject=["$provide"],fr.$inject=["$locale"],dr.$inject=["$locale"];var xa=".",ka={yyyy:$r("FullYear",4),yy:$r("FullYear",2,0,!0),y:$r("FullYear",1),MMMM:mr("Month"),MMM:mr("Month",!0),MM:$r("Month",2,1),M:$r("Month",1,1),dd:$r("Date",2),d:$r("Date",1),HH:$r("Hours",2),H:$r("Hours",1),hh:$r("Hours",2,-12),h:$r("Hours",1,-12),mm:$r("Minutes",2),m:$r("Minutes",1),ss:$r("Seconds",2),s:$r("Seconds",1),sss:$r("Milliseconds",3),EEEE:mr("Day"),EEE:mr("Day",!0),a:wr,Z:gr,ww:br(2),w:br(1)},Sa=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Ca=/^\-?\d+$/;xr.$inject=["$locale"];var Aa=m(Wr),Oa=m(Yr);Cr.$inject=["$parse"];var Ea=m({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ai.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),ja={};a(Ri,function(t,e){if("multiple"!=t){var n=Xe("ng-"+e);ja[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),a(_i,function(t,e){ja[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(zr);if(i)return r.$set("ngPattern",new RegExp(i[1],i[2])),void 0}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),a(["src","srcset","href"],function(t){var e=Xe("ng-"+t);ja[e]=function(){return{priority:99,link:function(n,r,i){var a=t,o=t;"href"===t&&"[object SVGAnimatedString]"===ai.call(r.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",a=null),i.$observe(e,function(e){return e?(i.$set(o,e),Xr&&a&&r.prop(a,i[o]),void 0):("href"===t&&i.$set(o,null),void 0)})}}}});var Na={$addControl:p,$$renameControl:Or,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ta="ng-submitted";Er.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ma=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Er,compile:function(t){return t.addClass(ho).addClass(co),{pre:function(t,r,i,a){if(!("action"in i)){var o=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Ci(r[0],"submit",o),r.on("$destroy",function(){e(function(){Ai(r[0],"submit",o)},0,!1)})}var s=a.$$parentForm,u=a.$name;u&&(Rn(t,null,u,a,u),i.$observe(i.name?"name":"ngForm",function(e){u!==e&&(Rn(t,null,u,n,u),u=e,Rn(t,null,u,a,u),s.$$renameControl(a,u))})),r.on("$destroy",function(){s.$removeControl(a),u&&Rn(t,null,u,n,u),f(a,Na)})}}}};return r}]},Pa=Ma(),Va=Ma(!0),qa=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Da=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ra=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ia=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,_a=/^(\d{4})-(\d{2})-(\d{2})$/,Ua=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,La=/^(\d{4})-W(\d\d)$/,Fa=/^(\d{4})-(\d\d)$/,Ha=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ba={text:Nr,date:Vr("date",_a,Pr(_a,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Vr("datetimelocal",Ua,Pr(Ua,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Vr("time",Ha,Pr(Ha,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Vr("week",La,Mr,"yyyy-Www"),month:Vr("month",Fa,Pr(Fa,["yyyy","MM"]),"yyyy-MM"),number:Dr,url:Rr,email:Ir,radio:_r,checkbox:Lr,hidden:p,button:p,submit:p,reset:p,file:p},za=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,a,o,s){s[0]&&(Ba[Wr(o.type)]||Ba.text)(i,a,o,s[0],e,t,n,r)}}}}],Ga=/^(true|false|\d+)$/,Wa=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ga.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Ja=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Ya=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,a){var o=t(i.attr(a.$attr.ngBindTemplate));e.$$addBindingInfo(i,o.expressions),i=i[0],a.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],Za=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var a=e(i.ngBindHtml),o=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(o,function(){r.html(t.getTrustedHtml(a(e))||"")})}}}}],Ka=m({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),Xa=Fr("",!0),Qa=Fr("Odd",0),to=Fr("Even",1),eo=Ar({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),no=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ro={},io={blur:!0,focus:!0};a("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xe("ng-"+t);ro[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,a){var o=n(a[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){o(e,{$event:n})};io[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var ao=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,a,o){var s,u,l;n.$watch(i.ngIf,function(n){n?u||o(function(n,a){u=a,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=ue(s.clone),t.leave(l).then(function(){l=null}),s=null))})}}}],oo=["$templateRequest","$anchorScroll","$animate","$sce",function(t,e,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:si.noop,compile:function(i,a){var o=a.ngInclude||a.src,s=a.onload||"",u=a.autoscroll;return function(i,a,l,c,f){var d,h,p,$=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(r.parseAsResourceUrl(o),function(r){var o=function(){!v(u)||u&&!i.$eval(u)||e()},l=++$;r?(t(r,!0).then(function(t){if(l===$){var e=i.$new();c.template=t;var u=f(e,function(t){m(),n.enter(t,null,a).then(o)});d=e,p=u,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){l===$&&(m(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(m(),c.template=null)})}}}}],so=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,a){return/SVG/.test(r[0].toString())?(r.empty(),t(ve(a.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r}),void 0):(r.html(a.template),t(r.contents())(n),void 0)}}}],uo=Ar({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),lo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var o=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?fi(o):o,l=function(t){if(!g(t)){var e=[];return t&&a(t.split(u),function(t){t&&e.push(s?fi(t):t)}),e}};i.$parsers.push(l),i.$formatters.push(function(t){return ci(t)?t.join(o):n}),i.$isEmpty=function(t){return!t||!t.length}}}},co="ng-valid",fo="ng-invalid",ho="ng-pristine",po="ng-dirty",$o="ng-untouched",mo="ng-touched",go="ng-pending",vo=new r("ngModel"),yo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,o,s,u,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(t);var d=o(r.ngModel),h=d.assign,$=d,m=h,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var e=o(r.ngModel+"()"),n=o(r.ngModel+"($$$p)");$=function(t){var n=d(t);return k(n)&&(n=e(t)),n},m=function(t){k(d(t))?n(t,{$$$p:b.$modelValue}):h(t,b.$modelValue)}}else if(!d.assign)throw vo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return g(t)||""===t||null===t||t!==t};var x=i.inheritedData("$formController")||Na,S=0;Hr({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:x,$animate:s}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,s.removeClass(i,po),s.addClass(i,ho)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,s.removeClass(i,ho),s.addClass(i,po),x.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,s.setClass(i,$o,mo)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,s.setClass(i,mo,$o)},this.$rollbackViewValue=function(){u.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!w(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,e=b.$$rawModelValue,r=b.$$parserName||"parse",i=b.$error[r]?!1:n,a=b.$valid,o=b.$modelValue,s=b.$options&&b.$options.allowInvalid;b.$$runValidators(i,e,t,function(t){s||a===t||(b.$modelValue=t?e:n,b.$modelValue!==o&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r,i){function o(t){var e=b.$$parserName||"parse";if(t===n)l(e,null);else if(l(e,t),!t)return a(b.$validators,function(t,e){l(e,null)}),a(b.$asyncValidators,function(t,e){l(e,null)}),!1;return!0}function s(){var t=!0;return a(b.$validators,function(n,i){var a=n(e,r);t=t&&a,l(i,a)}),t?!0:(a(b.$asyncValidators,function(t,e){l(e,null)}),!1)}function u(){var t=[],i=!0;a(b.$asyncValidators,function(a,o){var s=a(e,r);if(!T(s))throw vo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(o,n),t.push(s.then(function(){l(o,!0)},function(){i=!1,l(o,!1)}))}),t.length?c.all(t).then(function(){f(i)},p):f(!0)}function l(t,e){d===S&&b.$setValidity(t,e)}function f(t){d===S&&i(t)}S++;var d=S;return o(t)?s()?(u(),void 0):(f(!1),void 0):(f(!1),void 0)},this.$commitViewValue=function(){var t=b.$viewValue;u.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){b.$modelValue!==s&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r,a=g(i)?n:!0;if(a)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),g(i)){a=!1;break}w(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=$(t));var s=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,e()),b.$$runValidators(a,i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),a(b.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){b.$viewValue=t,(!b.$options||b.$options.updateOnDefault)&&b.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=b.$options;i&&v(i.debounce)&&(n=i.debounce,w(n)?r=n:w(n[e])?r=n[e]:w(n["default"])&&(r=n["default"])),u.cancel(y),r?y=u(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var e=$(t);if(e!==b.$modelValue){b.$modelValue=b.$$rawModelValue=e;for(var r=b.$formatters,i=r.length,a=e;i--;)a=r[i](a);b.$viewValue!==a&&(b.$viewValue=b.$$lastCommittedViewValue=a,b.$render(),b.$$runValidators(n,e,a,p))}return e})}],bo=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yo,priority:1,compile:function(e){return e.addClass(ho).addClass($o).addClass(co),{pre:function(t,e,n,r){var i=r[0],a=r[1]||Na;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(t){i.$name!==t&&a.$$renameControl(i,t)}),t.$on("$destroy",function(){a.$removeControl(i)})},post:function(e,n,r,i){var a=i[0];a.$options&&a.$options.updateOn&&n.on(a.$options.updateOn,function(t){a.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){a.$touched||(t.$$phase?e.$evalAsync(a.$setTouched):e.$apply(a.$setTouched))})}}}}}],wo=/(\s+|^)default(\s+|$)/,xo=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=fi(this.$options.updateOn.replace(wo,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ko=Ar({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,o,s){function u(t){o.text(t||"")}var l,c=s.count,f=s.$attr.when&&o.attr(s.$attr.when),d=s.offset||0,h=i.$eval(f)||{},p={},$=e.startSymbol(),m=e.endSymbol(),g=$+c+"-"+d+m,v=si.noop;a(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Wr(n[2]);h[i]=o.attr(s.$attr[e])}}),a(h,function(t,r){p[r]=e(t.replace(n,g))}),i.$watch(c,function(e){var n=parseFloat(e),r=isNaN(n);r||n in h||(n=t.pluralCat(n-d)),n===l||r&&isNaN(l)||(v(),v=i.$watch(p[n],u),l=n)})}}}],Co=["$parse","$animate",function(t,o){var s="$$NG_REMOVED",u=r("ngRepeat"),l=function(t,e,n,r,i,a,o){t[n]=r,i&&(t[i]=a),t.$index=e,t.$first=0===e,t.$last=e===o-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var h=d.ngRepeat,p=e.createComment(" end ngRepeat: "+h+" "),$=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var m=$[1],g=$[2],v=$[3],y=$[4];if($=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!$)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var b=$[3]||$[1],w=$[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var x,k,S,C,A={$id:Ue};return y?x=t(y):(S=function(t,e){return Ue(e)},C=function(t){return t}),function(t,e,r,d,$){x&&(k=function(e,n,r){return w&&(A[w]=e),A[b]=n,A.$index=r,x(t,A)});var m=le();t.$watchCollection(g,function(r){var d,g,y,x,A,O,E,j,N,T,M,P,V=e[0],q=le();if(v&&(t[v]=r),i(r))N=r,j=k||S;else{j=k||C,N=[];for(var D in r)r.hasOwnProperty(D)&&"$"!=D.charAt(0)&&N.push(D);N.sort()}for(x=N.length,M=new Array(x),d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],E=j(A,O,d),m[E])T=m[E],delete m[E],q[E]=T,M[d]=T;else{if(q[E])throw a(M,function(t){t&&t.scope&&(m[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,E,O);M[d]={id:E,scope:n,clone:n},q[E]=!0}for(var R in m){if(T=m[R],P=ue(T.clone),o.leave(P),P[0].parentNode)for(d=0,g=P.length;g>d;d++)P[d][s]=!0;T.scope.$destroy()}for(d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],T=M[d],T.scope){y=V;do y=y.nextSibling;while(y&&y[s]);c(T)!=y&&o.move(ue(T.clone),null,Qr(V)),V=f(T),l(T.scope,d,b,O,w,A,x)}else $(function(t,e){T.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,o.enter(t,null,Qr(V)),V=n,T.clone=t,q[T.id]=T,l(T.scope,d,b,O,w,A,x)});m=q})}}}}],Ao="ng-hide",Oo="ng-hide-animate",Eo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ao,{tempClasses:Oo})})}}}],jo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ao,{tempClasses:Oo})})}}}],No=Ar(function(t,e,n){t.$watchCollection(n.ngStyle,function(t,n){n&&t!==n&&a(n,function(t,n){e.css(n,"")}),t&&e.css(t)})}),To=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,o){var s=i.ngSwitch||i.on,u=[],l=[],c=[],f=[],d=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=ue(l[r].clone);f[r].$destroy();var h=c[r]=t.leave(s);h.then(d(c,r))}l.length=0,f.length=0,(u=o.cases["!"+n]||o.cases["?"])&&a(u,function(n){n.transclude(function(r,i){f.push(i);var a=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var o={clone:r};l.push(o),t.enter(r,a.parent(),a)})})})}}}],Mo=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),Po=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Vo=Ar({restrict:"EAC",link:function(t,e,n,i,a){if(!a)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));a(function(t){e.empty(),e.append(t)})}}),qo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Do=r("ngOptions"),Ro=m({restrict:"A",terminal:!0}),Io=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,a=this,o={},u=s;a.databound=n.ngModel,a.init=function(t,e,n){u=t,r=e,i=n},a.addOption=function(e,n){oe(e,'"option value"'),o[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},a.removeOption=function(t){this.hasOption(t)&&(delete o[t],u.$viewValue===t&&this.renderUnknownOption(t))},a.renderUnknownOption=function(e){var n="? "+Ue(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},a.hasOption=function(t){return o.hasOwnProperty(t)},e.$on("$destroy",function(){a.renderUnknownOption=p})}],link:function(s,u,l,c){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):g(t)&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function d(t,e,n){var r;n.$render=function(){var t=new Le(n.$viewValue);a(e.find("option"),function(e){e.selected=v(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=R(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];a(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function h(e,s,u){function l(t,n,r){return I[O]=r,N&&(I[N]=n),t(e,I)}function c(){e.$apply(function(){var t,n=P(e)||[];if(y)t=[],a(s.val(),function(e){e=q?D[e]:e,t.push(f(e,n[e]))});else{var r=q?D[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),g()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=j?j:M;return l(r,t,e)}function d(){var t,n=P(e);if(n&&ci(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=l(A,r,n[r]);return t}if(n){t={};for(var a in n)n.hasOwnProperty(a)&&(t[a]=l(A,a,n[a]))}return t}function h(t){var e;if(y)if(q&&ci(t)){e=new Le([]);for(var n=0;n<t.length;n++)e.put(l(q,null,t[n]),!0)}else e=new Le(t);else q&&(t=l(q,null,t));return function(n,r){var i;return i=q?q:j?j:M,y?v(e.remove(l(i,n,r))):t===l(i,n,r)}}function p(){x||(e.$$postDigest(g),x=!0)}function m(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function g(){x=!1;var t,n,r,i,c,f,d,p,g,b,C,O,E,j,M,V,_,U={"":[]},L=[""],F=u.$viewValue,H=P(e)||[],B=N?o(H):H,z={},G=h(F),W=!1;for(D={},O=0;b=B.length,b>O;O++)d=O,N&&(d=B[O],"$"===d.charAt(0))||(p=H[d],t=l(T,d,p)||"",(n=U[t])||(n=U[t]=[],L.push(t)),E=G(d,p),W=W||E,V=l(A,d,p),V=v(V)?V:"",_=q?q(e,I):N?B[O]:O,q&&(D[_]=d),n.push({id:_,label:V,selected:E})); | ||
for(y||(w||null===F?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),C=0,g=L.length;g>C;C++){for(t=L[C],n=U[t],R.length<=C?(i={element:S.clone().attr("label",t),label:n.label},c=[i],R.push(c),s.append(i.element)):(c=R[C],i=c[0],i.label!=t&&i.element.attr("label",i.label=t)),j=null,O=0,b=n.length;b>O;O++)r=n[O],(f=c[O+1])?(j=f.element,f.label!==r.label&&(m(z,f.label,!1),m(z,r.label,!0),j.text(f.label=r.label),j.prop("label",f.label)),f.id!==r.id&&j.val(f.id=r.id),j[0].selected!==r.selected&&(j.prop("selected",f.selected=r.selected),Xr&&j.prop("selected",f.selected))):(""===r.id&&w?M=w:(M=k.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),m(z,r.label,!0),j?j.after(M):i.element.append(M),j=M);for(O++;c.length>O;)r=c.pop(),m(z,r.label,!1),r.element.remove()}for(;R.length>C;){for(n=R.pop(),O=1;O<n.length;++O)m(z,n[O].label,!1);n[0].element.remove()}a(z,function(t,e){t>0?$.addOption(e):0>t&&$.removeOption(e)})}var C;if(!(C=b.match(i)))throw Do("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var A=r(C[2]||C[1]),O=C[4]||C[6],E=/ as /.test(C[0])&&C[1],j=E?r(E):null,N=C[5],T=r(C[3]||""),M=r(C[2]?C[1]:O),P=r(C[7]),V=C[8],q=V?r(C[8]):null,D={},R=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),u.$render=g,e.$watchCollection(P,p),e.$watchCollection(d,p),y&&e.$watchCollection(function(){return u.$modelValue},p)}if(c[1]){for(var p,$=c[0],m=c[1],y=l.multiple,b=l.ngOptions,w=!1,x=!1,k=Qr(e.createElement("option")),S=Qr(e.createElement("optgroup")),C=k.clone(),A=0,O=u.children(),E=O.length;E>A;A++)if(""===O[A].value){p=w=O.eq(A);break}$.init(m,w,C),y&&(m.$isEmpty=function(t){return!t||0===t.length}),b?h(s,u,m):y?d(s,u,m):f(s,u,m,$)}}}}],_o=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var a="$selectController",o=n.parent(),s=o.data(a)||o.parent().data(a);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Uo=m({restrict:"E",terminal:!1}),Lo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Fo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));o=t||n,a.$validate()}),a.$validators.pattern=function(t){return a.$isEmpty(t)||g(o)||o.test(t)}}}}},Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=d(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=d(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?(console.log("WARNING: Tried to load angular more than once."),void 0):(re(),he(si),Qr(e).ready(function(){X(e,Q)}),void 0)}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),angular.module("app",["angularplasmid"]),function(){"use strict";angular.module("angularplasmid.services",[]).factory("SVGUtil",function(){function t(t,e){var n="round";return"undefined"==typeof e||0===+e?Math[n](t):(t=+t,e=+e,isNaN(t)||"number"!=typeof e||e%1!==0?0/0:(t=t.toString().split("e"),t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function e(t){d.push(t)}function n(t){var e;for(e=0;e<d.length;e+=1)if(d[e].id===t)return d[e]}function r(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function i(t,e){var n,r,i=["id","name","class","style","filter","ng-attr-style","ng-attr-class","ng-class"];for(r=0;r<i.length;r+=1)n=i[r],t[0].hasAttribute(n)&&(e.attr(n,t.attr(n)),t.removeAttr(n))}function a(t,e,n){var r,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,t);return n=n||[],angular.forEach(e,function(t){n.indexOf(t)<0&&(r=e[t],null===r||t.match(/\$/)||"string"==typeof r&&""===r||a.setAttribute(t,r))}),a}function o(t){angular.forEach(["id","class","style"],function(e){t.removeAttribute(e)})}function s(t,e,n,i){var a,o,s;return t=Number(t||0),e=Number(e||0),n=Number(n||0),i=Number(i||0),a={start:r(t,e,n,359.99),end:r(t,e,n,0)},o={start:r(t,e,n+i,359.99),end:r(t,e,n+i,0)},s=["M",a.start.x,a.start.y,"A",n,n,0,1,0,a.end.x,a.end.y,"M",o.start.x,o.start.y,"A",n+i,n+i,0,1,0,o.end.x,o.end.y].join(" ")}function u(t,e,n,i,a,o,s,u){var l,c,f,d,h,p,$,m,g,v,y,b,w;return t=Number(t),e=Number(e),n=Number(n),i=Number(i),a=Number(a),o=Number(o),s=s||{width:0,length:0,angle:0},u=u||{width:0,length:0,angle:0},i===a?(c=r(t,e,n,i),d=r(t,e,n+o,i),l=["M",c.x,c.y,"L",d.x,d.y].join(" ")):1===o?(c=r(t,e,n,i),d=r(t,e,n,a),h=a>i?180>=a-i?"0":"1":180>=a-i?"1":"0",l=["M",c.x,c.y,"A",n,n,0,h,1,d.x,d.y].join(" ")):(a-=u.length<0?0:u.length,i+=s.length<0?0:s.length,c=r(t,e,n,a),d=r(t,e,n,i),p=r(t,e,n-s.width,i+s.angle),$=r(t,e,n+o/2,i-s.length),m=r(t,e,n+o+s.width,i+s.angle),g=r(t,e,n+o,i),v=r(t,e,n+o+u.width,a-u.angle),y=r(t,e,n+o/2,a+u.length),b=r(t,e,n-u.width,a-u.angle),w=r(t,e,n,a),f=r(t,e,n+o,a),h=180>=a-i?"0":"1",l=["M",c.x,c.y,"A",n,n,0,h,0,d.x,d.y,"L",p.x,p.y,"L",$.x,$.y,"L",m.x,m.y,"L",g.x,g.y,"A",n+o,n+o,0,h,1,f.x,f.y,"L",v.x,v.y,"L",y.x,y.y,"L",b.x,b.y,"L",w.x,w.y,"z"].join(" ")),l}function l(e,n,r,i,a,o){e=Number(e||0),n=Number(n||0),r=Number(r||0),i=Number(i||0),a=Number(a||0),o=Number(o||2);var s,u,l,c,f=Number(i)>0?Number(a)/Number(i):0,d=2*Math.PI/f,h=-1,p="";for(c=0;f>c;c+=1)s=d*c-Math.PI/2,l=Math.cos(s),u=Math.sin(s),p+="M"+t(e+r*l,h)+","+t(n+r*u,h)+" L"+t(e+(r+o)*l,h)+","+t(n+(r+o)*u,h)+" ";return p=p||"M 0,0"}function c(e,n,r,i,a){e=Number(e),n=Number(n),r=Number(r),i=Number(i),a=Number(a);var o,s,u,l,c=Number(i)>0?Number(a)/Number(i):0,f=2*Math.PI/c,d=-1,h=[];for(l=0;c>l;l+=1)o=f*l-Math.PI/2,u=Math.cos(o),s=Math.sin(o),h.push({x:t(e+r*u,d),y:t(n+r*s,d),text:i*l});return h}function f(t,e){return isNaN(t)?e||0:Number(t)}var d=[],h=[],p=[];return{api:{addPlasmid:e,plasmids:d,plasmid:n,plasmidtracks:h,trackmarkers:p},util:{polarToCartesian:r,swapProperties:i,Numeric:f},svg:{createNode:a,removeAttributes:o,path:{donut:s,arc:u,scale:l},element:{scalelabels:c}}}})}(),function(){"use strict";angular.module("angularplasmid",["angularplasmid.services"]).directive("plasmidapi",["SVGUtil",function(t){return{restrict:"AE",link:function(e,n,r){e[r.name]=t.api}}}]).directive("plasmid",["SVGUtil",function(){return{restrict:"AE",type:"svg",template:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>',replace:!0,transclude:!0,require:"plasmid",scope:{plasmidheight:"@",plasmidwidth:"@",sequencelength:"@",sequence:"@",plasmidclass:"@",plasmidstyle:"@"},link:{pre:function(t,e,n,r){r.init(e)},post:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)}),t.$watchGroup(["plasmidheight","plasmidwidth","sequencelength","sequence","plasmidclass","plasmidstyle"],function(){r.draw()})}},controller:["$scope","SVGUtil",function(t,e){var n,r,i=[];r=this,r.elementtype="plasmid",r.init=function(t){e.api.addPlasmid(r),n=t,r.id=n.attr("id")},r.draw=function(){var t=r.dimensions,e=n.plasmidclass,a=n.plasmidstyle;n.attr("height",t.height),n.attr("width",t.width),e&&n.attr("class",e),a&&n.attr("style",a),angular.forEach(i,function(t){t.draw()})},r.addTrack=function(t){i.push(t)},Object.defineProperty(r,"center",{get:function(){var t=r.dimensions;return{x:t.width/2,y:t.height/2}}}),Object.defineProperty(r,"dimensions",{get:function(){return{height:e.util.Numeric(t.plasmidheight,300),width:e.util.Numeric(t.plasmidwidth,300)}}}),Object.defineProperty(r,"sequencelength",{get:function(){return r.sequence?r.sequence.length:e.util.Numeric(t.sequencelength)}}),Object.defineProperty(r,"sequence",{get:function(){return t.sequence}}),Object.defineProperty(r,"plasmidclass",{get:function(){return t.plasmidclass}}),Object.defineProperty(r,"plasmidstyle",{get:function(){return t.plasmidstyle}}),r.tracks=i}]}}]).directive("plasmidtrack",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["plasmidtrack","^plasmid"],scope:{radius:"@",width:"@",trackclass:"@",trackstyle:"@",trackclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=angular.element(r),u=angular.element(r.children()[0]),l=a[0];t.util.swapProperties(s,u),u.attr("fill-rule","evenodd"),e(u)(n.$parent),u.on("click",function(t){n.trackclick({$event:t,$track:l})}),n.$watchGroup(["radius","width","trackstyle","trackclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[],o=[],s=[];i=this,i.elementtype="plasmidtrack",i.init=function(t,e){n=e,n.addTrack(i),i.plasmid=n,r=t},i.draw=function(){var e=i.center,n=t.svg.path.donut(e.x,e.y,i.radius,i.width),u=i.trackclass,l=i.trackstyle;r.attr("d",n),u&&r.attr("class",u),l&&r.attr("style",l),angular.forEach(a,function(t){t.draw()}),angular.forEach(o,function(t){t.draw()}),angular.forEach(s,function(t){t.draw()})},i.addMarker=function(t){a.push(t)},i.addScale=function(t){o.push(t)},i.addLabel=function(t){s.push(t)},i.markergroup=function(t){var e=[];return angular.forEach(a,function(n){n.markergroup===t&&e.push(n)}),e},i.getPosition=function(e,r,a){a=Number(a||0),e=Number(e);var o,s,u=1,l=2,c=i.center,f=n.sequencelength;if(f>0){switch(s=e/f*360,r){case u:o=i.radius+a;break;case l:o=i.radius+i.width+a;break;default:o=i.radius+i.width/2+a}return t.util.polarToCartesian(c.x,c.y,o,s)}},Object.defineProperty(i,"center",{get:function(){return n.center}}),Object.defineProperty(i,"radius",{get:function(){return t.util.Numeric(e.radius,100)}}),Object.defineProperty(i,"width",{get:function(){return t.util.Numeric(e.width,25)}}),Object.defineProperty(i,"trackclass",{get:function(){return e.trackclass}}),Object.defineProperty(i,"trackstyle",{get:function(){return e.trackstyle}}),i.markers=a,i.scales=o,i.labels=s}]}}]).directive("trackscale",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path><g></g></g>",replace:!0,transclude:!0,require:["trackscale","^plasmidtrack"],scope:{interval:"@",vadjust:"@",ticksize:"@",direction:"@",showlabels:"@",labelvadjust:"@",labelclass:"@",labelstyle:"@",tickclass:"@",tickstyle:"@",scaleclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]),s=angular.element(e.children()[1]);i.init(o,s,a)},post:function(n,r,i,a,o){var s,u,l;o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.scaleclick({$event:t,$scale:l})}),l=a[0],n.$watchGroup(["interval","vadjust","ticksize","labelvadjust","direction","showlabels","labelstyle","labelclass","tickstyle","tickclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a,o=15,s=3;r=this,r.elementtype="trackscale",r.init=function(t,e,o){n=o,n.addScale(r),r.track=n,i=t,a=e},r.draw=function(){var e=r.tickclass,o=r.tickstyle,s=n.center,u=t.svg.path.scale(s.x,s.y,r.radius,r.interval,r.total,r.ticksize);i.attr("d",u),e&&i.attr("class",e),o&&i.attr("style",o),r.showlabels?r.drawLabel():a.empty()},r.drawLabel=function(){function i(t){e.scaleclick({$event:t,$scale:r})}var o,s,u,l=n.center;for(u=t.svg.element.scalelabels(l.x,l.y,r.labelradius,r.interval,r.total),a.empty(),o=0;o<=u.length-1;o+=1)s=angular.element(t.svg.createNode("text")),r.labelclass&&s.attr("class",r.labelclass),r.labelstyle&&s.attr("style",r.labelstyle),s.attr("x",u[o].x),s.attr("y",u[o].y),s.attr("text-anchor","middle"),s.attr("alignment-baseline","middle"),s.text(u[o].text),s.on("click",i),a.append(s)},Object.defineProperty(r,"radius",{get:function(){return(r.inwardflg?n.radius:n.radius+n.width)+(r.inwardflg?-1:1)*r.vadjust+(r.inwardflg?-r.ticksize:0)}}),Object.defineProperty(r,"interval",{get:function(){return t.util.Numeric(e.interval)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"ticksize",{get:function(){return t.util.Numeric(e.ticksize,s)}}),Object.defineProperty(r,"inwardflg",{get:function(){return"in"===e.direction?!0:!1}}),Object.defineProperty(r,"total",{get:function(){return n.plasmid.sequencelength}}),Object.defineProperty(r,"showlabels",{get:function(){return"1"===e.showlabels?!0:!1}}),Object.defineProperty(r,"labelvadjust",{get:function(){return t.util.Numeric(e.labelvadjust,o)}}),Object.defineProperty(r,"tickclass",{get:function(){return e.tickclass}}),Object.defineProperty(r,"tickstyle",{get:function(){return e.tickstyle}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"labelradius",{get:function(){return r.radius+r.labelvadjust*(r.inwardflg?-1:1)}})}]}}]).directive("tracklabel",["SVGUtil",function(t){return{restrict:"AE",type:"svg",template:"<text></text>",replace:!0,transclude:!0,require:["tracklabel","^plasmidtrack"],scope:{text:"@",hadjust:"@",vadjust:"@",labelclass:"@",labelstyle:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]);i.init(o,a)},post:function(t,e,n,r,i){var a;i(t.$parent,function(t){e.append(t)}),e.attr("text-anchor","middle"),e.attr("alignment-baseline","middle"),e.on("click",function(e){t.labelclick({$event:e,$label:a})}),a=r[0],t.$watchGroup(["text","vadjust","hadjust","labelstyle","labelclass"],function(){a.draw()})}},controller:["$scope",function(e){var n,r,i;r=this,r.elementtype="tracklabel",r.init=function(t,e){n=e,n.addLabel(r),r.track=n,i=t},r.draw=function(){var t=n.center,e=r.labelclass,a=r.labelstyle;i.attr("x",t.x+r.hadjust),i.attr("y",t.y+r.vadjust),i.text(r.text),e&&i.attr("class",e),a&&i.attr("style",a)},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"text",{get:function(){return e.text}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"hadjust",{get:function(){return t.util.Numeric(e.hadjust,0)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust,0)}}),Object.defineProperty(r,"dimensions",{get:function(){return i[0].getBBox()}})}]}}]).directive("trackmarker",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["trackmarker","^plasmidtrack"],scope:{start:"@",end:"@",vadjust:"@",wadjust:"@",markergroup:"@",arrowstartlength:"@",arrowstartwidth:"@",arrowstartangle:"@",arrowendlength:"@",arrowendwidth:"@",arrowendangle:"@",markerclass:"@",markerstyle:"@",markerclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){var s,u,l=a[0];o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.markerclick({$event:t,$marker:l})}),n.$watchGroup(["start","end","vadjust","wadjust","markergroup","markerclass","markerstyle","arrowstartlength","arrowstartwidth","arrowstartangle","arrowendlength","arrowendwidth","arrowendangle"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[];r=this,r.elementtype="trackmarker",r.init=function(t,e){n=e,n.addMarker(r),i=t,r.track=n},r.draw=function(){var t=r.markerclass,e=r.markerstyle;i.attr("d",r.getPath()),t&&i.attr("class",t),e&&i.attr("style",e),angular.forEach(a,function(t){t.draw()})},r.addMarkerLabel=function(t){a.push(t)},r.getPath=function(){var e=n.center,i=r.angle,a=r.radius;return t.svg.path.arc(e.x,e.y,a.inner,i.start,i.end,r.width,r.arrowstart,r.arrowend)},r.getPosition=function(e,i,a,o){var s,u,l,c,f,d="start",h="end",p="inner",$="outer";if(s=n.center,c=r.radius,f=r.angle,e=t.util.Numeric(e),i=t.util.Numeric(i),void 0!==o&&void 0!==a){switch(o){case p:u=c.inner+i;break;case $:u=c.outer+i;break;default:u=c.middle+i}switch(a){case d:l=f.start+e;break;case h:l=f.end+e;break;default:l=f.middle+e}return t.util.polarToCartesian(s.x,s.y,u,l)}return u={outer:c.outer+i,inner:c.inner+i,middle:c.middle+i},l={begin:f.start+e,end:f.end+e,middle:f.middle+e},{outer:{begin:t.util.polarToCartesian(s.x,s.y,u.outer,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.outer,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.outer,l.end)},middle:{begin:t.util.polarToCartesian(s.x,s.y,u.middle,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.middle,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.middle,l.end)},inner:{begin:t.util.polarToCartesian(s.x,s.y,u.inner,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.inner,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.inner,l.end)}}},r.fireClick=function(t){e.markerclick({$event:t.$event,$marker:t.$marker})},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"radius",{get:function(){return{inner:n.radius+r.vadjust,outer:n.radius+r.vadjust+r.width,middle:n.radius+r.vadjust+r.width/2}}}),Object.defineProperty(r,"angle",{get:function(){var i,a,o,s;return i=r.start/n.plasmid.sequencelength*360,s=e.end||e.start,a=t.util.Numeric(s)/n.plasmid.sequencelength*360,a+=i>a?360:0,o=i+(a-i)/2,{start:i,middle:o,end:a}}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"wadjust",{get:function(){return t.util.Numeric(e.wadjust)}}),Object.defineProperty(r,"width",{get:function(){return n.width+r.wadjust}}),Object.defineProperty(r,"start",{get:function(){return t.util.Numeric(e.start)}}),Object.defineProperty(r,"end",{get:function(){return t.util.Numeric(e.end)}}),Object.defineProperty(r,"arrowstart",{get:function(){return{width:t.util.Numeric(e.arrowstartwidth),length:t.util.Numeric(e.arrowstartlength),angle:t.util.Numeric(e.arrowstartangle)}}}),Object.defineProperty(r,"arrowend",{get:function(){return{width:t.util.Numeric(e.arrowendwidth),length:t.util.Numeric(e.arrowendlength),angle:t.util.Numeric(e.arrowendangle)}}}),Object.defineProperty(r,"markergroup",{get:function(){return e.markergroup}}),Object.defineProperty(r,"markerclass",{get:function(){return e.markerclass}}),Object.defineProperty(r,"markerstyle",{get:function(){return e.markerstyle}}),Object.defineProperty(r,"sequence",{get:function(){var t=r.track.plasmid.sequence;return r.start>r.end?t.substring(r.start-1,t.length-1)+t.substring(0,r.end-1):t.substring(r.start-1,r.end-1)}}),r.labels=a}]}}]).directive("markerlabel",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",transclude:!0,template:'<g><path></path><path id="" style="fill:none;stroke:none"></path><text></text></g>',require:["markerlabel","^trackmarker"],replace:!0,scope:{text:"@",valign:"@",vadjust:"@",halign:"@",hadjust:"@",type:"@",showline:"@",linestyle:"@",lineclass:"@",labelstyle:"@",labelclass:"@",linevadjust:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]),s=angular.element(e.children()[0]),u=angular.element(e.children()[1]),l=angular.element(e.children()[2]);i.init(l,o,u,s,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=a[0],u=a[1],l=angular.element(r),c=angular.element(r.children()[2]);c.attr("text-anchor","middle"),c.attr("alignment-baseline","middle"),t.util.swapProperties(l,c),e(c)(n.$parent),i.labelclick?c.on("click",function(t){n.labelclick({$event:t,$label:s})}):c.on("click",function(t){u.fireClick({$event:t,$marker:u})}),n.$watchGroup(["text","type","valign","vadjust","halign","hadjust","showline","linevadjust","linestyle","labelclass","labelstyle"],function(){s.draw()})}},controller:["$scope","$compile",function(e,n){var r,i,a,o,s,u,l,c;i=this,i.elementtype="markerlabel",i.init=function(t,e,n,s,u){var f="TPATH"+(Math.random()+1).toString(36).substring(3,7);r=u,r.addMarkerLabel(i),i.marker=r,a=t,o=n,l=s,c=e,o.attr("id",f)},i.draw=function(){var t,c,f,d,h,p="middle",$="inner",m="outer",g="start",v="end",y=0,b=0,w=i.labelclass,x=i.labelstyle;if(w&&a.attr("class",w),x&&a.attr("style",x),"path"===i.type)switch(a.attr("x",""),a.attr("y",""),s||(u=document.createElementNS("http://www.w3.org/2000/svg","textPath"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+o.attr("id")),s=angular.element(u),n(s)(e),a.empty(),a.append(s)),u.textContent=i.text,y=window.getComputedStyle(a[0]).fontSize.replace("px",""),b=i.valign===m?0:i.valign===$?Number(y||0):Number(y||0)/2,o.attr("d",i.getPath(i.hadjust,i.vadjust-b,i.halign,i.valign)),i.halign){case g:a.attr("text-anchor","start"),s[0].setAttribute("startOffset","0%");break;case v:a.attr("text-anchor","end"),s[0].setAttribute("startOffset","100%");break;default:a.attr("text-anchor","middle"),s[0].setAttribute("startOffset","50%")}else s&&(s.remove(),s=null),t=r.getPosition(i.hadjust,i.vadjust,i.halign,i.valign),a.attr("x",t.x),a.attr("y",t.y),a.text(i.text);i.showlineflg?(c=r.getPosition(i.hadjust,i.vadjust+i.linevadjust,i.halign,i.valign),d=r.getPosition(),h=i.valign===$?d.inner:i.valign===p?d.middle:d.outer,f=i.halign===g?h.begin:i.halign===v?h.end:h.middle,l.attr("d",["M",c.x,c.y,"L",f.x,f.y].join(" ")),i.linestyle||i.lineclass||l.attr("style","stroke:#000"),i.linestyle&&l.attr("style",i.linestyle),i.lineclass&&l.attr("class",i.lineclass)):l.removeAttr("d")},i.getPath=function(e,n,i,a){var o,s,u,l,c,f="inner",d="outer",h="start",p="end",$=r.center;switch(s=r.radius,a){case f:o=s.inner;break;case d:o=s.outer;break;default:o=s.middle}switch(u=r.angle,i){case h:l=u.start,c=u.start+359.99;break;case p:l=u.end+1,c=u.end;break;default:l=u.middle+180.05,c=u.middle+179.95}return t.svg.path.arc($.x,$.y,o+Number(n||0),l+Number(e||0),c+Number(e||0),1)},Object.defineProperty(i,"showlineflg",{get:function(){return"1"===e.showline?!0:!1}}),Object.defineProperty(i,"halign",{get:function(){return e.halign||"middle"}}),Object.defineProperty(i,"valign",{get:function(){return e.valign||"middle"}}),Object.defineProperty(i,"hadjust",{get:function(){return t.util.Numeric(e.hadjust)}}),Object.defineProperty(i,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(i,"type",{get:function(){return e.type}}),Object.defineProperty(i,"linevadjust",{get:function(){return t.util.Numeric(e.linevadjust)}}),Object.defineProperty(i,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(i,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(i,"linestyle",{get:function(){return e.linestyle}}),Object.defineProperty(i,"lineclass",{get:function(){return e.lineclass}}),Object.defineProperty(i,"text",{get:function(){return e.text}})}]}}]).directive("svgelement",["SVGUtil",function(){return{restrict:"AE",template:function(t,e){return"<"+e.type+"></"+e.type+">"},type:"svg",replace:!0,transclude:!0,require:["^plasmid"],scope:{},link:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)})}}}])}(),function(){"use strict";angular.element(document).ready(function(){angular.bootstrap(document,["app"])})}();</script> | for(y||(w||null===F?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),C=0,g=L.length;g>C;C++){for(t=L[C],n=U[t],R.length<=C?(i={element:S.clone().attr("label",t),label:n.label},c=[i],R.push(c),s.append(i.element)):(c=R[C],i=c[0],i.label!=t&&i.element.attr("label",i.label=t)),j=null,O=0,b=n.length;b>O;O++)r=n[O],(f=c[O+1])?(j=f.element,f.label!==r.label&&(m(z,f.label,!1),m(z,r.label,!0),j.text(f.label=r.label),j.prop("label",f.label)),f.id!==r.id&&j.val(f.id=r.id),j[0].selected!==r.selected&&(j.prop("selected",f.selected=r.selected),Xr&&j.prop("selected",f.selected))):(""===r.id&&w?M=w:(M=k.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),m(z,r.label,!0),j?j.after(M):i.element.append(M),j=M);for(O++;c.length>O;)r=c.pop(),m(z,r.label,!1),r.element.remove()}for(;R.length>C;){for(n=R.pop(),O=1;O<n.length;++O)m(z,n[O].label,!1);n[0].element.remove()}a(z,function(t,e){t>0?$.addOption(e):0>t&&$.removeOption(e)})}var C;if(!(C=b.match(i)))throw Do("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var A=r(C[2]||C[1]),O=C[4]||C[6],E=/ as /.test(C[0])&&C[1],j=E?r(E):null,N=C[5],T=r(C[3]||""),M=r(C[2]?C[1]:O),P=r(C[7]),V=C[8],q=V?r(C[8]):null,D={},R=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),u.$render=g,e.$watchCollection(P,p),e.$watchCollection(d,p),y&&e.$watchCollection(function(){return u.$modelValue},p)}if(c[1]){for(var p,$=c[0],m=c[1],y=l.multiple,b=l.ngOptions,w=!1,x=!1,k=Qr(e.createElement("option")),S=Qr(e.createElement("optgroup")),C=k.clone(),A=0,O=u.children(),E=O.length;E>A;A++)if(""===O[A].value){p=w=O.eq(A);break}$.init(m,w,C),y&&(m.$isEmpty=function(t){return!t||0===t.length}),b?h(s,u,m):y?d(s,u,m):f(s,u,m,$)}}}}],_o=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var a="$selectController",o=n.parent(),s=o.data(a)||o.parent().data(a);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Uo=m({restrict:"E",terminal:!1}),Lo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Fo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));o=t||n,a.$validate()}),a.$validators.pattern=function(t){return a.$isEmpty(t)||g(o)||o.test(t)}}}}},Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=d(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=d(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?(console.log("WARNING: Tried to load angular more than once."),void 0):(re(),he(si),Qr(e).ready(function(){X(e,Q)}),void 0)}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),angular.module("app",["angularplasmid"]),function(){"use strict";angular.module("angularplasmid.services",[]).factory("SVGUtil",function(){function t(t,e){var n="round";return"undefined"==typeof e||0===+e?Math[n](t):(t=+t,e=+e,isNaN(t)||"number"!=typeof e||e%1!==0?0/0:(t=t.toString().split("e"),t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function e(t){d.push(t)}function n(t){var e;for(e=0;e<d.length;e+=1)if(d[e].id===t)return d[e]}function r(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function i(t,e){var n,r,i=["id","name","class","style","filter","ng-attr-style","ng-attr-class","ng-class"];for(r=0;r<i.length;r+=1)n=i[r],t[0].hasAttribute(n)&&(e.attr(n,t.attr(n)),t.removeAttr(n))}function a(t,e,n){var r,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,t);return n=n||[],angular.forEach(e,function(t){n.indexOf(t)<0&&(r=e[t],null===r||t.match(/\$/)||"string"==typeof r&&""===r||a.setAttribute(t,r))}),a}function o(t){angular.forEach(["id","class","style"],function(e){t.removeAttribute(e)})}function s(t,e,n,i){var a,o,s;return t=Number(t||0),e=Number(e||0),n=Number(n||0),i=Number(i||0),a={start:r(t,e,n,359.99),end:r(t,e,n,0)},o={start:r(t,e,n+i,359.99),end:r(t,e,n+i,0)},s=["M",a.start.x,a.start.y,"A",n,n,0,1,0,a.end.x,a.end.y,"M",o.start.x,o.start.y,"A",n+i,n+i,0,1,0,o.end.x,o.end.y].join(" ")}function u(t,e,n,i,a,o,s,u){var l,c,f,d,h,p,$,m,g,v,y,b,w;return t=Number(t),e=Number(e),n=Number(n),i=Number(i),a=Number(a),o=Number(o),s=s||{width:0,length:0,angle:0},u=u||{width:0,length:0,angle:0},i===a?(c=r(t,e,n,i),d=r(t,e,n+o,i),l=["M",c.x,c.y,"L",d.x,d.y].join(" ")):1===o?(c=r(t,e,n,i),d=r(t,e,n,a),h=a>i?180>=a-i?"0":"1":180>=a-i?"1":"0",l=["M",c.x,c.y,"A",n,n,0,h,1,d.x,d.y].join(" ")):(a-=u.length<0?0:u.length,i+=s.length<0?0:s.length,c=r(t,e,n,a),d=r(t,e,n,i),p=r(t,e,n-s.width,i+s.angle),$=r(t,e,n+o/2,i-s.length),m=r(t,e,n+o+s.width,i+s.angle),g=r(t,e,n+o,i),v=r(t,e,n+o+u.width,a-u.angle),y=r(t,e,n+o/2,a+u.length),b=r(t,e,n-u.width,a-u.angle),w=r(t,e,n,a),f=r(t,e,n+o,a),h=180>=a-i?"0":"1",l=["M",c.x,c.y,"A",n,n,0,h,0,d.x,d.y,"L",p.x,p.y,"L",$.x,$.y,"L",m.x,m.y,"L",g.x,g.y,"A",n+o,n+o,0,h,1,f.x,f.y,"L",v.x,v.y,"L",y.x,y.y,"L",b.x,b.y,"L",w.x,w.y,"z"].join(" ")),l}function l(e,n,r,i,a,o){e=Number(e||0),n=Number(n||0),r=Number(r||0),i=Number(i||0),a=Number(a||0),o=Number(o||2);var s,u,l,c,f=Number(i)>0?Number(a)/Number(i):0,d=2*Math.PI/f,h=-1,p="";for(c=0;f>c;c+=1)s=d*c-Math.PI/2,l=Math.cos(s),u=Math.sin(s),p+="M"+t(e+r*l,h)+","+t(n+r*u,h)+" L"+t(e+(r+o)*l,h)+","+t(n+(r+o)*u,h)+" ";return p=p||"M 0,0"}function c(e,n,r,i,a){e=Number(e),n=Number(n),r=Number(r),i=Number(i),a=Number(a);var o,s,u,l,c=Number(i)>0?Number(a)/Number(i):0,f=2*Math.PI/c,d=-1,h=[];for(l=0;c>l;l+=1)o=f*l-Math.PI/2,u=Math.cos(o),s=Math.sin(o),h.push({x:t(e+r*u,d),y:t(n+r*s,d),text:i*l});return h}function f(t,e){return isNaN(t)?e||0:Number(t)}var d=[],h=[],p=[];return{api:{addPlasmid:e,plasmids:d,plasmid:n,plasmidtracks:h,trackmarkers:p},util:{polarToCartesian:r,swapProperties:i,Numeric:f},svg:{createNode:a,removeAttributes:o,path:{donut:s,arc:u,scale:l},element:{scalelabels:c}}}})}(),function(){"use strict";angular.module("angularplasmid",["angularplasmid.services"]).directive("plasmidapi",["SVGUtil",function(t){return{restrict:"AE",link:function(e,n,r){e[r.name]=t.api}}}]).directive("plasmid",["SVGUtil",function(){return{restrict:"AE",type:"svg",template:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>',replace:!0,transclude:!0,require:"plasmid",scope:{plasmidheight:"@",plasmidwidth:"@",sequencelength:"@",sequence:"@",plasmidclass:"@",plasmidstyle:"@"},link:{pre:function(t,e,n,r){r.init(e)},post:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)}),t.$watchGroup(["plasmidheight","plasmidwidth","sequencelength","sequence","plasmidclass","plasmidstyle"],function(){r.draw()})}},controller:["$scope","SVGUtil",function(t,e){var n,r,i=[];r=this,r.elementtype="plasmid",r.init=function(t){e.api.addPlasmid(r),n=t,r.id=n.attr("id")},r.draw=function(){var t=r.dimensions,e=n.plasmidclass,a=n.plasmidstyle;n.attr("height",t.height),n.attr("width",t.width),e&&n.attr("class",e),a&&n.attr("style",a),angular.forEach(i,function(t){t.draw()})},r.addTrack=function(t){i.push(t)},Object.defineProperty(r,"center",{get:function(){var t=r.dimensions;return{x:t.width/2,y:t.height/2}}}),Object.defineProperty(r,"dimensions",{get:function(){return{height:e.util.Numeric(t.plasmidheight,300),width:e.util.Numeric(t.plasmidwidth,300)}}}),Object.defineProperty(r,"sequencelength",{get:function(){return r.sequence?r.sequence.length:e.util.Numeric(t.sequencelength)}}),Object.defineProperty(r,"sequence",{get:function(){return t.sequence}}),Object.defineProperty(r,"plasmidclass",{get:function(){return t.plasmidclass}}),Object.defineProperty(r,"plasmidstyle",{get:function(){return t.plasmidstyle}}),r.tracks=i}]}}]).directive("plasmidtrack",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["plasmidtrack","^plasmid"],scope:{radius:"@",width:"@",trackclass:"@",trackstyle:"@",trackclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=angular.element(r),u=angular.element(r.children()[0]),l=a[0];t.util.swapProperties(s,u),u.attr("fill-rule","evenodd"),e(u)(n.$parent),u.on("click",function(t){n.trackclick({$event:t,$track:l})}),n.$watchGroup(["radius","width","trackstyle","trackclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[],o=[],s=[];i=this,i.elementtype="plasmidtrack",i.init=function(t,e){n=e,n.addTrack(i),i.plasmid=n,r=t},i.draw=function(){var e=i.center,n=t.svg.path.donut(e.x,e.y,i.radius,i.width),u=i.trackclass,l=i.trackstyle;r.attr("d",n),u&&r.attr("class",u),l&&r.attr("style",l),angular.forEach(a,function(t){t.draw()}),angular.forEach(o,function(t){t.draw()}),angular.forEach(s,function(t){t.draw()})},i.addMarker=function(t){a.push(t)},i.addScale=function(t){o.push(t)},i.addLabel=function(t){s.push(t)},i.markergroup=function(t){var e=[];return angular.forEach(a,function(n){n.markergroup===t&&e.push(n)}),e},i.getPosition=function(e,r,a){a=Number(a||0),e=Number(e);var o,s,u=1,l=2,c=i.center,f=n.sequencelength;if(f>0){switch(s=e/f*360,r){case u:o=i.radius+a;break;case l:o=i.radius+i.width+a;break;default:o=i.radius+i.width/2+a}return t.util.polarToCartesian(c.x,c.y,o,s)}},Object.defineProperty(i,"center",{get:function(){return n.center}}),Object.defineProperty(i,"radius",{get:function(){return t.util.Numeric(e.radius,100)}}),Object.defineProperty(i,"width",{get:function(){return t.util.Numeric(e.width,25)}}),Object.defineProperty(i,"trackclass",{get:function(){return e.trackclass}}),Object.defineProperty(i,"trackstyle",{get:function(){return e.trackstyle}}),i.markers=a,i.scales=o,i.labels=s}]}}]).directive("trackscale",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path><g></g></g>",replace:!0,transclude:!0,require:["trackscale","^plasmidtrack"],scope:{interval:"@",vadjust:"@",ticksize:"@",direction:"@",showlabels:"@",labelvadjust:"@",labelclass:"@",labelstyle:"@",tickclass:"@",tickstyle:"@",scaleclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]),s=angular.element(e.children()[1]);i.init(o,s,a)},post:function(n,r,i,a,o){var s,u,l;o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.scaleclick({$event:t,$scale:l})}),l=a[0],n.$watchGroup(["interval","vadjust","ticksize","labelvadjust","direction","showlabels","labelstyle","labelclass","tickstyle","tickclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a,o=15,s=3;r=this,r.elementtype="trackscale",r.init=function(t,e,o){n=o,n.addScale(r),r.track=n,i=t,a=e},r.draw=function(){var e=r.tickclass,o=r.tickstyle,s=n.center,u=t.svg.path.scale(s.x,s.y,r.radius,r.interval,r.total,r.ticksize);i.attr("d",u),e&&i.attr("class",e),o&&i.attr("style",o),r.showlabels?r.drawLabel():a.empty()},r.drawLabel=function(){function i(t){e.scaleclick({$event:t,$scale:r})}var o,s,u,l=n.center;for(u=t.svg.element.scalelabels(l.x,l.y,r.labelradius,r.interval,r.total),a.empty(),o=0;o<=u.length-1;o+=1)s=angular.element(t.svg.createNode("text")),r.labelclass&&s.attr("class",r.labelclass),r.labelstyle&&s.attr("style",r.labelstyle),s.attr("x",u[o].x),s.attr("y",u[o].y),s.attr("text-anchor","middle"),s.attr("alignment-baseline","middle"),s.text(u[o].text),s.on("click",i),a.append(s)},Object.defineProperty(r,"radius",{get:function(){return(r.inwardflg?n.radius:n.radius+n.width)+(r.inwardflg?-1:1)*r.vadjust+(r.inwardflg?-r.ticksize:0)}}),Object.defineProperty(r,"interval",{get:function(){return t.util.Numeric(e.interval)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"ticksize",{get:function(){return t.util.Numeric(e.ticksize,s)}}),Object.defineProperty(r,"inwardflg",{get:function(){return"in"===e.direction?!0:!1}}),Object.defineProperty(r,"total",{get:function(){return n.plasmid.sequencelength}}),Object.defineProperty(r,"showlabels",{get:function(){return"1"===e.showlabels?!0:!1}}),Object.defineProperty(r,"labelvadjust",{get:function(){return t.util.Numeric(e.labelvadjust,o)}}),Object.defineProperty(r,"tickclass",{get:function(){return e.tickclass}}),Object.defineProperty(r,"tickstyle",{get:function(){return e.tickstyle}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"labelradius",{get:function(){return r.radius+r.labelvadjust*(r.inwardflg?-1:1)}})}]}}]).directive("tracklabel",["SVGUtil",function(t){return{restrict:"AE",type:"svg",template:"<text></text>",replace:!0,transclude:!0,require:["tracklabel","^plasmidtrack"],scope:{text:"@",hadjust:"@",vadjust:"@",labelclass:"@",labelstyle:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]);i.init(o,a)},post:function(t,e,n,r,i){var a;i(t.$parent,function(t){e.append(t)}),e.attr("text-anchor","middle"),e.attr("alignment-baseline","middle"),e.on("click",function(e){t.labelclick({$event:e,$label:a})}),a=r[0],t.$watchGroup(["text","vadjust","hadjust","labelstyle","labelclass"],function(){a.draw()})}},controller:["$scope",function(e){var n,r,i;r=this,r.elementtype="tracklabel",r.init=function(t,e){n=e,n.addLabel(r),r.track=n,i=t},r.draw=function(){var t=n.center,e=r.labelclass,a=r.labelstyle;i.attr("x",t.x+r.hadjust),i.attr("y",t.y+r.vadjust),i.text(r.text),e&&i.attr("class",e),a&&i.attr("style",a)},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"text",{get:function(){return e.text}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"hadjust",{get:function(){return t.util.Numeric(e.hadjust,0)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust,0)}}),Object.defineProperty(r,"dimensions",{get:function(){return i[0].getBBox()}})}]}}]).directive("trackmarker",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["trackmarker","^plasmidtrack"],scope:{start:"@",end:"@",vadjust:"@",wadjust:"@",markergroup:"@",arrowstartlength:"@",arrowstartwidth:"@",arrowstartangle:"@",arrowendlength:"@",arrowendwidth:"@",arrowendangle:"@",markerclass:"@",markerstyle:"@",markerclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){var s,u,l=a[0];o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.markerclick({$event:t,$marker:l})}),n.$watchGroup(["start","end","vadjust","wadjust","markergroup","markerclass","markerstyle","arrowstartlength","arrowstartwidth","arrowstartangle","arrowendlength","arrowendwidth","arrowendangle"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[];r=this,r.elementtype="trackmarker",r.init=function(t,e){n=e,n.addMarker(r),i=t,r.track=n},r.draw=function(){var t=r.markerclass,e=r.markerstyle;i.attr("d",r.getPath()),t&&i.attr("class",t),e&&i.attr("style",e),angular.forEach(a,function(t){t.draw()})},r.addMarkerLabel=function(t){a.push(t)},r.getPath=function(){var e=n.center,i=r.angle,a=r.radius;return t.svg.path.arc(e.x,e.y,a.inner,i.start,i.end,r.width,r.arrowstart,r.arrowend)},r.getPosition=function(e,i,a,o){var s,u,l,c,f,d="start",h="end",p="inner",$="outer";if(s=n.center,c=r.radius,f=r.angle,e=t.util.Numeric(e),i=t.util.Numeric(i),void 0!==o&&void 0!==a){switch(o){case p:u=c.inner+i;break;case $:u=c.outer+i;break;default:u=c.middle+i}switch(a){case d:l=f.start+e;break;case h:l=f.end+e;break;default:l=f.middle+e}return t.util.polarToCartesian(s.x,s.y,u,l)}return u={outer:c.outer+i,inner:c.inner+i,middle:c.middle+i},l={begin:f.start+e,end:f.end+e,middle:f.middle+e},{outer:{begin:t.util.polarToCartesian(s.x,s.y,u.outer,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.outer,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.outer,l.end)},middle:{begin:t.util.polarToCartesian(s.x,s.y,u.middle,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.middle,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.middle,l.end)},inner:{begin:t.util.polarToCartesian(s.x,s.y,u.inner,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.inner,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.inner,l.end)}}},r.fireClick=function(t){e.markerclick({$event:t.$event,$marker:t.$marker})},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"radius",{get:function(){return{inner:n.radius+r.vadjust,outer:n.radius+r.vadjust+r.width,middle:n.radius+r.vadjust+r.width/2}}}),Object.defineProperty(r,"angle",{get:function(){var i,a,o,s;return i=r.start/n.plasmid.sequencelength*360,s=e.end||e.start,a=t.util.Numeric(s)/n.plasmid.sequencelength*360,a+=i>a?360:0,o=i+(a-i)/2,{start:i,middle:o,end:a}}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"wadjust",{get:function(){return t.util.Numeric(e.wadjust)}}),Object.defineProperty(r,"width",{get:function(){return n.width+r.wadjust}}),Object.defineProperty(r,"start",{get:function(){return t.util.Numeric(e.start)}}),Object.defineProperty(r,"end",{get:function(){return t.util.Numeric(e.end)}}),Object.defineProperty(r,"arrowstart",{get:function(){return{width:t.util.Numeric(e.arrowstartwidth),length:t.util.Numeric(e.arrowstartlength),angle:t.util.Numeric(e.arrowstartangle)}}}),Object.defineProperty(r,"arrowend",{get:function(){return{width:t.util.Numeric(e.arrowendwidth),length:t.util.Numeric(e.arrowendlength),angle:t.util.Numeric(e.arrowendangle)}}}),Object.defineProperty(r,"markergroup",{get:function(){return e.markergroup}}),Object.defineProperty(r,"markerclass",{get:function(){return e.markerclass}}),Object.defineProperty(r,"markerstyle",{get:function(){return e.markerstyle}}),Object.defineProperty(r,"sequence",{get:function(){var t=r.track.plasmid.sequence;return r.start>r.end?t.substring(r.start-1,t.length-1)+t.substring(0,r.end-1):t.substring(r.start-1,r.end-1)}}),r.labels=a}]}}]).directive("markerlabel",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",transclude:!0,template:'<g><path></path><path id="" style="fill:none;stroke:none"></path><text></text></g>',require:["markerlabel","^trackmarker"],replace:!0,scope:{text:"@",valign:"@",vadjust:"@",halign:"@",hadjust:"@",type:"@",showline:"@",linestyle:"@",lineclass:"@",labelstyle:"@",labelclass:"@",linevadjust:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]),s=angular.element(e.children()[0]),u=angular.element(e.children()[1]),l=angular.element(e.children()[2]);i.init(l,o,u,s,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=a[0],u=a[1],l=angular.element(r),c=angular.element(r.children()[2]);c.attr("text-anchor","middle"),c.attr("alignment-baseline","middle"),t.util.swapProperties(l,c),e(c)(n.$parent),i.labelclick?c.on("click",function(t){n.labelclick({$event:t,$label:s})}):c.on("click",function(t){u.fireClick({$event:t,$marker:u})}),n.$watchGroup(["text","type","valign","vadjust","halign","hadjust","showline","linevadjust","linestyle","labelclass","labelstyle"],function(){s.draw()})}},controller:["$scope","$compile",function(e,n){var r,i,a,o,s,u,l,c;i=this,i.elementtype="markerlabel",i.init=function(t,e,n,s,u){var f="TPATH"+(Math.random()+1).toString(36).substring(3,7);r=u,r.addMarkerLabel(i),i.marker=r,a=t,o=n,l=s,c=e,o.attr("id",f)},i.draw=function(){var t,c,f,d,h,p="middle",$="inner",m="outer",g="start",v="end",y=0,b=0,w=i.labelclass,x=i.labelstyle;if(w&&a.attr("class",w),x&&a.attr("style",x),"path"===i.type)switch(a.attr("x",""),a.attr("y",""),s||(u=document.createElementNS("http://www.w3.org/2000/svg","textPath"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+o.attr("id")),s=angular.element(u),n(s)(e),a.empty(),a.append(s)),u.textContent=i.text,y=window.getComputedStyle(a[0]).fontSize.replace("px",""),b=i.valign===m?0:i.valign===$?Number(y||0):Number(y||0)/2,o.attr("d",i.getPath(i.hadjust,i.vadjust-b,i.halign,i.valign)),i.halign){case g:a.attr("text-anchor","start"),s[0].setAttribute("startOffset","0%");break;case v:a.attr("text-anchor","end"),s[0].setAttribute("startOffset","100%");break;default:a.attr("text-anchor","middle"),s[0].setAttribute("startOffset","50%")}else s&&(s.remove(),s=null),t=r.getPosition(i.hadjust,i.vadjust,i.halign,i.valign),a.attr("x",t.x),a.attr("y",t.y),a.text(i.text);i.showlineflg?(c=r.getPosition(i.hadjust,i.vadjust+i.linevadjust,i.halign,i.valign),d=r.getPosition(),h=i.valign===$?d.inner:i.valign===p?d.middle:d.outer,f=i.halign===g?h.begin:i.halign===v?h.end:h.middle,l.attr("d",["M",c.x,c.y,"L",f.x,f.y].join(" ")),i.linestyle||i.lineclass||l.attr("style","stroke:#000"),i.linestyle&&l.attr("style",i.linestyle),i.lineclass&&l.attr("class",i.lineclass)):l.removeAttr("d")},i.getPath=function(e,n,i,a){var o,s,u,l,c,f="inner",d="outer",h="start",p="end",$=r.center;switch(s=r.radius,a){case f:o=s.inner;break;case d:o=s.outer;break;default:o=s.middle}switch(u=r.angle,i){case h:l=u.start,c=u.start+359.99;break;case p:l=u.end+1,c=u.end;break;default:l=u.middle+180.05,c=u.middle+179.95}return t.svg.path.arc($.x,$.y,o+Number(n||0),l+Number(e||0),c+Number(e||0),1)},Object.defineProperty(i,"showlineflg",{get:function(){return"1"===e.showline?!0:!1}}),Object.defineProperty(i,"halign",{get:function(){return e.halign||"middle"}}),Object.defineProperty(i,"valign",{get:function(){return e.valign||"middle"}}),Object.defineProperty(i,"hadjust",{get:function(){return t.util.Numeric(e.hadjust)}}),Object.defineProperty(i,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(i,"type",{get:function(){return e.type}}),Object.defineProperty(i,"linevadjust",{get:function(){return t.util.Numeric(e.linevadjust)}}),Object.defineProperty(i,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(i,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(i,"linestyle",{get:function(){return e.linestyle}}),Object.defineProperty(i,"lineclass",{get:function(){return e.lineclass}}),Object.defineProperty(i,"text",{get:function(){return e.text}})}]}}]).directive("svgelement",["SVGUtil",function(){return{restrict:"AE",template:function(t,e){return"<"+e.type+"></"+e.type+">"},type:"svg",replace:!0,transclude:!0,require:["^plasmid"],scope:{},link:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)})}}}])}(),function(){"use strict";angular.element(document).ready(function(){angular.bootstrap(document,["app"])})}();</script> | ||
− | |||
− | |||
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | ||
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400|Roboto:400,400i" rel="stylesheet"> | <link href="https://fonts.googleapis.com/css?family=Quicksand:300,400|Roboto:400,400i" rel="stylesheet"> |
Revision as of 10:25, 1 November 2017
Our Key Goals
The aim of the USYD iGEM 2017 team was to address the problem of insulin inaccessibility. The design of our insulin, and its means of expression, needed to look at five key characteristics:
Stability
For our project to work effectively, we must have a supply chain that’s not a cold chain, so that costs can be reduced. This will ultimately mean that the cost of these cold chains will not be passed onto the consumer. To achieve this, we hope to design an insulin that will not lose efficacy after being exposed to room temperature for long periods of time.
Single Chained
As a result of the difficult purification methods, Single Chain Insulins, or SCIs for short, have been developed with a small, C-peptide chain linker. This linker connects the A and B chains in such a way that the di-sulfide bonds form more favorably. We aim to develop our own single chain insulin to compare it’s simplicity.
Ease of Purification and Affordaility
We must also consider the impact of a difficult, costly manufacturing process on small scale manufacturing companies. This impact is too great to impose on this grass-roots organisations, so we have pursued to find a cheap, simple purification method which is able to produce high yields from a recombinant system.
Intellectual Property Issues
As a result of the way drugs are currently developed, all new inventions for therapies are protected by Intellectual Property Law through patents. These patents surrounding all currently prescribed and newly invented insulins has inspired our team to pursue a completely open source project.
Safety and Efficacy
Our insulin products must be of certifiable medical grade such that it can be approved for human use after stage IV clinical trials, or biosimilar clinical trials. Furthermore, it must also be at least as effective as the other insulins on the market.
Our Insulin Analogue
Winsulin stuff
Our Constructs
We designed our expression constructs in order to test winsulin and proinsulin with multiple expression systems. Click on each element of the construct to learn more about why we chose it:
BB prefix
RBS
YNCM Tag
His Tag
TEV
Winsulin
BB suffix
BB prefix
RBS
YNCM Tag
His Tag
R
Proinsulin
BB suffix
BB prefix
RBS
Ecotin Tag
His Tag
TEV
Winsulin
BB suffix
BB prefix
RBS
Ecotin Tag
His Tag
R
Proinsulin
BB suffix
BB prefix
RBS
His Tag
TEV
Winsulin
BB suffix
BB prefix
RBS
His Tag
R
Proinsulin
BB suffix
iGEM BioBrick Prefix
Contains the restriction sites that are necessary for BioBrick compatibility including EcoRI, NotI & XbaI.
E. coli Extended Ribosome Binding Site
A derivative of the RBS found in gene 10 of the T7 bacteriophage, this 23 base pair sequence rich in A’s & T’s enhances ribosome binding to boost expression.
YncM Tag
The YNCM tag is a 12 amino acid sequence whose presence on the N-terminus of the protein targets it for secretion out of the cell into the surrounding media via the Sec pathway in Bacillus subtilis. YNCM was chosen because it was recently shown to be massively successful in targeting recombinant protein for secretion compared to a library of other signal peptides. Additionally, this was shown in B. subtilis strain WB600, which is the bacteria that our WB800 strain was derived from. So we expect that it should give us similar success in secretion of our constructs. (Guan et. al. 2016)
His Tag
We have included a tag comprised of 6 sequential histidines that form a vital aspect of our purification technique using affinity chromatography. Histidine’s high attraction to metal ions will cause the entire protein, insulin and all, to bind to a nickel column and separate it from the other proteins of the cell.
TEV Protease Cleavage Site
TEV is a sequence-specific cysteine protease derived from Tobacco Etch Virus. Because of its high specificity, it is commonly used for deliberate protein cleavage. In our project, we will use it to exclusively detach Winsulin from the nickel column, leaving the his tag and Ecotin/YNCM tags behind. This should provide us with a pure elution of Winsulin.
“R” Arginine Cleavage Site
Arginine acts as a recognition site for Trypsin Protease which we will use to specifically remove Proinsulin from the his tag and YNCM/Ecotin tag in a similar way to TEV. We have chosen to use Trypsin in these constructs because it allows us to further simplify the processing of proinsulin. Trypsin naturally cleaves the C-peptide from proinsulin which, following disulfide bond formation, leaves the active form of insulin. This is the way it works in our body, so we are confident that it will work here too.
iGEM BioBrick Suffix
Contains the restriction sites that are necessary for BioBrick compatibility including SpeI, NotI & PstI. We have also added an additional BamHI site at the terminus of our E. coli expressed constructs for ligation into pET-15b.
Ecotin Tag
Ecotin acts as a signal sequence to target the translated protein to the periplasm of the cell. There are a number of advantages that make it a good choice over other tags.
- Relatively low metabolic burden due to its small size
- No interaction with other proteins within the periplasm
- Is native in E. coli and contains a disulfide bond meaning it undergoes through an oxidative compartment that may assist in the formation of the disulfides in Proinsulin and Winsulin.
- It has already been shown to successfully target proinsulin to the periplasm (Malik et. al. 2007)